aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/nds/entry.cpp4
-rw-r--r--source/nds/gui.c10
-rw-r--r--source/nds/gui.h2
3 files changed, 10 insertions, 6 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp
index 45360a8..949cecf 100644
--- a/source/nds/entry.cpp
+++ b/source/nds/entry.cpp
@@ -540,6 +540,7 @@ int sfc_main (int argc, char **argv)
#endif
Settings.Paused = 1;
+ bool8 FirstInvocation = TRUE;
while (1)
{
@@ -564,7 +565,8 @@ int sfc_main (int argc, char **argv)
unsigned short screen[256*192];
copy_screen((void*)screen, up_screen_addr, 0, 0, 256, 192);
- menu(screen);
+ menu(screen, FirstInvocation);
+ FirstInvocation = FALSE;
game_disableAudio();
Settings.Paused = 0;
}
diff --git a/source/nds/gui.c b/source/nds/gui.c
index fd9007b..b529b9f 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -1682,7 +1682,7 @@ unsigned int frame_interval;
/*--------------------------------------------------------
Main Menu
--------------------------------------------------------*/
-u32 menu(u16 *screen)
+u32 menu(u16 *screen, bool8 FirstInvocation)
{
gui_action_type gui_action;
u32 i;
@@ -3568,9 +3568,11 @@ u32 menu(u16 *screen)
//----------------------------------------------------------------------------//
// Menu Start
ds2_setCPUclocklevel(0);
- mdelay(100); // to prevent ds2_setBacklight() from crashing
- ds2_setBacklight(3);
-
+ if (!FirstInvocation)
+ { // assume that the backlight is already at 3 when the emulator starts
+ mdelay(100); // to prevent ds2_setBacklight() from crashing
+ ds2_setBacklight(3);
+ }
wait_Allkey_release(0);
bg_screenp= (u16*)malloc(256*192*2);
diff --git a/source/nds/gui.h b/source/nds/gui.h
index 87c14e4..482ceec 100644
--- a/source/nds/gui.h
+++ b/source/nds/gui.h
@@ -124,7 +124,7 @@ extern GAME_CONFIG game_config;
/******************************************************************************
******************************************************************************/
extern void gui_init(u32 lang_id);
-extern u32 menu(u16 *original_screen);
+extern u32 menu(u16 *original_screen, bool8 FirstInvocation);
extern void game_disableAudio();
extern void game_set_frameskip();
extern void set_cpu_clock(u32 num);