X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fmenu.c;h=9bc880a347b86dfe4524d27b0043262de597c6be;hb=b846453101c070b93938dd2224f0cca130a55e8c;hp=05d0903570b66d0858622bcd8da69cf545ed9ce2;hpb=446b090ceade65a57b2f97493d6670ffb236a747;p=libpicofe.git diff --git a/gp2x/menu.c b/gp2x/menu.c index 05d0903..9bc880a 100644 --- a/gp2x/menu.c +++ b/gp2x/menu.c @@ -25,7 +25,7 @@ #include #ifndef _DIRENT_HAVE_D_TYPE -#error "need d_type for file browser +#error "need d_type for file browser" #endif extern int mmuhack_status; @@ -37,16 +37,16 @@ const char * const keyNames[] = { "???", "???", "???", "PUSH", "???", "???", "???", "???" }; -static void menu_darken_bg(void *dst, int pixels, int darker); +void menu_darken_bg(void *dst, int pixels, int darker); static void menu_prepare_bg(int use_game_bg); static unsigned long inp_prev = 0; static int inp_prevjoy = 0; -static unsigned long wait_for_input(unsigned long interesting) +unsigned long wait_for_input(unsigned long interesting) { unsigned long ret; - static int repeats = 0, wait = 6; + static int repeats = 0, wait = 20; int release = 0, i; if (repeats == 2) wait = 3; @@ -65,8 +65,10 @@ static unsigned long wait_for_input(unsigned long interesting) if (release || ret != inp_prev) { repeats = 0; - wait = 6; + wait = 20; } + if (wait > 6 && (ret&(GP2X_UP|GP2X_LEFT|GP2X_DOWN|GP2X_RIGHT|GP2X_L|GP2X_R))) + wait = 6; inp_prev = ret; inp_prevjoy = 0; @@ -130,7 +132,7 @@ static unsigned long wait_for_input_usbjoy(unsigned long interesting, int *joy) return ret; } -static void menu_flip(void) +void menu_flip(void) { gp2x_video_flush_cache(); gp2x_video_flip2(); @@ -427,36 +429,6 @@ rescan: return ret; } -// ------------ debug menu ------------ - -char *debugString(void); - -static void draw_debug(void) -{ - char *p, *str = debugString(); - int len, line; - - gp2x_pd_clone_buffer2(); - - p = str; - for (line = 0; line < 24; line++) - { - while (*p && *p != '\n') p++; - len = p - str; - if (len > 55) len = 55; - smalltext_out16_lim(1, line*10, str, 0xffff, len); - if (*p == 0) break; - p++; str = p; - } - menu_flip(); -} - -static void debug_menu_loop(void) -{ - draw_debug(); - wait_for_input(GP2X_B|GP2X_X); -} - // ------------ patch/gg menu ------------ static void draw_patchlist(int sel) @@ -567,7 +539,7 @@ static void draw_savestate_bg(int slot) areaClose(file); } - emu_forcedFrame(); + emu_forcedFrame(POPT_EN_SOFTSCALE); menu_prepare_bg(1); memcpy(Pico.vram, tmp_vram, sizeof(Pico.vram)); @@ -1073,6 +1045,7 @@ menu_entry opt2_entries[] = { "craigix's RAM timings", MB_ONOFF, MA_OPT2_RAMTIMINGS, ¤tConfig.EmuOpt, 0x0100, 0, 0, 1, 1 }, { NULL, MB_ONOFF, MA_OPT2_SQUIDGEHACK, ¤tConfig.EmuOpt, 0x0010, 0, 0, 1, 1 }, { "SVP dynarec", MB_ONOFF, MA_OPT2_SVP_DYNAREC, &PicoOpt, 0x20000, 0, 0, 1, 1 }, + { "Disable idle loop patching",MB_ONOFF, MA_OPT2_NO_IDLE_LOOPS, &PicoOpt, 0x80000, 0, 0, 1, 1 }, { "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1, 0 }, }; @@ -1147,8 +1120,7 @@ menu_entry opt_entries[] = { { NULL, MB_NONE, MA_OPT_RENDERER, NULL, 0, 0, 0, 1, 1 }, { NULL, MB_RANGE, MA_OPT_SCALING, ¤tConfig.scaling, 0, 0, 3, 1, 1 }, - { "Accurate timing (slower)", MB_ONOFF, MA_OPT_ACC_TIMING, &PicoOpt, 0x040, 0, 0, 1, 1 }, - { "Accurate sprites (slower)", MB_ONOFF, MA_OPT_ACC_SPRITES, &PicoOpt, 0x080, 0, 0, 1, 1 }, + { "Accurate sprites", MB_ONOFF, MA_OPT_ACC_SPRITES, &PicoOpt, 0x080, 0, 0, 0, 1 }, { "Show FPS", MB_ONOFF, MA_OPT_SHOW_FPS, ¤tConfig.EmuOpt, 0x002, 0, 0, 1, 1 }, { NULL, MB_RANGE, MA_OPT_FRAMESKIP, ¤tConfig.Frameskip, 0, -1, 16, 1, 1 }, { "Enable sound", MB_ONOFF, MA_OPT_ENABLE_SOUND, ¤tConfig.EmuOpt, 0x004, 0, 0, 1, 1 }, @@ -1426,7 +1398,7 @@ static int menu_loop_options(void) static void draw_menu_credits(void) { - int tl_x = 15, tl_y = 64, y; + int tl_x = 15, tl_y = 56, y; gp2x_pd_clone_buffer2(); text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006-2008"); @@ -1436,17 +1408,19 @@ static void draw_menu_credits(void) text_out16(tl_x, (y+=10), " base code of PicoDrive"); text_out16(tl_x, (y+=10), "Reesy & FluBBa: DrZ80 core"); text_out16(tl_x, (y+=10), "MAME devs: YM2612 and SN76496 cores"); - text_out16(tl_x, (y+=10), "Charles MacDonald: Genesis hw docs"); - text_out16(tl_x, (y+=10), "Stephane Dallongeville:"); - text_out16(tl_x, (y+=10), " opensource Gens"); - text_out16(tl_x, (y+=10), "Haze: Genesis hw info"); text_out16(tl_x, (y+=10), "rlyeh and others: minimal SDK"); text_out16(tl_x, (y+=10), "Squidge: squidgehack"); text_out16(tl_x, (y+=10), "Dzz: ARM940 sample"); - text_out16(tl_x, (y+=10), "GnoStiC / Puck2099: USB joystick"); + text_out16(tl_x, (y+=10), "GnoStiC / Puck2099: USB joy code"); text_out16(tl_x, (y+=10), "craigix: GP2X hardware"); text_out16(tl_x, (y+=10), "ketchupgun: skin design"); + text_out16(tl_x, (y+=20), "special thanks (for docs, ideas):"); + text_out16(tl_x, (y+=10), " Charles MacDonald, Haze,"); + text_out16(tl_x, (y+=10), " Stephane Dallongeville,"); + text_out16(tl_x, (y+=10), " Lordus, Exophase, Rokas,"); + text_out16(tl_x, (y+=10), " Nemesis, Tasco Deluxe"); + menu_flip(); } @@ -1611,7 +1585,7 @@ static void menu_loop_root(void) } } -static void menu_darken_bg(void *dst, int pixels, int darker) +void menu_darken_bg(void *dst, int pixels, int darker) { unsigned int *screen = dst; pixels /= 2;