cleanups, savestates, input (combos), menu
[fceu.git] / drivers / gp2x / menu.c
index 12d6dc6..a4c2a32 100644 (file)
@@ -682,7 +682,7 @@ static void draw_key_config(const bind_action_t *opts, int opt_cnt, int player_i
        // draw cursor\r
        gp2x_text_out15(x - 16, tl_y + sel*10, ">");\r
 \r
-       if (sel < 10) {\r
+       if (sel < opt_cnt) {\r
                gp2x_text_out15(30, 190, "Press a button to bind/unbind");\r
                gp2x_text_out15(30, 200, "Use VOL+ to clear");\r
                gp2x_text_out15(30, 210, "To bind UP/DOWN, hold VOL-");\r
@@ -787,8 +787,9 @@ static bind_action_t ctrl_actions[] =
 \r
 static bind_action_t emuctrl_actions[] =\r
 {\r
-       { "Save State  ", 1<<31 },\r
-       { "Load State  ", 1<<30 },\r
+       { "Save State     ", 1<<31 },\r
+       { "Load State     ", 1<<30 },\r
+       { "Next State Slot", 1<<29 },\r
 };\r
 \r
 static void kc_sel_loop(void)\r
@@ -1012,10 +1013,26 @@ static int menu_loop_options(void)
 \r
 static void draw_menu_credits(void)\r
 {\r
+       char vstr[16];\r
+\r
        //int tl_x = 15, tl_y = 70;\r
        gp2x_fceu_copy_bg();\r
 \r
-       // TODO\r
+       sprintf(vstr, "GPFCE v" GP2X_PORT_VERSION " rev%i", GP2X_PORT_REV);\r
+       gp2x_text_out15(20,  30, vstr);\r
+       gp2x_text_out15(20,  40, "(c) notaz, 2007");\r
+\r
+       gp2x_text_out15(20,  70, "Based on FCE Ultra versions");\r
+       gp2x_text_out15(20,  80, "0.81 and 0.98.15");\r
+\r
+       gp2x_text_out15(20, 110, "         - Credits - ");\r
+       gp2x_text_out15(20, 130, "Bero: FCE");\r
+       gp2x_text_out15(20, 140, "Xodnizel: FCE Ultra");\r
+       gp2x_text_out15(20, 150, "zzhu8192: original port");\r
+       gp2x_text_out15(20, 160, "rlyeh: minimal lib");\r
+       gp2x_text_out15(20, 170, "Hermes, theoddbot, god_at_hell:");\r
+       gp2x_text_out15(20, 180, "  cpuctrl, gamma libs");\r
+       gp2x_text_out15(20, 190, "Squidge: squidgehack");\r
 \r
        gp2x_video_flip();\r
 }\r
@@ -1114,6 +1131,8 @@ static int menu_loop_root(void)
                                                /*if(savestate_menu_loop(0))\r
                                                        continue;*/\r
                                                FCEUI_SaveState();\r
+                                               Exit = 0;\r
+                                               while (gp2x_joystick_read(1) & GP2X_B) usleep(50*1000);\r
                                                return 0;\r
                                        }\r
                                        break;\r
@@ -1122,6 +1141,8 @@ static int menu_loop_root(void)
                                                /*if(savestate_menu_loop(1))\r
                                                        continue;*/\r
                                                FCEUI_LoadState();\r
+                                               Exit = 0;\r
+                                               while (gp2x_joystick_read(1) & GP2X_B) usleep(50*1000);\r
                                                return 0;\r
                                        }\r
                                        break;\r