sprite limit
[libpicofe.git] / gp2x / menu.c
index 506b7c4..06c0afb 100644 (file)
@@ -124,6 +124,8 @@ static unsigned long wait_for_input_usbjoy(unsigned long interesting, int *joy)
        // handle only 1 event at a time\r
        for (i = 1; i != 0; i <<= 1)\r
                if (ret & i) { ret &= i; break; }\r
+       // ... but allow select\r
+       ret |= inp_prev & GP2X_SELECT;\r
 \r
        return ret;\r
 }\r
@@ -780,7 +782,8 @@ static void key_config_loop(const me_bind_action *opts, int opt_cnt, int player_
                draw_key_config(opts, opt_cnt, player_idx, sel);\r
                inp = wait_for_input_usbjoy(CONFIGURABLE_KEYS, &joy);\r
                // printf("got %08lX from joy %i\n", inp, joy);\r
-               if (joy == 0) {\r
+               if (joy == 0)\r
+               {\r
                        if (!(inp & GP2X_SELECT)) {\r
                                prev_select = 0;\r
                                if(inp & GP2X_UP  ) { sel--; if (sel < 0) sel = menu_sel_max; continue; }\r
@@ -1059,6 +1062,7 @@ menu_entry opt2_entries[] =
        { "Emulate Z80",               MB_ONOFF, MA_OPT2_ENABLE_Z80,    &PicoOpt, 0x00004, 0, 0, 1, 1 },\r
        { "Emulate YM2612 (FM)",       MB_ONOFF, MA_OPT2_ENABLE_YM2612, &PicoOpt, 0x00001, 0, 0, 1, 1 },\r
        { "Emulate SN76496 (PSG)",     MB_ONOFF, MA_OPT2_ENABLE_SN76496,&PicoOpt, 0x00002, 0, 0, 1, 1 },\r
+       { "Disable sprite limit",      MB_ONOFF, MA_OPT2_NO_SPRITE_LIM, &PicoOpt, 0x40000, 0, 0, 1, 1 },\r
        { "gzip savestates",           MB_ONOFF, MA_OPT2_GZIP_STATES,   &currentConfig.EmuOpt, 0x0008, 0, 0, 1, 1 },\r
        { "Don't save last used ROM",  MB_ONOFF, MA_OPT2_NO_LAST_ROM,   &currentConfig.EmuOpt, 0x0020, 0, 0, 1, 1 },\r
        { "needs restart:",            MB_NONE,  MA_NONE,               NULL, 0, 0, 0, 1, 0 },\r