char hud_msg[64];
int hud_new_msg;
+static void toggle_fast_forward(int force_off);
+
static void make_path(char *buf, size_t size, const char *dir, const char *fname)
{
if (fname)
break;
#ifndef NO_FRONTEND
case SACTION_ENTER_MENU:
+ toggle_fast_forward(1);
menu_loop();
return;
case SACTION_NEXT_SSLOT:
GPU_open(&gpuDisp, "PCSX", NULL);
}
break;
+ case SACTION_FAST_FORWARD:
+ toggle_fast_forward(0);
+ plugin_call_rearmed_cbs();
+ break;
case SACTION_SCREENSHOT:
{
char buf[MAXPATHLEN];
return 0;
}
+
+static void toggle_fast_forward(int force_off)
+{
+ static int fast_forward;
+ static int normal_g_opts;
+ static int normal_frameskip;
+ static int normal_enhancement_enable;
+
+ if (force_off && !fast_forward)
+ return;
+
+ fast_forward = !fast_forward;
+ if (fast_forward) {
+ normal_g_opts = g_opts;
+ normal_frameskip = pl_rearmed_cbs.frameskip;
+ normal_enhancement_enable =
+ pl_rearmed_cbs.gpu_neon.enhancement_enable;
+
+ g_opts |= OPT_NO_FRAMELIM;
+ pl_rearmed_cbs.frameskip = 3;
+ pl_rearmed_cbs.gpu_neon.enhancement_enable = 0;
+ } else {
+ g_opts = normal_g_opts;
+ pl_rearmed_cbs.frameskip = normal_frameskip;
+ pl_rearmed_cbs.gpu_neon.enhancement_enable =
+ normal_enhancement_enable;
+
+ pl_timing_prepare(Config.PsxType);
+ }
+
+ if (!force_off)
+ snprintf(hud_msg, sizeof(hud_msg), "FAST FORWARD %s",
+ fast_forward ? "ON" : "OFF");
+}
#endif
void SysRunGui() {
SACTION_PREV_SSLOT,
SACTION_TOGGLE_FSKIP,
SACTION_SWITCH_DISPMODE,
+ SACTION_FAST_FORWARD,
SACTION_SCREENSHOT,
SACTION_VOLUME_UP,
SACTION_VOLUME_DOWN,
{ "Next Save Slot ", 1 << SACTION_NEXT_SSLOT },
{ "Toggle Frameskip ", 1 << SACTION_TOGGLE_FSKIP },
{ "Take Screenshot ", 1 << SACTION_SCREENSHOT },
- { "Switch Renderer ", 1 << SACTION_SWITCH_DISPMODE },
- { "Enter Menu ", 1 << SACTION_ENTER_MENU },
+ { "Fast Forward ", 1 << SACTION_FAST_FORWARD },
#ifdef __ARM_ARCH_7A__ /* XXX */
+ { "Switch Renderer ", 1 << SACTION_SWITCH_DISPMODE },
{ "Minimize ", 1 << SACTION_MINIMIZE },
#endif
+ { "Enter Menu ", 1 << SACTION_ENTER_MENU },
{ "Gun Trigger ", 1 << SACTION_GUN_TRIGGER },
{ "Gun A button ", 1 << SACTION_GUN_A },
{ "Gun B button ", 1 << SACTION_GUN_B },
{ 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_SWITCH_DISPMODE },
+ { KEY_7, IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
+ { KEY_8, IN_BINDTYPE_EMU, SACTION_SWITCH_DISPMODE },
{ 0, 0, 0 }
};
{ SDLK_e, IN_BINDTYPE_PLAYER12, DKEY_L2 },
{ SDLK_t, IN_BINDTYPE_PLAYER12, DKEY_R2 },
{ SDLK_ESCAPE, IN_BINDTYPE_EMU, SACTION_ENTER_MENU },
+ { SDLK_F1, IN_BINDTYPE_EMU, SACTION_SAVE_STATE },
+ { SDLK_F2, IN_BINDTYPE_EMU, SACTION_LOAD_STATE },
+ { SDLK_F3, IN_BINDTYPE_EMU, SACTION_PREV_SSLOT },
+ { 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_F8, IN_BINDTYPE_EMU, SACTION_SWITCH_DISPMODE },
{ 0, 0, 0 }
};