diff options
author | Nebuleon Fumika | 2013-03-28 05:02:46 -0400 |
---|---|---|
committer | Nebuleon Fumika | 2013-03-28 05:02:46 -0400 |
commit | 22377400908a2896130edcbd0b7933811e9f1c6c (patch) | |
tree | b9e6b0e8a8ff8dab16d2f6b2c99ac01661d1b1aa | |
parent | 9920215d9449a5fbf0daed20787efbebc10d7e31 (diff) | |
download | snes9x2005-22377400908a2896130edcbd0b7933811e9f1c6c.tar.gz snes9x2005-22377400908a2896130edcbd0b7933811e9f1c6c.tar.bz2 snes9x2005-22377400908a2896130edcbd0b7933811e9f1c6c.zip |
Restore the functionality of selection options with handler functions. This unbreaks commit 57bcab6a250a138d42735504e871ff7011974532.
-rw-r--r-- | source/nds/gui.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c index b31acee..0df85e1 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -3970,14 +3970,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation) current_option_num = next_option_num; current_option = current_menu->options + current_option_num; - if(current_option->option_type & ACTION_TYPE) - current_option->action_function(); - else if(current_menu->key_function) - { - gui_action = CURSOR_RIGHT; - current_menu->key_function(); - } - else if(current_option->option_type & (NUMBER_SELECTION_TYPE | STRING_SELECTION_TYPE)) + if(current_option->option_type & (NUMBER_SELECTION_TYPE | STRING_SELECTION_TYPE)) { gui_action = CURSOR_RIGHT; u32 current_option_val = *(current_option->current_option); @@ -3991,6 +3984,13 @@ u32 menu(u16 *screen, bool8 FirstInvocation) if(current_option->action_function) current_option->action_function(); } + else if(current_option->option_type & ACTION_TYPE) + current_option->action_function(); + else if(current_menu->key_function) + { + gui_action = CURSOR_RIGHT; + current_menu->key_function(); + } else if(current_option->option_type & SUBMENU_TYPE) choose_menu(current_option->sub_menu); } |