From 3a1708474fa080a364c7ed55b98e196e6cfbbf09 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Fri, 11 Jan 2013 03:28:59 -0500 Subject: Reinstate some delays needed by the code to avoid crashing, and actually explain in code comments why they're needed. I know ds2_setBacklight(unsigned int) needs a delay before it, otherwise if done too close to another call, it crashes. This partially reverts commit 8951fdff1aada126257e07699ea6f132cb8d2e65. --- source/nds/entry.cpp | 1 + source/nds/gui.c | 1 + 2 files changed, 2 insertions(+) (limited to 'source/nds') diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index 80b1221..77716da 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -609,6 +609,7 @@ 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 c64c31c..cc2196c 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -3847,6 +3847,7 @@ u32 menu(u16 *screen) ds2_flipScreen(DOWN_SCREEN, 1); copy_screen(up_screen_addr, (void*) screen, 0, 0, 256, 192); ds2_flipScreen(UP_SCREEN, UP_SCREEN_UPDATE_METHOD); + mdelay(100); ds2_setBacklight(2); wait_Allkey_release(0); -- cgit v1.2.3