From 03a0d3457b3f096bdc69c0c6511033f18317ba93 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 9 Jan 2013 02:41:00 -0500 Subject: Attempt to fix the crashing with sound interrupts, part 2: Stop the timer before the menu, and restart it after it ends. --- source/nds/gui.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/nds/gui.c') 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; } -- cgit v1.2.3