X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmain.c;h=4aa8968d7ab50549ade56544747ca3b7dc37b80c;hp=c1ceb5748373734026828fa55aeea1819785b352;hb=dde7da71ec95f2d83a9427bd381448438aa9201c;hpb=a1b44e3650691750cff4bf1c5bc04a36c3e8066d diff --git a/frontend/main.c b/frontend/main.c index c1ceb574..4aa8968d 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -1,5 +1,5 @@ /* - * (C) notaz, 2010-2011 + * (C) notaz, 2010-2012 * * This work is licensed under the terms of the GNU GPLv2 or later. * See the COPYING file in the top-level directory. @@ -252,6 +252,15 @@ do_state_slot: toggle_fast_forward(0); plugin_call_rearmed_cbs(); break; + case SACTION_TOGGLE_FPS: + if ((g_opts & (OPT_SHOWFPS|OPT_SHOWCPU)) + == (OPT_SHOWFPS|OPT_SHOWCPU)) + g_opts &= ~(OPT_SHOWFPS|OPT_SHOWCPU); + else if (g_opts & OPT_SHOWFPS) + g_opts |= OPT_SHOWCPU; + else + g_opts |= OPT_SHOWFPS; + break; case SACTION_SCREENSHOT: { char buf[MAXPATHLEN]; @@ -396,7 +405,7 @@ out: fclose(f); } -void emu_on_new_cd(void) +void emu_on_new_cd(int show_hud_msg) { ClearAllCheats(); parse_cwcheat(); @@ -406,8 +415,10 @@ void emu_on_new_cd(void) printf("----------------------------------------------------------\n"); } - snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG); - hud_new_msg = 3; + if (show_hud_msg) { + snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG); + hud_new_msg = 3; + } } int emu_core_preinit(void) @@ -563,7 +574,7 @@ int main(int argc, char *argv[]) printf(_("Could not load CD-ROM!\n")); return -1; } - emu_on_new_cd(); + emu_on_new_cd(!loadst); ready_to_go = 1; } } @@ -721,6 +732,8 @@ int emu_load_state(int slot) char fname[MAXPATHLEN]; int ret; + hud_msg[0] = 0; + ret = get_state_filename(fname, sizeof(fname), slot); if (ret != 0) return ret;