aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNebuleon Fumika2013-03-29 03:23:48 -0400
committerNebuleon Fumika2013-03-29 03:23:48 -0400
commit4c958cf8dd1526ff8a45472e2e241fe35250872a (patch)
tree760bfa8b3795904ade5f905e2e181534dbaaec15 /source
parent22377400908a2896130edcbd0b7933811e9f1c6c (diff)
downloadsnes9x2005-4c958cf8dd1526ff8a45472e2e241fe35250872a.tar.gz
snes9x2005-4c958cf8dd1526ff8a45472e2e241fe35250872a.tar.bz2
snes9x2005-4c958cf8dd1526ff8a45472e2e241fe35250872a.zip
Preserve the position in a menu when moving into one of its submenus.
Diffstat (limited to 'source')
-rw-r--r--source/nds/gui.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index 0df85e1..67de6cd 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -2816,6 +2816,8 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
}
}
+ MENU_TYPE latest_game_menu;
+
void load_default_setting()
{
if(bg_screenp != NULL)
@@ -2840,6 +2842,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
remove(line_buffer);
first_load= 1;
+ latest_game_menu.focus_option = latest_game_menu.screen_focus = 0;
init_emulator_config();
init_game_config();
@@ -3169,7 +3172,6 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
/*--------------------------------------------------------
Load_game
--------------------------------------------------------*/
- MENU_TYPE latest_game_menu;
MENU_OPTION_TYPE load_game_options[] =
{
@@ -3232,7 +3234,6 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
void main_menu_passive()
{
show_icon(down_screen_addr, &ICON_MAINBG, 0, 0);
- current_menu -> focus_option = current_option -> line_number;
//Audio/Video
strcpy(line_buffer, *(display_option->display_string));
@@ -3756,6 +3757,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
if(current_menu->end_function)
current_menu->end_function();
SaveConfigsIfNeeded();
+ current_menu->focus_option = current_menu->screen_focus = current_option_num;
}
current_menu = new_menu;