X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmain.c;h=068fe501f639ebaafaf5291206d4b1461f2dd978;hp=adf5e31f1a4fe0d10863b788028356de96841d91;hb=d61de97e8764980c0a98d777653396fad745fff4;hpb=0a1518684006294fca3cb72a6c56483650c4702f diff --git a/frontend/main.c b/frontend/main.c index adf5e31f..068fe501 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -36,9 +36,6 @@ enum sched_action emu_action, emu_action_old; char hud_msg[64]; int hud_new_msg; -// from softgpu plugin -extern int UseFrameSkip; - static void make_path(char *buf, size_t size, const char *dir, const char *fname) { if (fname) @@ -157,9 +154,9 @@ void do_emu_action(void) state_slot = 9; goto do_state_slot; case SACTION_TOGGLE_FSKIP: - UseFrameSkip ^= 1; + pl_rearmed_cbs.frameskip ^= 1; snprintf(hud_msg, sizeof(hud_msg), "FRAMESKIP %s", - UseFrameSkip ? "ON" : "OFF"); + pl_rearmed_cbs.frameskip ? "ON" : "OFF"); break; case SACTION_SCREENSHOT: { @@ -225,6 +222,7 @@ int main(int argc, char *argv[]) char file[MAXPATHLEN] = ""; char path[MAXPATHLEN]; const char *cdfile = NULL; + const char *loadst_f = NULL; int psxout = 0; int loadst = 0; int i; @@ -255,6 +253,10 @@ int main(int argc, char *argv[]) cdfile = isofilename; } + else if (!strcmp(argv[i], "-loadf")) { + if (i+1 >= argc) break; + loadst_f = argv[++i]; + } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "-help") || !strcmp(argv[i], "--help")) { @@ -340,6 +342,10 @@ int main(int argc, char *argv[]) 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();