bugfix, sprites adjustment
[picodrive.git] / platform / gizmondo / menu.c
index 64222e5..33c6fc0 100644 (file)
@@ -48,16 +48,17 @@ static unsigned int inp_prev = 0;
 \r
 static unsigned long wait_for_input(unsigned int interesting)\r
 {\r
-       unsigned int ret;\r
-       static int repeats = 0, wait = 50;\r
+       unsigned long ret;\r
+       static int repeats = 0, wait = 20;\r
        int release = 0, i;\r
 \r
-       if (repeats == 2 || repeats == 4) wait /= 2;\r
-       if (repeats == 6) wait = 15;\r
+       if      (repeats == 2) wait = 3;\r
+       else if (repeats == 4) wait = 2;\r
+       else if (repeats == 6) wait = 1;\r
 \r
-       for (i = 0; i < 6 && inp_prev == Framework_PollGetButtons(); i++) {\r
+       for (i = 0; i < wait && inp_prev == Framework_PollGetButtons(); i++) {\r
                if (i == 0) repeats++;\r
-               Sleep(wait);\r
+               Sleep(30);\r
        }\r
 \r
        while ( !((ret = Framework_PollGetButtons()) & interesting) ) {\r
@@ -67,8 +68,10 @@ static unsigned long wait_for_input(unsigned int interesting)
 \r
        if (release || ret != inp_prev) {\r
                repeats = 0;\r
-               wait = 50;\r
+               wait = 20;\r
        }\r
+       if (wait > 6 && (ret&(BTN_UP|BTN_LEFT|BTN_DOWN|BTN_RIGHT|BTN_L|BTN_R)))\r
+               wait = 6;\r
        inp_prev = ret;\r
 \r
        // we don't need diagonals in menus\r
@@ -575,7 +578,7 @@ static void draw_savestate_bg(int slot)
                areaClose(file);\r
        }\r
 \r
-       emu_forcedFrame();\r
+       emu_forcedFrame(POPT_EN_SOFTSCALE);\r
        menu_prepare_bg(1);\r
 \r
        memcpy(Pico.vram, tmp_vram, sizeof(Pico.vram));\r
@@ -1042,7 +1045,6 @@ menu_entry opt_entries[] =
        { NULL,                        MB_NONE,  MA_OPT_RENDERER,      NULL, 0, 0, 0, 1 },\r
        { "Scanline mode (faster)",    MB_ONOFF, MA_OPT_INTERLACED,    &currentConfig.EmuOpt,  0x4000, 0, 0, 1 },\r
        { "Scale low res mode",        MB_ONOFF, MA_OPT_SCALING,       &currentConfig.scaling, 0x0001, 0, 3, 1 },\r
-       { "Accurate timing (slower)",  MB_ONOFF, MA_OPT_ACC_TIMING,    &currentConfig.PicoOpt, 0x0040, 0, 0, 1 },\r
        { "Accurate sprites (slower)", MB_ONOFF, MA_OPT_ACC_SPRITES,   &currentConfig.PicoOpt, 0x0080, 0, 0, 1 },\r
        { "Show FPS",                  MB_ONOFF, MA_OPT_SHOW_FPS,      &currentConfig.EmuOpt,  0x0002, 0, 0, 1 },\r
        { NULL,                        MB_RANGE, MA_OPT_FRAMESKIP,     &currentConfig.Frameskip, 0, -1, 16, 1 },\r
@@ -1312,7 +1314,7 @@ static int menu_loop_options(void)
 \r
 static void draw_menu_credits(void)\r
 {\r
-       int tl_x = 15, tl_y = 64, y;\r
+       int tl_x = 15, tl_y = 56, y;\r
        menu_draw_begin(1);\r
 \r
        text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006-2008");\r
@@ -1323,14 +1325,16 @@ static void draw_menu_credits(void)
        text_out16(tl_x, (y+=10), "      base code of PicoDrive");\r
        text_out16(tl_x, (y+=10), "Reesy & FluBBa: DrZ80 core");\r
        text_out16(tl_x, (y+=10), "MAME devs: YM2612 and SN76496 cores");\r
-       text_out16(tl_x, (y+=10), "Charles MacDonald: Genesis hw docs");\r
-       text_out16(tl_x, (y+=10), "Stephane Dallongeville:");\r
-       text_out16(tl_x, (y+=10), "      opensource Gens");\r
-       text_out16(tl_x, (y+=10), "Haze: Genesis hw info");\r
        text_out16(tl_x, (y+=10), "Reesy: kgsdk wrapper, sound code");\r
        text_out16(tl_x, (y+=10), "jens.l: gizmondo hardware");\r
        text_out16(tl_x, (y+=10), "ketchupgun: skin design");\r
 \r
+       text_out16(tl_x, (y+=20), "special thanks (for docs, ideas)");\r
+       text_out16(tl_x, (y+=10), " Charles MacDonald, Haze,");\r
+       text_out16(tl_x, (y+=10), " Stephane Dallongeville,");\r
+       text_out16(tl_x, (y+=10), " Lordus, Exophase, Rokas,");\r
+       text_out16(tl_x, (y+=10), " Nemesis, Tasco Deluxe");\r
+\r
        menu_draw_end();\r
 }\r
 \r
@@ -1430,6 +1434,7 @@ static void menu_loop_root(void)
                                        if (rom_loaded) {\r
                                                if(savestate_menu_loop(1))\r
                                                        continue;\r
+                                               while (Framework_PollGetButtons() & BTN_PLAY) Sleep(50);\r
                                                engineState = PGS_Running;\r
                                                return;\r
                                        }\r
@@ -1437,6 +1442,7 @@ static void menu_loop_root(void)
                                case MA_MAIN_RESET_GAME:\r
                                        if (rom_loaded) {\r
                                                emu_ResetGame();\r
+                                               while (Framework_PollGetButtons() & BTN_PLAY) Sleep(50);\r
                                                engineState = PGS_Running;\r
                                                return;\r
                                        }\r