summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2010-04-08 14:34:14 +0000
committerJeffrey Goode <jeffg7@gmail.com>2010-04-08 14:34:14 +0000
commit7be582b5f519c548fd87356c9252ee40c02fbea4 (patch)
treeeeeec3f168bb5c3a956acf7fc163788e8a2a031a /apps/onplay.c
parente678690af019e4604302cfe40f79f068b0a3f19c (diff)
downloadrockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.tar.gz
rockbox-7be582b5f519c548fd87356c9252ee40c02fbea4.zip
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
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index d177fac2c4..61bfe66957 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -1368,6 +1368,7 @@ int onplay(char* file, int attr, int from, bool hotkey)
1368 context = from; 1368 context = from;
1369 selected_file = file; 1369 selected_file = file;
1370 selected_file_attr = attr; 1370 selected_file_attr = attr;
1371 int menu_selection;
1371#ifdef HAVE_HOTKEY 1372#ifdef HAVE_HOTKEY
1372 if (hotkey) 1373 if (hotkey)
1373 return execute_hotkey(context == CONTEXT_WPS); 1374 return execute_hotkey(context == CONTEXT_WPS);
@@ -1379,13 +1380,17 @@ int onplay(char* file, int attr, int from, bool hotkey)
1379 menu = &wps_onplay_menu; 1380 menu = &wps_onplay_menu;
1380 else 1381 else
1381 menu = &tree_onplay_menu; 1382 menu = &tree_onplay_menu;
1382 switch (do_menu(menu, NULL, NULL, false)) 1383 menu_selection = do_menu(menu, NULL, NULL, false);
1383 {
1384#ifdef HAVE_HOTKEY 1384#ifdef HAVE_HOTKEY
1385 hotkey_settable_menu = false; 1385 hotkey_settable_menu = false;
1386 switch (menu_selection)
1387 {
1386 case MENU_SELECTED_HOTKEY: 1388 case MENU_SELECTED_HOTKEY:
1387 set_hotkey(context == CONTEXT_WPS); 1389 set_hotkey(context == CONTEXT_WPS);
1388 return ONPLAY_RELOAD_DIR; 1390 return ONPLAY_RELOAD_DIR;
1391#else
1392 switch (menu_selection)
1393 {
1389#endif 1394#endif
1390 case GO_TO_WPS: 1395 case GO_TO_WPS:
1391 return ONPLAY_START_PLAY; 1396 return ONPLAY_START_PLAY;