mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-21 06:52:22 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user