/*
- * (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.
#include "libpicofe/input.h"
#include "libpicofe/plat.h"
#include "libpicofe/readpng.h"
+
+static void toggle_fast_forward(int force_off);
+#endif
+#ifndef BOOT_MSG
+#define BOOT_MSG "Booting up..."
#endif
// don't include debug.h - it breaks ARM build (R1 redefined)
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)
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_TOGGLE_FULLSCREEN:
+ g_fullscreen = !g_fullscreen;
+ if (GPU_open != NULL && GPU_close != NULL) {
+ GPU_close();
+ GPU_open(&gpuDisp, "PCSX", NULL);
+ }
+ break;
case SACTION_SCREENSHOT:
{
char buf[MAXPATHLEN];
fclose(f);
}
-void emu_on_new_cd(void)
+void emu_on_new_cd(int show_hud_msg)
{
ClearAllCheats();
parse_cwcheat();
printf("----------------------------------------------------------\n");
}
- snprintf(hud_msg, sizeof(hud_msg), "Booting up...");
- hud_new_msg = 2;
+ if (show_hud_msg) {
+ snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG);
+ hud_new_msg = 3;
+ }
}
int emu_core_preinit(void)
printf(_("Could not load CD-ROM!\n"));
return -1;
}
- emu_on_new_cd();
+ emu_on_new_cd(!loadst);
ready_to_go = 1;
}
}
+ if (loadst_f) {
+ int ret = LoadState(loadst_f);
+ printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f);
+ ready_to_go |= ret == 0;
+ }
+
if (ready_to_go) {
menu_prepare_emu();
int ret = emu_load_state(loadst - 1);
printf("%s state %d\n", ret ? "failed to load" : "loaded", loadst);
}
- if (loadst_f) {
- int ret = LoadState(loadst_f);
- printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f);
- }
}
else
menu_loop();
char fname[MAXPATHLEN];
int ret;
+ hud_msg[0] = 0;
+
ret = get_state_filename(fname, sizeof(fname), slot);
if (ret != 0)
return ret;