From 9efb41ecd5ea3e692fdf15ddc65999077f101eb2 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 19 Aug 2016 17:43:49 -0700 Subject: [PATCH] PSP2: Make sure framelimiter is on in menus --- src/platform/psp2/main.c | 8 ++++---- src/platform/psp2/psp2-context.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/platform/psp2/main.c b/src/platform/psp2/main.c index e0f09c9cf..d642dfe74 100644 --- a/src/platform/psp2/main.c +++ b/src/platform/psp2/main.c @@ -30,12 +30,12 @@ static void _drawStart(void) { } static void _drawEnd(void) { - static int oldVCount = 0; + static int vcount = 0; extern bool frameLimiter; - int vcount = oldVCount; + int oldVCount = vcount; vita2d_end_drawing(); - oldVCount = sceDisplayGetVcount(); - vita2d_set_vblank_wait(frameLimiter && oldVCount + 1 >= vcount); + vcount = sceDisplayGetVcount(); + vita2d_set_vblank_wait(frameLimiter && vcount + 1 >= oldVCount); vita2d_swap_buffers(); } diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 02af0307d..cff796855 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -305,6 +305,7 @@ void mPSP2Paused(struct mGUIRunner* runner) { 0 }; sceCtrlSetActuator(1, &state); + frameLimiter = true; } void mPSP2Unpaused(struct mGUIRunner* runner) {