aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authornotaz2012-11-11 21:18:41 +0200
committernotaz2012-11-11 22:09:19 +0200
commitdde7da71ec95f2d83a9427bd381448438aa9201c (patch)
treefddb3cbe985c45abf177ed2d1a8a873778a97ed4 /frontend
parent841ba5ee5bfeb32bb1194c423a047f98825d26fd (diff)
downloadpcsx_rearmed-dde7da71ec95f2d83a9427bd381448438aa9201c.tar.gz
pcsx_rearmed-dde7da71ec95f2d83a9427bd381448438aa9201c.tar.bz2
pcsx_rearmed-dde7da71ec95f2d83a9427bd381448438aa9201c.zip
frontend: add toggle FPS option
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.c13
-rw-r--r--frontend/main.h1
-rw-r--r--frontend/menu.c3
-rw-r--r--frontend/plat_pandora.c3
-rw-r--r--frontend/plat_sdl.c3
5 files changed, 19 insertions, 4 deletions
diff --git a/frontend/main.c b/frontend/main.c
index 4803198..4aa8968 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];
@@ -723,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;
diff --git a/frontend/main.h b/frontend/main.h
index 7e5dc47..04489f6 100644
--- a/frontend/main.h
+++ b/frontend/main.h
@@ -71,6 +71,7 @@ enum sched_action {
SACTION_VOLUME_UP,
SACTION_VOLUME_DOWN,
SACTION_MINIMIZE,
+ SACTION_TOGGLE_FPS,
SACTION_GUN_TRIGGER = 16,
SACTION_GUN_A,
SACTION_GUN_B,
diff --git a/frontend/menu.c b/frontend/menu.c
index a984bbf..ec3c5a2 100644
--- a/frontend/menu.c
+++ b/frontend/menu.c
@@ -683,10 +683,11 @@ me_bind_action emuctrl_actions[] =
{ "Next Save Slot ", 1 << SACTION_NEXT_SSLOT },
{ "Toggle Frameskip ", 1 << SACTION_TOGGLE_FSKIP },
{ "Take Screenshot ", 1 << SACTION_SCREENSHOT },
- { "Fast Forward ", 1 << SACTION_FAST_FORWARD },
+ { "Show/Hide FPS ", 1 << SACTION_TOGGLE_FPS },
#ifdef __ARM_ARCH_7A__
{ "Switch Renderer ", 1 << SACTION_SWITCH_DISPMODE },
#endif
+ { "Fast Forward ", 1 << SACTION_FAST_FORWARD },
#if MENU_SHOW_MINIMIZE
{ "Minimize ", 1 << SACTION_MINIMIZE },
#endif
diff --git a/frontend/plat_pandora.c b/frontend/plat_pandora.c
index 28aaaab..cdd94c6 100644
--- a/frontend/plat_pandora.c
+++ b/frontend/plat_pandora.c
@@ -39,8 +39,9 @@ static const struct in_default_bind in_evdev_defbinds[] = {
{ KEY_4, IN_BINDTYPE_EMU, SACTION_NEXT_SSLOT },
{ KEY_5, IN_BINDTYPE_EMU, SACTION_TOGGLE_FSKIP },
{ KEY_6, IN_BINDTYPE_EMU, SACTION_SCREENSHOT },
- { KEY_7, IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
+ { KEY_7, IN_BINDTYPE_EMU, SACTION_TOGGLE_FPS },
{ KEY_8, IN_BINDTYPE_EMU, SACTION_SWITCH_DISPMODE },
+ { KEY_BACKSPACE,IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
{ 0, 0, 0 }
};
diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c
index 61f904d..1a1ceec 100644
--- a/frontend/plat_sdl.c
+++ b/frontend/plat_sdl.c
@@ -41,8 +41,9 @@ static const struct in_default_bind in_sdl_defbinds[] = {
{ SDLK_F4, IN_BINDTYPE_EMU, SACTION_NEXT_SSLOT },
{ SDLK_F5, IN_BINDTYPE_EMU, SACTION_TOGGLE_FSKIP },
{ SDLK_F6, IN_BINDTYPE_EMU, SACTION_SCREENSHOT },
- { SDLK_F7, IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
+ { SDLK_F7, IN_BINDTYPE_EMU, SACTION_TOGGLE_FPS },
{ SDLK_F8, IN_BINDTYPE_EMU, SACTION_SWITCH_DISPMODE },
+ { SDLK_BACKSPACE, IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
{ 0, 0, 0 }
};