X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Fmenu.c;h=688d5389b932bb20da19e3204255e4322df2253c;hb=3d792006acf30d67362146f9f448f753064a6fcf;hp=a81e1bc89ccc40c5cebe3557b5a54cff28453f13;hpb=85bd209c99d9c50e99a2ba0a797f68c7b546d96a;p=libpicofe.git diff --git a/common/menu.c b/common/menu.c index a81e1bc..688d538 100644 --- a/common/menu.c +++ b/common/menu.c @@ -17,6 +17,7 @@ #include "plat.h" #include "posix.h" #include +#include #include #include @@ -601,7 +602,7 @@ static void load_progress_cb(int percent) plat_video_menu_end(); } -static void cdload_progress_cb(int percent) +static void cdload_progress_cb(const char *fname, int percent) { int ln, len = percent * g_screen_width / 100; unsigned short *dst = (unsigned short *)g_screen_ptr + g_screen_width * 10 * 2; @@ -609,7 +610,7 @@ static void cdload_progress_cb(int percent) memset(dst, 0xff, g_screen_width * (me_sfont_h - 2) * 2); smalltext_out16(1, 3 * me_sfont_h, "Processing CD image / MP3s", 0xffff); - smalltext_out16(1, 4 * me_sfont_h, rom_fname_loaded, 0xffff); + smalltext_out16(1, 4 * me_sfont_h, fname, 0xffff); dst += g_screen_width * me_sfont_h * 3; if (len > g_screen_width) @@ -646,7 +647,8 @@ void menu_romload_prepare(const char *rom_name) void menu_romload_end(void) { - PicoCartLoadProgressCB = PicoCDLoadProgressCB = NULL; + PicoCartLoadProgressCB = NULL; + PicoCDLoadProgressCB = NULL; smalltext_out16(1, (cdload_called ? 6 : 3) * me_sfont_h, "Starting emulation...", 0xffff); plat_video_menu_end(); @@ -971,7 +973,7 @@ static void draw_savestate_bg(int slot) unsigned short tmp_cram[0x40]; unsigned short tmp_vsram[0x40]; void *tmp_vram; - char *fname; + const char *fname; fname = emu_get_save_fname(1, 0, slot); if (!fname) return; @@ -1036,6 +1038,9 @@ static int menu_loop_savestate(int is_loading) state_check_slots(); + if (!(state_slot_flags & (1 << menu_sel)) && is_loading) + menu_sel = menu_sel_max; + for (;;) { draw_savestate_menu(menu_sel, is_loading); @@ -1736,6 +1741,12 @@ static void draw_text_debug(const char *str, int skip, int from) } } +#ifdef __GNUC__ +#define COMPILER "gcc " __VERSION__ +#else +#define COMPILER +#endif + static void draw_frame_debug(void) { char layer_str[48] = "layers: "; @@ -1746,7 +1757,7 @@ static void draw_frame_debug(void) memset(g_screen_ptr, 0, g_screen_width * g_screen_height * 2); pemu_forced_frame(0); - smalltext_out16(4, 1, "build: " __DATE__ " " __TIME__, 0xffff); + smalltext_out16(4, 1, "build: r" REVISION " "__DATE__ " " __TIME__ " " COMPILER, 0xffff); smalltext_out16(4, g_screen_height - me_sfont_h, layer_str, 0xffff); }