X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=platform%2Fcommon%2Femu.c;h=1573d12818c032b5577728eb785b2f3251d766df;hb=be7867d8756f15956447d3275382a77a71922feb;hp=b828595feb536e80b2d56289217ece89c1c0957b;hpb=9c9cda8c39bd2a6b99b8420a3034c454bc713954;p=picodrive.git diff --git a/platform/common/emu.c b/platform/common/emu.c index b828595..1573d12 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -48,7 +48,8 @@ currentConfig_t currentConfig, defaultConfig; int state_slot = 0; int config_slot = 0, config_slot_current = 0; int pico_pen_x = 320/2, pico_pen_y = 240/2; -int pico_inp_mode = 0; +int pico_inp_mode; +int flip_after_sync; int engineState = PGS_Menu; static short __attribute__((aligned(4))) sndBuffer[2*44100/50]; @@ -1369,10 +1370,8 @@ void emu_loop(void) sprintf(fpsbuff, "%02i/%02i/%02i", frames_shown, bench_fps_s, (bf[0]+bf[1]+bf[2]+bf[3])>>2); printf("%s\n", fpsbuff); #else - if (currentConfig.EmuOpt & EOPT_SHOW_FPS) { - sprintf(fpsbuff, "%02i/%02i", frames_shown, frames_done); - if (fpsbuff[5] == 0) { fpsbuff[5] = fpsbuff[6] = ' '; fpsbuff[7] = 0; } - } + if (currentConfig.EmuOpt & EOPT_SHOW_FPS) + sprintf(fpsbuff, "%02i/%02i ", frames_shown, frames_done); #endif frames_shown = frames_done = 0; timestamp_fps += ms_to_ticks(1000); @@ -1431,7 +1430,8 @@ void emu_loop(void) PicoFrame(); pemu_finalize_frame(fpsbuff, notice_msg); - // plat_video_flip(); + if (!flip_after_sync) + plat_video_flip(); /* frame limiter */ if (!reset_timing && !(currentConfig.EmuOpt & (EOPT_NO_FRMLIMIT|EOPT_EXT_FRMLIMIT))) @@ -1449,9 +1449,8 @@ void emu_loop(void) } } - // XXX: for some plats it might be better to flip before vsync - // (due to shadow registers in display hw) - plat_video_flip(); + if (flip_after_sync) + plat_video_flip(); pframes_done++; frames_done++; frames_shown++;