X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=platform%2Fcommon%2Fmenu_pico.c;h=0745352e70cdfe341af77f1147d1111b7a637bd9;hb=da77daa962a65116b81149fdc9c2374d22d72dd0;hp=e3a6de3d92c5a81ada3315396eae7399adee2688;hpb=ed4402a7dfd12dbbf34c547b438a671ae8114197;p=picodrive.git diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index e3a6de3..0745352 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; @@ -1077,7 +1082,8 @@ int menu_loop_tray(void) ret = 0; /* no CD inserted */ } - while (in_menu_wait_any(NULL, 50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK)); + while (in_menu_wait_any(NULL, 50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK)) + ; in_set_config_int(0, IN_CFG_BLOCKING, 0); plat_video_menu_leave();