diff options
author | Nebuleon Fumika | 2012-12-25 03:18:36 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2012-12-26 11:29:41 -0500 |
commit | 7f0e1fee814df6c44ced04246f511b0f91787673 (patch) | |
tree | 295a5af578ba4e4f53de7173d4875c878645e2c3 /source | |
parent | 328b5bd6c17330d5213ed28c6fa29ca9a2fac444 (diff) | |
download | snesemu-7f0e1fee814df6c44ced04246f511b0f91787673.tar.gz snesemu-7f0e1fee814df6c44ced04246f511b0f91787673.tar.bz2 snesemu-7f0e1fee814df6c44ced04246f511b0f91787673.zip |
Wait for keys to be released after the yes/no dialog for deleting saved states, instead of delaying.
Diffstat (limited to 'source')
-rw-r--r-- | source/nds/gui.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c index 91e1aa3..964944b 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -2170,6 +2170,7 @@ u32 menu(u16 *screen) { if(draw_yesno_dialog(DOWN_SCREEN, 115, "Yes(A)", "No(B)")) { + wait_Allkey_release(0); for(i= 0; i < SAVE_STATE_SLOT_NUM; i++) { get_savestate_filename(i, tmp_filename); @@ -2198,8 +2199,10 @@ u32 menu(u16 *screen) sprintf(line_buffer, msg[MSG_DELETTE_SINGLE_SAVESTATE_WARING], delette_savestate_num); draw_string_vcenter(down_screen_addr, 36, 75, 190, COLOR_MSSG, line_buffer); - if(draw_yesno_dialog(DOWN_SCREEN, 115, "Yes(A)", "No(B)")) + if(draw_yesno_dialog(DOWN_SCREEN, 115, "Yes(A)", "No(B)")) { + wait_Allkey_release(0); clear_savestate_slot(delette_savestate_num); +} } else { @@ -2740,6 +2743,7 @@ u32 menu(u16 *screen) if(draw_yesno_dialog(DOWN_SCREEN, 115, "Yes", "No")) { + wait_Allkey_release(0); draw_message(down_screen_addr, bg_screenp, 28, 31, 227, 165, bg_screenp_color); draw_string_vcenter(down_screen_addr, 36, 80, 190, COLOR_MSSG, msg[MSG_DEFAULT_LOADING]); ds2_flipScreen(DOWN_SCREEN, 2); @@ -2803,11 +2807,10 @@ u32 menu(u16 *screen) ds2_clearScreen(UP_SCREEN, 0); draw_string_vcenter(up_screen_addr, 0, 80, 256, COLOR_WHITE, msg[MSG_NON_LOAD_GAME]); ds2_flipScreen(UP_SCREEN, 1); - mdelay(10); //FIXME: Stranger? } save_emu_config_file(); - // mdelay(500); // Delete this delay + wait_Allkey_release(0); } } @@ -3556,6 +3559,11 @@ u32 menu(u16 *screen) } else { + /* + * It's pretty complicated. These two flips are needed because, + * otherwise, the menu freezes if S9xAutoSaveSRAM was called after + * loading from a save state. + */ ds2_flipScreen(UP_SCREEN, 1); ds2_flipScreen(UP_SCREEN, 1); } @@ -3563,7 +3571,6 @@ u32 menu(u16 *screen) choose_menu(&main_menu); // Menu loop - // mdelay(50); // Delete this delay, shortened from 200 while(repeat) { |