From d438a8dd8e1f9baf207caaccf1b7d9a53c5db4e0 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 14 Jul 2013 00:05:19 +0300 Subject: [PATCH] minor frontend fixes --- platform/common/main.c | 4 +++- platform/common/menu_pico.c | 5 +++++ platform/common/plat_sdl.c | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/common/main.c b/platform/common/main.c index 6c922a9e..e8f92b9e 100644 --- a/platform/common/main.c +++ b/platform/common/main.c @@ -34,7 +34,9 @@ void parse_cmd_line(int argc, char *argv[]) if (strcasecmp(argv[x], "-config") == 0) { if (x+1 < argc) { ++x; PicoConfigFile = argv[x]; } } - else if (strcasecmp(argv[x], "-loadstate") == 0) { + else if (strcasecmp(argv[x], "-loadstate") == 0 + || strcasecmp(argv[x], "-load") == 0) + { if (x+1 < argc) { ++x; load_state_slot = atoi(argv[x]); } } else if (strcasecmp(argv[x], "-pdb") == 0) { diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index e3a6de3d..3e7e71aa 100644 --- a/platform/common/menu_pico.c +++ b/platform/common/menu_pico.c @@ -76,6 +76,11 @@ static void make_bg(int no_scale) short *dst; int x, y; + if (src == NULL) { + memset(g_menubg_ptr, 0, g_menuscreen_w * g_menuscreen_h * 2); + return; + } + if (!no_scale && g_menuscreen_w / w >= 2 && g_menuscreen_h / h >= 2) { unsigned int t, *d = g_menubg_ptr; diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index 8ea266fe..94f6e6ec 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -142,6 +142,7 @@ void plat_video_wait_vsync(void) void plat_video_menu_enter(int is_rom_loaded) { plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 0); + g_screen_ptr = shadow_fb; } void plat_video_menu_begin(void) -- 2.39.5