mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-06-02 10:10:48 -04:00
Tweaked input latency patch to help prevent microstutters, updated RT64
This commit is contained in:
+1
-1
Submodule lib/rt64 updated: 3ae6485d70...c9f38195ef
@@ -153,11 +153,16 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||
|
||||
// @recomp Wait on the VI framebuffer to change if this task has a framebuffer swap.
|
||||
if (scTask->flags & OS_SC_SWAPBUFFER) {
|
||||
while (osViGetCurrentFramebuffer_recomp() != cfb->fb1) {
|
||||
int viCounter = 0;
|
||||
while (osViGetCurrentFramebuffer() != cfb->fb1) {
|
||||
osRecvMesg(&vi_queue, NULL, OS_MESG_BLOCK);
|
||||
viCounter++;
|
||||
}
|
||||
|
||||
// If we didn't wait the full number of VIs needed between frames then wait one extra VI afterwards.
|
||||
if (viCounter < gameState->framerateDivisor) {
|
||||
osRecvMesg(&vi_queue, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
// Wait one extra VI afterwards.
|
||||
osRecvMesg(&vi_queue, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
// @recomp Flush any extra messages from the VI queue.
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#define osCreateMesgQueue osCreateMesgQueue_recomp
|
||||
#define osRecvMesg osRecvMesg_recomp
|
||||
#define osSendMesg osSendMesg_recomp
|
||||
#define osViGetCurrentFramebuffer osViGetCurrentFramebuffer_recomp
|
||||
#define sinf __sinf_recomp
|
||||
#define cosf __cosf_recomp
|
||||
#define gRandFloat sRandFloat
|
||||
|
||||
Reference in New Issue
Block a user