Make the platform code provide the key mapping
[picodrive.git] / platform / common / menu_pico.c
index 0f04bc4..32a3fdb 100644 (file)
@@ -119,11 +119,14 @@ static void menu_enter(int is_rom_loaded)
        }
        else
        {
+               int pos;
                char buff[256];
+               pos = plat_get_skin_dir(buff, 256);
+               strcpy(buff + pos, "background.png");
 
                // should really only happen once, on startup..
-               emu_make_path(buff, "skin/background.png", sizeof(buff));
-               if (readpng(g_menubg_ptr, buff, READPNG_BG, g_menuscreen_w, g_menuscreen_h) < 0)
+               if (readpng(g_menubg_ptr, buff, READPNG_BG,
+                                               g_menuscreen_w, g_menuscreen_h) < 0)
                        memset(g_menubg_ptr, 0, g_menuscreen_w * g_menuscreen_h * 2);
        }
 
@@ -1019,6 +1022,8 @@ static int main_menu_handler(int id, int keys)
                break;
        case MA_MAIN_CHANGE_CD:
                if (PicoAHW & PAHW_MCD) {
+                       // if cd is loaded, cdd_unload() triggers eject and
+                       // returns 1, else we'll select and load new CD here
                        if (!cdd_unload())
                                menu_loop_tray();
                        return 1;