diff options
| author | Jeffrey Goode <jeffg7@gmail.com> | 2010-04-08 14:34:14 +0000 |
|---|---|---|
| committer | Jeffrey Goode <jeffg7@gmail.com> | 2010-04-08 14:34:14 +0000 |
| commit | 7be582b5f519c548fd87356c9252ee40c02fbea4 (patch) | |
| tree | eeeec3f168bb5c3a956acf7fc163788e8a2a031a | |
| parent | e678690af019e4604302cfe40f79f068b0a3f19c (diff) | |
| download | rockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.zip rockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.tar.gz rockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.tar.bz2 rockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.tar.xz | |
Fix data abort due to malformed switch code. My bad.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25537 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/onplay.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index d177fac..61bfe66 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1368,6 +1368,7 @@ int onplay(char* file, int attr, int from, bool hotkey) context = from; selected_file = file; selected_file_attr = attr; + int menu_selection; #ifdef HAVE_HOTKEY if (hotkey) return execute_hotkey(context == CONTEXT_WPS); @@ -1379,13 +1380,17 @@ int onplay(char* file, int attr, int from, bool hotkey) menu = &wps_onplay_menu; else menu = &tree_onplay_menu; - switch (do_menu(menu, NULL, NULL, false)) - { + menu_selection = do_menu(menu, NULL, NULL, false); #ifdef HAVE_HOTKEY - hotkey_settable_menu = false; + hotkey_settable_menu = false; + switch (menu_selection) + { case MENU_SELECTED_HOTKEY: set_hotkey(context == CONTEXT_WPS); return ONPLAY_RELOAD_DIR; +#else + switch (menu_selection) + { #endif case GO_TO_WPS: return ONPLAY_START_PLAY; |