1.56 release
[libpicofe.git] / common / menu.c
index 774f05c..bd4eb70 100644 (file)
@@ -17,6 +17,7 @@
 #include "plat.h"\r
 #include "posix.h"\r
 #include <version.h>\r
+#include <revision.h>\r
 \r
 #include <pico/pico_int.h>\r
 #include <pico/patch.h>\r
@@ -1036,6 +1037,9 @@ static int menu_loop_savestate(int is_loading)
 \r
        state_check_slots();\r
 \r
+       if (!(state_slot_flags & (1 << menu_sel)) && is_loading)\r
+               menu_sel = menu_sel_max;\r
+\r
        for (;;)\r
        {\r
                draw_savestate_menu(menu_sel, is_loading);\r
@@ -1736,6 +1740,12 @@ static void draw_text_debug(const char *str, int skip, int from)
        }\r
 }\r
 \r
+#ifdef __GNUC__\r
+#define COMPILER "gcc " __VERSION__\r
+#else\r
+#define COMPILER\r
+#endif\r
+\r
 static void draw_frame_debug(void)\r
 {\r
        char layer_str[48] = "layers:             ";\r
@@ -1746,7 +1756,7 @@ static void draw_frame_debug(void)
 \r
        memset(g_screen_ptr, 0, g_screen_width * g_screen_height * 2);\r
        pemu_forced_frame(0);\r
-       smalltext_out16(4, 1, "build: " __DATE__ " " __TIME__, 0xffff);\r
+       smalltext_out16(4, 1, "build: r" REVISION "  "__DATE__ " " __TIME__ " " COMPILER, 0xffff);\r
        smalltext_out16(4, g_screen_height - me_sfont_h, layer_str, 0xffff);\r
 }\r
 \r