X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Femu.c;h=8e5a8d5850374c1007f3d92842b7bc7b146af4bc;hb=902972d1c7f353aebb17a5ab587b2526e1a45d60;hp=a075abdf01620dedc36a65ce7f42c0642f77ddaf;hpb=0c9ae59222a6fa9af18dcc072fdfb06cfca124d6;p=libpicofe.git diff --git a/common/emu.c b/common/emu.c index a075abd..8e5a8d5 100644 --- a/common/emu.c +++ b/common/emu.c @@ -453,11 +453,14 @@ static void shutdown_MCD(void) static void system_announce(void) { - const char *sys_name, *tv_standard; + const char *sys_name, *tv_standard, *extra = ""; int fps; if (PicoAHW & PAHW_SMS) { sys_name = "Master System"; +#ifdef NO_SMS + extra = " [no support]"; +#endif } else if (PicoAHW & PAHW_PICO) { sys_name = "Pico"; } else if (PicoAHW & PAHW_MCD) { @@ -474,7 +477,7 @@ static void system_announce(void) tv_standard = Pico.m.pal ? "PAL" : "NTSC"; fps = Pico.m.pal ? 50 : 60; - emu_status_msg("%s %s / %dFPS", tv_standard, sys_name, fps); + emu_status_msg("%s %s / %dFPS%s", tv_standard, sys_name, fps, extra); } // note: this function might mangle rom_fname @@ -1137,8 +1140,11 @@ static void emu_tray_close(void) void emu_32x_startup(void) { - plat_video_toggle_renderer(0, 0); + plat_video_toggle_renderer(0, 0); // HACK system_announce(); + + // force mode change event + rendstatus_old = -1; } void emu_reset_game(void) @@ -1250,7 +1256,7 @@ static void run_events_ui(unsigned int which) plat_status_msg_busy_first(tmp); - in_set_blocking(1); + in_set_config_int(0, IN_CFG_BLOCKING, 1); while (in_menu_wait_any(50) & (PBTN_MA3|PBTN_MBACK)) ; while ( !((keys = in_menu_wait_any(50)) & (PBTN_MA3|PBTN_MBACK)) ) @@ -1259,7 +1265,7 @@ static void run_events_ui(unsigned int which) do_it = 0; while (in_menu_wait_any(50) & (PBTN_MA3|PBTN_MBACK)) ; - in_set_blocking(0); + in_set_config_int(0, IN_CFG_BLOCKING, 0); } if (do_it) { plat_status_msg_busy_first((which & PEV_STATE_LOAD) ? "LOADING STATE" : "SAVING STATE"); @@ -1428,6 +1434,14 @@ void emu_loop(void) Pico.m.dirtyPal = 1; rendstatus_old = -1; + PicoLoopPrepare(); + + // prepare CD buffer + if (PicoAHW & PAHW_MCD) + PicoCDBufferInit(); + + pemu_loop_prep(); + /* number of ticks per frame */ if (Pico.m.pal) { target_fps = 50; @@ -1437,13 +1451,6 @@ void emu_loop(void) target_frametime = ms_to_ticks(1000) / 60 + 1; } - // prepare CD buffer - if (PicoAHW & PAHW_MCD) - PicoCDBufferInit(); - PicoLoopPrepare(); - - pemu_loop_prep(); - timestamp_fps = get_ticks(); reset_timing = 1;