rearrange globals
[picodrive.git] / platform / gp2x / menu.c
CommitLineData
75a30842 1#include "../libpicofe/gp2x/plat_gp2x.h"
61753a67 2
3// ------------ gfx options menu ------------
4
61753a67 5
f4750ee0 6const char *men_scaling_opts[] = { "OFF", "software", "hardware", NULL };
fcdefcf6 7
d08e7326 8#define MENU_OPTIONS_GFX \
f4750ee0 9 mee_enum ("Horizontal scaling", MA_OPT_SCALING, currentConfig.scaling, men_scaling_opts), \
10 mee_enum ("Vertical scaling", MA_OPT_VSCALING, currentConfig.vscaling, men_scaling_opts), \
61753a67 11 mee_onoff ("Tearing Fix", MA_OPT_TEARING_FIX, currentConfig.EmuOpt, EOPT_WIZ_TEAR_FIX), \
75a30842 12 /*mee_onoff ("A_SN's gamma curve", MA_OPT2_A_SN_GAMMA, currentConfig.EmuOpt, EOPT_A_SN_GAMMA),*/ \
7b436906 13 mee_onoff ("Vsync", MA_OPT2_VSYNC, currentConfig.EmuOpt, EOPT_VSYNC),
61753a67 14
d08e7326 15#define MENU_OPTIONS_ADV \
93f9619e 16 mee_onoff ("Use second CPU for sound", MA_OPT_ARM940_SOUND, PicoIn.opt, POPT_EXT_FM), \
61753a67 17
f4750ee0 18
19static menu_entry e_menu_adv_options[];
20static menu_entry e_menu_gfx_options[];
21static menu_entry e_menu_options[];
45285368 22static menu_entry e_menu_keyconfig[];
f4750ee0 23
24void gp2x_menu_init(void)
25{
f4750ee0 26 /* disable by default.. */
27 me_enable(e_menu_adv_options, MA_OPT_ARM940_SOUND, 0);
28 me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 0);
29 me_enable(e_menu_gfx_options, MA_OPT2_GAMMA, 0);
30 me_enable(e_menu_gfx_options, MA_OPT2_A_SN_GAMMA, 0);
31
32 switch (gp2x_dev_id) {
33 case GP2X_DEV_GP2X:
34 me_enable(e_menu_adv_options, MA_OPT_ARM940_SOUND, 1);
35 me_enable(e_menu_gfx_options, MA_OPT2_GAMMA, 1);
36 me_enable(e_menu_gfx_options, MA_OPT2_A_SN_GAMMA, 1);
f4750ee0 37 break;
38 case GP2X_DEV_WIZ:
39 me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 1);
f4750ee0 40 break;
41 case GP2X_DEV_CAANOO:
f4750ee0 42 break;
43 default:
44 break;
45 }
46
f4750ee0 47 if (gp2x_dev_id != GP2X_DEV_GP2X)
48 men_scaling_opts[2] = NULL; /* leave only off and sw */
45285368 49
50 if (gp2x_dev_id != GP2X_DEV_CAANOO)
51 me_enable(e_menu_keyconfig, MA_CTRL_DEADZONE, 0);
f4750ee0 52}
53