@@ -34,7 +34,7 @@ u32 currentFBHeight;
3434#define MIN (a, b ) ((a) < (b) ? (a) : (b))
3535#define MAX (a, b ) ((a) > (b) ? (a) : (b))
3636#define SECONDS_PER_TICKS (1.0 / 19200000 )
37- #define TARGET_FRAMETIME (1.0 / 59.8260982880808 )
37+ #define TARGET_FRAMETIME (1.0 / 60.0 )
3838
3939uint8_t libretro_save_buf[0x20000 + 0x2000 ]; /* Workaround for broken-by-design GBA save semantics. */
4040
@@ -225,7 +225,7 @@ static void gba_init(void) {
225225
226226 doMirroring (mirroringEnable);
227227
228- soundSetSampleRate (AUDIO_SAMPLERATE);
228+ soundSetSampleRate (AUDIO_SAMPLERATE + 10 ); // slight oversampling makes the sound better
229229
230230#if HAVE_HLE_BIOS
231231 bool usebios = false ;
@@ -556,6 +556,8 @@ int main(int argc, char *argv[]) {
556556 rgba8888dst += 8 * 4 ;
557557 }
558558
559+ mutexUnlock (&videoLock);
560+
559561 condvarWakeOne (&requestFrameCond);
560562
561563 u32 *srcImage = conversionBuffer;
@@ -615,8 +617,6 @@ int main(int argc, char *argv[]) {
615617 dst = ((u32 *)currentFB) + offsetX + (y * intScale + offsetY) * currentFBWidth;
616618 }
617619 }
618-
619- mutexUnlock (&videoLock);
620620 }
621621
622622 bool actionStopEmulation = false ;
@@ -758,7 +758,7 @@ int main(int argc, char *argv[]) {
758758 frameTimeFrames = 0 ;
759759 }
760760#endif
761-
761+
762762 gfxFlushBuffers ();
763763 gfxSwapBuffers ();
764764 gfxWaitForVsync ();
0 commit comments