1 // (c) Copyright 2006-2009 notaz, All rights reserved.
5 MB_NONE = 1, /* no auto processing */
6 MB_OPT_ONOFF, /* ON/OFF setting */
7 MB_OPT_RANGE, /* [min-max] setting */
8 MB_OPT_CUSTOM, /* custom value */
37 MA_OPT_CONFIRM_STATES,
42 MA_OPT_DISP_OPTS, /* psp */
46 MA_OPT_INTERLACED, /* giz */
47 MA_OPT_ROTATION, /* uiq */
48 MA_OPT_TEARING_FIX, /* wiz */
51 MA_OPT2_DBLBUFF, /* giz */
54 MA_OPT2_ENABLE_YM2612,
55 MA_OPT2_ENABLE_SN76496,
58 MA_OPT2_RAMTIMINGS, /* gp2x */
59 MA_OPT2_SQUIDGEHACK, /* gp2x */
60 MA_OPT2_STATUS_LINE, /* psp */
61 MA_OPT2_NO_FRAME_LIMIT, /* psp */
63 MA_OPT2_NO_SPRITE_LIM,
64 MA_OPT2_NO_IDLE_LOOPS,
66 MA_OPT3_SCALE, /* psp (all OPT3) */
77 MA_CDOPT_TESTBIOS_USA,
78 MA_CDOPT_TESTBIOS_EUR,
79 MA_CDOPT_TESTBIOS_JAP,
85 MA_CDOPT_SCALEROT_CHIP,
102 void *var; /* for on-off/range settings */
103 int mask; /* bit to toggle for on/off */
104 signed short min; /* for ranged integer settings, to be sign-extended */
109 int (*handler)(menu_id id, int keys);
110 const char * (*generate_name)(menu_id id, int *offs);
113 #define mee_handler_id(name, id, handler) \
114 { name, MB_NONE, id, NULL, 0, 0, 0, 1, 0, 1, handler, NULL }
116 #define mee_handler(name, handler) \
117 mee_handler_id(name, MA_NONE, handler)
119 #define mee_handler_mkname_id(id, handler, name_func) \
120 { "", MB_NONE, id, NULL, 0, 0, 0, 1, 0, 1, handler, name_func }
122 #define mee_label(name) \
123 { name, MB_NONE, MA_NONE, NULL, 0, 0, 0, 1, 0, 0, NULL, NULL }
125 #define mee_label_mk(id, name_func) \
126 { "", MB_NONE, id, NULL, 0, 0, 0, 1, 0, 0, NULL, name_func }
128 #define mee_onoff(name, id, var, mask) \
129 { name, MB_OPT_ONOFF, id, &(var), mask, 0, 0, 1, 1, 1, NULL, NULL }
131 #define mee_range(name, id, var, min, max) \
132 { name, MB_OPT_RANGE, id, &(var), 0, min, max, 1, 1, 1, NULL, NULL }
134 #define mee_cust(name, id, handler, name_func) \
135 { name, MB_OPT_CUSTOM, id, NULL, 0, 0, 0, 1, 1, 1, handler, name_func }
137 #define mee_onoff_cust(name, id, var, mask, name_func) \
138 { name, MB_OPT_CUSTONOFF, id, &(var), mask, 0, 0, 1, 1, 1, NULL, name_func }
140 #define mee_range_cust(name, id, var, min, max, name_func) \
141 { name, MB_OPT_CUSTRANGE, id, &(var), 0, min, max, 1, 1, 1, NULL, name_func }
144 { NULL, 0, 0, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL }
152 extern me_bind_action me_ctrl_actions[15];
153 extern me_bind_action emuctrl_actions[]; // platform code
155 void menu_init(void);
156 void menu_plat_setup(int is_wiz);
157 void text_out16(int x, int y, const char *texto, ...);
158 void me_update_msg(const char *msg);
160 void menu_loop(void);
161 int menu_loop_tray(void);
163 menu_entry *me_list_get_first(void);
164 menu_entry *me_list_get_next(void);
166 void menu_darken_bg(void *dst, int pixels, int darker);