diff options
author | Nebuleon Fumika | 2013-01-12 20:35:47 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-01-12 20:35:47 -0500 |
commit | 99b19abca3f0fb298df09e28b6517a9657caf32a (patch) | |
tree | dc06b1e0ad445fdc8f1be9b8ef41f0dd8b30b445 | |
parent | 253902a30df12755a6d36eb4129bd5522c67abc6 (diff) | |
download | snesemu-99b19abca3f0fb298df09e28b6517a9657caf32a.tar.gz snesemu-99b19abca3f0fb298df09e28b6517a9657caf32a.tar.bz2 snesemu-99b19abca3f0fb298df09e28b6517a9657caf32a.zip |
Remove 2 extraneous delays. The 100-millisecond delays before ds2_setBacklight() MUST STAY, however, otherwise the emulator can crash with the bottom backlight off if a touch is recognised twice in a row. That happens with some broken styluses, so it's not unexpected.
-rw-r--r-- | source/nds/entry.cpp | 1 | ||||
-rw-r--r-- | source/nds/gui.c | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index cebb12e..90428d3 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -618,7 +618,6 @@ int sfc_main (int argc, char **argv) if (Settings.Paused) { S9xSetSoundMute (TRUE); - mdelay(50); // to allow time for the screen to be drawn unsigned short screen[256*192]; copy_screen((void*)screen, up_screen_addr, 0, 0, 256, 192); diff --git a/source/nds/gui.c b/source/nds/gui.c index cc2196c..0882b6f 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -1652,7 +1652,6 @@ unsigned int frame_interval; u32 menu(u16 *screen) { stopTimer(0 /* timer interrupt channel for sound */); - mdelay(100); // to prevent ds2_setBacklight() from freezing/crashing gui_action_type gui_action; u32 i; u32 repeat; @@ -3386,7 +3385,7 @@ u32 menu(u16 *screen) //----------------------------------------------------------------------------// // Menu Start ds2_setCPUclocklevel(0); - // mdelay(200); // Delete this delay + mdelay(100); // to prevent ds2_setBacklight() from crashing ds2_setBacklight(3); @@ -3419,13 +3418,11 @@ u32 menu(u16 *screen) } choose_menu(&main_menu); + // Menu loop while(repeat) { - - - display_option = current_menu->options; string_select= 0; @@ -3844,13 +3841,14 @@ u32 menu(u16 *screen) set_cpu_clock(clock_speed_number); ds2_clearScreen(DOWN_SCREEN, 0); - ds2_flipScreen(DOWN_SCREEN, 1); + ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); copy_screen(up_screen_addr, (void*) screen, 0, 0, 256, 192); ds2_flipScreen(UP_SCREEN, UP_SCREEN_UPDATE_METHOD); - mdelay(100); + wait_Allkey_release(0); + + mdelay(100); // to prevent ds2_setBacklight() from crashing ds2_setBacklight(2); - wait_Allkey_release(0); runTimer(0 /* timer interrupt channel for sound */); return return_value; |