Use Limiter class in waitForTick (#330)

This uses the existing `Limiter` class (stolen from Metaforce) in `JFWDisplay::waitForTick`.
The limiter also now uses `SDL_DelayPrecise` internally on non-Windows platforms.
On Windows, the existing `NanoSleep` logic is untouched, as it appears to provide a
more stable framerate for the folks testing it on Windows than `SDL_DelayPrecise` does.
On Linux, however, `SDL_DelayPrecise` is plenty accurate.
This commit is contained in:
Luke Street
2026-04-11 17:50:52 -06:00
committed by GitHub
parent b628a1beb6
commit aafd50cd09
4 changed files with 46 additions and 33 deletions
+2
View File
@@ -182,7 +182,9 @@ void JUTVideo::postRetraceProc(u32 retrace_count) {
sManager->mPostCallback(retrace_count);
}
#ifndef TARGET_PC // Not read by JFWDisplay waitForTick
OSSendMessage(&sManager->mMessageQueue, (OSMessage)(uintptr_t)VIGetRetraceCount(), OS_MESSAGE_NOBLOCK);
#endif
}
void JUTVideo::setRenderMode(GXRenderModeObj const* pObj) {