From d303a7f502af4cbbb33c9c1ad1e44dae22204f29 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Wed, 26 Oct 2022 14:06:16 +0200 Subject: [PATCH] coreinit: Implement OSGetSystemTick (#415) --- src/Cafe/OS/libs/coreinit/coreinit_Time.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Cafe/OS/libs/coreinit/coreinit_Time.cpp b/src/Cafe/OS/libs/coreinit/coreinit_Time.cpp index e85b6adb..465439ba 100644 --- a/src/Cafe/OS/libs/coreinit/coreinit_Time.cpp +++ b/src/Cafe/OS/libs/coreinit/coreinit_Time.cpp @@ -43,6 +43,11 @@ namespace coreinit osLib_returnFromFunction64(hCPU, coreinit_getTimerTick()); } + void export_OSGetSystemTick(PPCInterpreter_t* hCPU) + { + osLib_returnFromFunction(hCPU, (uint32)coreinit_getTimerTick()); + } + uint32 getLeapDaysUntilYear(uint32 year) { if (year == 0) @@ -368,6 +373,7 @@ namespace coreinit osLib_addFunction("coreinit", "OSGetTime", export_OSGetTime); osLib_addFunction("coreinit", "OSGetSystemTime", export_OSGetSystemTimeDummy); osLib_addFunction("coreinit", "OSGetTick", export_OSGetTick); + osLib_addFunction("coreinit", "OSGetSystemTick", export_OSGetSystemTick); cafeExportRegister("coreinit", OSTicksToCalendarTime, LogType::Placeholder); cafeExportRegister("coreinit", OSCalendarTimeToTicks, LogType::Placeholder);