X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpandora%2Fmenu.c;h=f591ec14ad62fb00c7fb799495583cacb69ca35b;hb=d4d626658a7a999f48009f408b4a22d280ab80ea;hp=be822cfcba1fec8ef5ba907f6986610a5df18a9b;hpb=21ebcfd322972ea5579bb5d4bedee9e509b42785;p=picodrive.git diff --git a/platform/pandora/menu.c b/platform/pandora/menu.c index be822cf..f591ec1 100644 --- a/platform/pandora/menu.c +++ b/platform/pandora/menu.c @@ -5,8 +5,6 @@ static const char h_scaler[] = "Scalers for 40 and 32 column modes\n" "(320 and 256 pixel wide horizontal)"; static const char h_cscaler[] = "Displays the scaler layer, you can resize it\n" "using d-pad or move it using R+d-pad"; -static const char *men_dummy[] = { NULL }; -char **pnd_filter_list; static int menu_loop_cscaler(int id, int keys) { @@ -19,12 +17,13 @@ static int menu_loop_cscaler(int id, int keys) for (;;) { - menu_draw_begin(0); + menu_draw_begin(0, 1); memset(g_menuscreen_ptr, 0, g_menuscreen_w * g_menuscreen_h * 2); text_out16(2, 480 - 18, "%dx%d | d-pad to resize, R+d-pad to move", g_layer_cw, g_layer_ch); menu_draw_end(); - inp = in_menu_wait(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_R|PBTN_MOK|PBTN_MBACK, 40); + inp = in_menu_wait(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT + |PBTN_R|PBTN_MOK|PBTN_MBACK, NULL, 40); if (inp & PBTN_UP) g_layer_cy--; if (inp & PBTN_DOWN) g_layer_cy++; if (inp & PBTN_LEFT) g_layer_cx--; @@ -61,7 +60,6 @@ static int menu_loop_cscaler(int id, int keys) #define MENU_OPTIONS_GFX \ mee_enum_h ("Scaler", MA_OPT_SCALING, currentConfig.scaling, \ men_scaler, h_scaler), \ - mee_enum ("Filter", MA_OPT3_FILTERING, currentConfig.filter, men_dummy), \ mee_onoff ("Vsync", MA_OPT2_VSYNC, currentConfig.EmuOpt, EOPT_VSYNC), \ mee_cust_h ("Setup custom scaler", MA_NONE, menu_loop_cscaler, NULL, h_cscaler), \ mee_range_hide("layer_x", MA_OPT3_LAYER_X, g_layer_cx, 0, 640), \ @@ -75,70 +73,13 @@ static int menu_loop_cscaler(int id, int keys) #define menu_main_plat_draw NULL -#include -#include - static menu_entry e_menu_gfx_options[]; static menu_entry e_menu_options[]; static menu_entry e_menu_keyconfig[]; void pnd_menu_init(void) { - struct dirent *ent; - int i, count = 0; - char **mfilters; - char buff[64], *p; - DIR *dir; - - dir = opendir("/etc/pandora/conf/dss_fir"); - if (dir == NULL) { - perror("filter opendir"); - return; - } - - while (1) { - errno = 0; - ent = readdir(dir); - if (ent == NULL) { - if (errno != 0) - perror("readdir"); - break; - } - p = strstr(ent->d_name, "_up"); - if (p != NULL && (p[3] == 0 || !strcmp(p + 3, "_h"))) - count++; - } - - if (count == 0) - return; - - mfilters = calloc(count + 1, sizeof(mfilters[0])); - if (mfilters == NULL) - return; - - rewinddir(dir); - for (i = 0; (ent = readdir(dir)); ) { - size_t len; - - p = strstr(ent->d_name, "_up"); - if (p == NULL || (p[3] != 0 && strcmp(p + 3, "_h"))) - continue; - - len = p - ent->d_name; - if (len > sizeof(buff) - 1) - continue; - - strncpy(buff, ent->d_name, len); - buff[len] = 0; - mfilters[i] = strdup(buff); - if (mfilters[i] != NULL) - i++; - } - closedir(dir); - - i = me_id2offset(e_menu_gfx_options, MA_OPT3_FILTERING); - e_menu_gfx_options[i].data = (void *)mfilters; - pnd_filter_list = mfilters; + int i; i = me_id2offset(e_menu_options, MA_OPT_CPU_CLOCKS); e_menu_options[i].name = "Max CPU clock";