aboutsummaryrefslogtreecommitdiff
path: root/source/nds
diff options
context:
space:
mode:
authorNebuleon Fumika2013-01-11 03:28:59 -0500
committerNebuleon Fumika2013-01-11 03:28:59 -0500
commit3a1708474fa080a364c7ed55b98e196e6cfbbf09 (patch)
treecbb92b8b090eea123094b3d76a2c1f1064a4d03d /source/nds
parent736484548ea021452415a1711aab10e04b521451 (diff)
downloadsnes9x2005-3a1708474fa080a364c7ed55b98e196e6cfbbf09.tar.gz
snes9x2005-3a1708474fa080a364c7ed55b98e196e6cfbbf09.tar.bz2
snes9x2005-3a1708474fa080a364c7ed55b98e196e6cfbbf09.zip
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.
Diffstat (limited to 'source/nds')
-rw-r--r--source/nds/entry.cpp1
-rw-r--r--source/nds/gui.c1
2 files changed, 2 insertions, 0 deletions
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);