mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-09-05 20:07:35 +02:00
Tweaked input latency patch to help prevent microstutters, updated RT64
This commit is contained in:
parent
2e4988da2b
commit
fcc4eb6351
2
lib/rt64
2
lib/rt64
@ -1 +1 @@
|
||||
Subproject commit 3ae6485d70e9899587b2afdb7551b9256f6427be
|
||||
Subproject commit c9f38195ef1a6d56953957dc2ad84049a146818d
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user