X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=199020d288fc446374725531cbf282f9126633bb;hp=b25e1927c2aab322d1e5ad5424cb06daa8bddfc7;hb=420f4e20b1e6234c2e214ac801ea95c2a68b50aa;hpb=69e482e3def6669a4fa921d07f9ba04883d7de34 diff --git a/frontend/menu.c b/frontend/menu.c index b25e1927..199020d2 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -26,6 +26,7 @@ #include "plugin_lib.h" #include "plat.h" #include "pcnt.h" +#include "cspace.h" #include "libpicofe/plat.h" #include "libpicofe/input.h" #include "libpicofe/linux/in_evdev.h" @@ -36,7 +37,6 @@ #include "../libpcsxcore/cheat.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" #include "../plugins/dfinput/externals.h" -#include "../plugins/gpulib/cspace.h" #include "psemu_plugin_defs.h" #include "revision.h" @@ -2080,12 +2080,12 @@ static int swap_cd_multidisk(void) static void load_pcsx_cht(void) { - const char *exts[] = { "cht", NULL }; + static const char *exts[] = { "cht", NULL }; const char *fname; - char path[256]; + char msg[64]; - path[0] = 0; - fname = menu_loop_romsel(path, sizeof(path), exts, NULL); + fname = menu_loop_romsel(last_selected_fname, + sizeof(last_selected_fname), exts, NULL); if (fname == NULL) return; @@ -2095,8 +2095,8 @@ static void load_pcsx_cht(void) if (NumCheats == 0 && NumCodes == 0) menu_update_msg("failed to load cheats"); else { - snprintf(path, sizeof(path), "%d cheat(s) loaded", NumCheats + NumCodes); - menu_update_msg(path); + snprintf(msg, sizeof(msg), "%d cheat(s) loaded", NumCheats + NumCodes); + menu_update_msg(msg); } me_enable(e_menu_main, MA_MAIN_CHEATS, ready_to_go && NumCheats); }