aboutsummaryrefslogtreecommitdiff
path: root/source/nds/gui.c
diff options
context:
space:
mode:
authorNebuleon Fumika2013-01-09 02:41:00 -0500
committerNebuleon Fumika2013-01-09 03:21:44 -0500
commit03a0d3457b3f096bdc69c0c6511033f18317ba93 (patch)
treea94335d9a09fd30c1fd92f0b0afb38ce0753eb67 /source/nds/gui.c
parent3585aa1c2a7af48728486d76a45efce7599b6ff6 (diff)
downloadsnes9x2005-03a0d3457b3f096bdc69c0c6511033f18317ba93.tar.gz
snes9x2005-03a0d3457b3f096bdc69c0c6511033f18317ba93.tar.bz2
snes9x2005-03a0d3457b3f096bdc69c0c6511033f18317ba93.zip
Attempt to fix the crashing with sound interrupts, part 2: Stop the timer before the menu, and restart it after it ends.
Diffstat (limited to 'source/nds/gui.c')
-rw-r--r--source/nds/gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index c778ae1..7913481 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -1651,7 +1651,8 @@ unsigned int frame_interval;
--------------------------------------------------------*/
u32 menu(u16 *screen)
{
- mdelay(50); // to prevent the touch key from being applied too soon?
+ 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;
@@ -3849,6 +3850,7 @@ u32 menu(u16 *screen)
ds2_setBacklight(2);
wait_Allkey_release(0);
+ runTimer(0 /* timer interrupt channel for sound */);
return return_value;
}