+ me_loop(e_menu_cd_options, &sel, NULL);\r
+ return 0;\r
+}\r
+\r
+// ------------ 32X options menu ------------\r
+\r
+static const char *get_rname(const char **rn, int val, int *offs)\r
+{\r
+ int i, len, found = -1, maxlen = 0;\r
+\r
+ for (i = 0; rn[i] != NULL; i++) {\r
+ len = strlen(rn[i]);\r
+ if (len > maxlen)\r
+ maxlen = len;\r
+ if (i == val)\r
+ found = i;\r
+ }\r
+\r
+ *offs = 3 - maxlen;\r
+ if (found >= 0)\r
+ return rn[found];\r
+ return "???";\r
+}\r
+\r
+static const char *mgn_opt_renderer32x(menu_id id, int *offs)\r
+{\r
+ return get_rname(renderer_names32x, currentConfig.renderer32x, offs);\r
+}\r
+\r
+static menu_entry e_menu_32x_options[] =\r
+{\r
+ mee_onoff ("32X enabled", MA_32XOPT_ENABLE_32X, PicoOpt, POPT_EN_32X),\r
+ mee_range_cust("32X renderer", MA_32XOPT_RENDERER, currentConfig.renderer32x, 0, 0, mgn_opt_renderer32x),\r
+ mee_onoff ("PWM sound", MA_32XOPT_PWM, PicoOpt, POPT_EN_PWM),\r
+ mee_end,\r
+};\r
+\r
+static int menu_loop_32x_options(menu_id id, int keys)\r
+{\r
+ static int sel = 0;\r
+ int i, c;\r
+\r
+ for (c = 0; renderer_names32x != NULL && renderer_names32x[c] != NULL; )\r
+ c++;\r
+ i = me_id2offset(e_menu_32x_options, MA_32XOPT_RENDERER);\r
+ e_menu_32x_options[i].max = c > 0 ? (c - 1) : 0;\r
+\r
+ me_loop(e_menu_32x_options, &sel, NULL);\r