Better Mac OS 6 compatibility

This commit is contained in:
UnknownShadow200 2024-06-04 17:35:31 +10:00
parent 79078b7cc6
commit ed1eb7265e
4 changed files with 10 additions and 4 deletions

View File

@ -18,6 +18,6 @@ resource 'SIZE' (-1) {
reserved, reserved,
reserved, reserved,
reserved, reserved,
8192 * 1024, 3072 * 1024,
8192 * 1024 8192 * 1024
}; };

View File

@ -27,6 +27,6 @@ resource 'SIZE' (-1) {
reserved, reserved,
reserved, reserved,
reserved, reserved,
8192 * 1024, 3072 * 1024,
8192 * 1024 8192 * 1024
}; };

View File

@ -141,10 +141,15 @@ void DateTime_CurrentLocal(struct DateTime* t) {
/*########################################################################################################################* /*########################################################################################################################*
*--------------------------------------------------------Stopwatch--------------------------------------------------------* *--------------------------------------------------------Stopwatch--------------------------------------------------------*
*#########################################################################################################################*/ *#########################################################################################################################*/
#define NS_PER_SEC 1000000000ULL #define MS_PER_SEC 1000000ULL
cc_uint64 Stopwatch_Measure(void) { cc_uint64 Stopwatch_Measure(void) {
//return TickCount(); if (sysVersion < 0x7000) {
// 60 ticks a second
cc_uint64 count = TickCount();
return count * MS_PER_SEC / 60;
}
UnsignedWide count; UnsignedWide count;
Microseconds(&count); Microseconds(&count);
return (cc_uint64)count.lo | ((cc_uint64)count.hi << 32); return (cc_uint64)count.lo | ((cc_uint64)count.hi << 32);

View File

@ -81,6 +81,7 @@ void Window_PreInit(void) {
long tmpLong = 0; long tmpLong = 0;
Gestalt(gestaltQuickdrawVersion, &tmpLong); Gestalt(gestaltQuickdrawVersion, &tmpLong);
hasColorQD = tmpLong >= gestalt32BitQD; hasColorQD = tmpLong >= gestalt32BitQD;
if (!hasColorQD) Platform_LogConst("RUNNING IN SLOW MODE");
} }
void Window_Init(void) { void Window_Init(void) {