diff --git a/CMakeLists.txt b/CMakeLists.txt index 835ecdd..c0c7f0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,8 +314,6 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Retro") PRIVATE src/backend/classicmacos.c ) - if(PLATFORM MATCHES retroppc) - endif() if(PLATFORM MATCHES retroppc) set_target_properties(Mw PROPERTIES COMPILE_FLAGS "-ffunction-sections -mcpu=601 -Os -Wall -Wextra -Wno-unused-parameter") set_target_properties(Mw PROPERTIES LINK_FLAGS "-Wl,-gc-sections") diff --git a/src/abstract/time.c b/src/abstract/time.c index 52d9986..cdebc4b 100644 --- a/src/abstract/time.c +++ b/src/abstract/time.c @@ -43,7 +43,7 @@ void timerUpdateFunc(void) { long MwTimeGetTick(void) { UnsignedWide h; Microseconds(&h); - return *(long*)&h; + return h.lo; } void MwTimeSleep(int ms) { tm.tmAddr = NewTimerProc(timerUpdateFunc); @@ -52,6 +52,8 @@ void MwTimeSleep(int ms) { InsTime((QElemPtr)&tm); PrimeTime((QElemPtr)&tm, 1); + + DisposeTimerUPP(tm.tmAddr); } #elif defined(__unix__) long MwTimeGetTick(void) {