From 026f5233db5a96707d2b4a06f0b22747f0b16b71 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 19 Aug 2016 03:30:48 -0700 Subject: [PATCH] PSP2: Use sceDisplayGetRefreshRate to get ideal frame rate --- src/platform/psp2/psp2-context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 2239894cc..02af0307d 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -218,7 +218,9 @@ void mPSP2Setup(struct mGUIRunner* runner) { void mPSP2LoadROM(struct mGUIRunner* runner) { scePowerSetArmClockFrequency(444); - double ratio = GBAAudioCalculateRatio(1, 60.0f / 1.001f, 1); + float rate = 60.0f / 1.001f; + sceDisplayGetRefreshRate(&rate); + double ratio = GBAAudioCalculateRatio(1, rate, 1); blip_set_rates(runner->core->getAudioChannel(runner->core, 0), runner->core->frequency(runner->core), 48000 * ratio); blip_set_rates(runner->core->getAudioChannel(runner->core, 1), runner->core->frequency(runner->core), 48000 * ratio);