all repos — mgba @ 026f5233db5a96707d2b4a06f0b22747f0b16b71

mGBA Game Boy Advance Emulator

PSP2: Use sceDisplayGetRefreshRate to get ideal frame rate
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Aug 2016 03:30:48 -0700
commit

026f5233db5a96707d2b4a06f0b22747f0b16b71

parent

6698794366c1377c117c7798ab7e4906f140b4c0

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -218,7 +218,9 @@ }

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);