various pre-release tweaks
[libpicofe.git] / common / menu.c
index 80fdff8..5fc2a57 100644 (file)
@@ -455,8 +455,9 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void))
        plat_video_menu_end();\r
 }\r
 \r
-static int me_process(menu_entry *entry, int is_next)\r
+static int me_process(menu_entry *entry, int is_next, int is_lr)\r
 {\r
+       int c;\r
        switch (entry->beh)\r
        {\r
                case MB_OPT_ONOFF:\r
@@ -465,7 +466,8 @@ static int me_process(menu_entry *entry, int is_next)
                        return 1;\r
                case MB_OPT_RANGE:\r
                case MB_OPT_CUSTRANGE:\r
-                       *(int *)entry->var += is_next ? 1 : -1;\r
+                       c = is_lr ? 10 : 1;\r
+                       *(int *)entry->var += is_next ? c : -c;\r
                        if (*(int *)entry->var < (int)entry->min)\r
                                *(int *)entry->var = (int)entry->max;\r
                        if (*(int *)entry->var > (int)entry->max)\r
@@ -524,8 +526,9 @@ static void me_loop(menu_entry *menu, int *menu_sel, void (*draw_more)(void))
                if ((inp & (PBTN_L|PBTN_R)) == (PBTN_L|PBTN_R))\r
                        debug_menu_loop();\r
 \r
-               if (inp & (PBTN_LEFT|PBTN_RIGHT)) { /* multi choice */\r
-                       if (me_process(&menu[sel], (inp & PBTN_RIGHT) ? 1 : 0))\r
+               if (inp & (PBTN_LEFT|PBTN_RIGHT|PBTN_L|PBTN_R)) { /* multi choice */\r
+                       if (me_process(&menu[sel], (inp & (PBTN_RIGHT|PBTN_R)) ? 1 : 0,\r
+                                               inp & (PBTN_L|PBTN_R)))\r
                                continue;\r
                }\r
 \r
@@ -1418,7 +1421,7 @@ static int mh_cdopt_ra(menu_id id, int keys)
 \r
 static menu_entry e_menu_cd_options[] =\r
 {\r
-       mee_onoff("CD LEDs",              MA_CDOPT_LEDS,          currentConfig.EmuOpt, 0x0400),\r
+       mee_onoff("CD LEDs",              MA_CDOPT_LEDS,          currentConfig.EmuOpt, EOPT_EN_CD_LEDS),\r
        mee_onoff("CDDA audio",           MA_CDOPT_CDDA,          PicoOpt, POPT_EN_MCD_CDDA),\r
        mee_onoff("PCM audio",            MA_CDOPT_PCM,           PicoOpt, POPT_EN_MCD_PCM),\r
        mee_cust ("ReadAhead buffer",     MA_CDOPT_READAHEAD,     mh_cdopt_ra, mgn_cdopt_ra),\r
@@ -1447,6 +1450,7 @@ static menu_entry e_menu_adv_options[] =
        mee_onoff     ("gzip savestates",          MA_OPT2_GZIP_STATES,   currentConfig.EmuOpt, EOPT_GZIP_SAVES),\r
        mee_onoff     ("Don't save last used ROM", MA_OPT2_NO_LAST_ROM,   currentConfig.EmuOpt, EOPT_NO_AUTOSVCFG),\r
        mee_onoff     ("Disable idle loop patching",MA_OPT2_NO_IDLE_LOOPS,PicoOpt, POPT_DIS_IDLE_DET),\r
+       mee_onoff     ("Disable frame limiter",    MA_OPT2_NO_FRAME_LIMIT,currentConfig.EmuOpt, EOPT_NO_FRMLIMIT),\r
        MENU_GP2X_OPTIONS_ADV\r
        mee_end,\r
 };\r
@@ -2039,6 +2043,8 @@ void menu_plat_setup(int is_wiz)
 \r
        if (!is_wiz) {\r
                me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 0);\r
+               i = me_id2offset(e_menu_gfx_options, MA_OPT_TEARING_FIX);\r
+               e_menu_gfx_options[i].need_to_save = 0;\r
                return;\r
        }\r
 \r
@@ -2048,6 +2054,8 @@ void menu_plat_setup(int is_wiz)
 \r
        i = me_id2offset(e_menu_gfx_options, MA_OPT_SCALING);\r
        e_menu_gfx_options[i].max = 1;  /* only off and sw */\r
+       i = me_id2offset(e_menu_gfx_options, MA_OPT_ARM940_SOUND);\r
+       e_menu_gfx_options[i].need_to_save = 0;\r
 }\r
 \r
 /* TODO: rename */\r