update time.c to not do a cast

This commit is contained in:
IoIxD 2026-04-15 22:20:13 -07:00
commit 5ca241ad0a
2 changed files with 3 additions and 3 deletions

View file

@ -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")

View file

@ -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) {