work on 'vblank on line start' problem, var changes, mask defines
[libpicofe.git] / psp / menu.c
index b5f3203..fda3ead 100644 (file)
@@ -573,7 +573,7 @@ static void draw_savestate_bg(int slot)
        }
 
        if (file) {
-               if (PicoMCD & 1) {
+               if (PicoAHW & PAHW_MCD) {
                        PicoCdLoadStateGfx(file);
                } else {
                        areaSeek(file, 0x10020, SEEK_SET);  // skip header and RAM in state file
@@ -817,7 +817,7 @@ static void kc_sel_loop(void)
                                case 0: key_config_loop(me_ctrl_actions, is_6button ? 12 : 8, 0); return;
                                case 1: key_config_loop(me_ctrl_actions, is_6button ? 12 : 8, 1); return;
                                case 2: key_config_loop(emuctrl_actions,
-                                               sizeof(emuctrl_actions)/sizeof(emuctrl_actions[0]), -1); return;
+                                               sizeof(emuctrl_actions)/sizeof(emuctrl_actions[0]) - 1, -1); return;
                                case 3: if (!rom_loaded) emu_WriteConfig(0); return;
                                default: return;
                        }
@@ -936,9 +936,9 @@ static void cd_menu_loop_options(void)
                            selected_id == MA_CDOPT_READAHEAD) {
                                if (inp & BTN_LEFT) {
                                        PicoCDBuffers >>= 1;
-                                       if (PicoCDBuffers < 64) PicoCDBuffers = 0;
+                                       if (PicoCDBuffers < 2) PicoCDBuffers = 0;
                                } else {
-                                       if (PicoCDBuffers < 64) PicoCDBuffers = 64;
+                                       if (PicoCDBuffers < 2) PicoCDBuffers = 2;
                                        else PicoCDBuffers <<= 1;
                                        if (PicoCDBuffers > 8*1024) PicoCDBuffers = 8*1024; // 16M
                                }