summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-10-26 03:05:50 +0200
committerChristian Soffke <christian.soffke@gmail.com>2022-10-25 03:26:51 +0200
commit193ebb5a36374acbe379fe573317f9b668e65e4f (patch)
treec5163b68d97de8d3da4a4ddbf932dd933250c628 /apps/gui/wps.c
parent498988d34a50bb5fe32cf1092f11e3c10a0ac821 (diff)
downloadrockbox-193ebb5a36374acbe379fe573317f9b668e65e4f.tar.gz
rockbox-193ebb5a36374acbe379fe573317f9b668e65e4f.zip
Enable access to Shortcuts Menu from QuickScreen
Offers a quick way of switching to the Shortcuts Menu by pressing the 'context menu' button while QuickScreen is active (e.g. long press Select on iPods and some other players) Change-Id: I38292c7070cf093a81e1db688809b1f0d6a8764a
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 2587542b00..5b973a2199 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -53,6 +53,7 @@
53#include "root_menu.h" 53#include "root_menu.h"
54#include "backdrop.h" 54#include "backdrop.h"
55#include "quickscreen.h" 55#include "quickscreen.h"
56#include "shortcuts.h"
56#include "pitchscreen.h" 57#include "pitchscreen.h"
57#include "appevents.h" 58#include "appevents.h"
58#include "viewport.h" 59#include "viewport.h"
@@ -839,15 +840,24 @@ long gui_wps_show(void)
839 case ACTION_WPS_QUICKSCREEN: 840 case ACTION_WPS_QUICKSCREEN:
840 { 841 {
841 gwps_leave_wps(); 842 gwps_leave_wps();
842 if (global_settings.shortcuts_replaces_qs) 843 bool enter_shortcuts_menu = global_settings.shortcuts_replaces_qs;
844 if (!enter_shortcuts_menu)
843 { 845 {
844 global_status.last_screen = GO_TO_SHORTCUTMENU;
845 int ret = quick_screen_quick(button); 846 int ret = quick_screen_quick(button);
847 if (ret == QUICKSCREEN_IN_USB)
848 return GO_TO_ROOT;
849 else if (ret == QUICKSCREEN_GOTO_SHORTCUTS_MENU)
850 enter_shortcuts_menu = true;
851 else
852 restore = true;
853 }
854
855 if (enter_shortcuts_menu)
856 {
857 global_status.last_screen = GO_TO_SHORTCUTMENU;
858 int ret = do_shortcut_menu(NULL);
846 return (ret == GO_TO_PREVIOUS ? GO_TO_WPS : ret); 859 return (ret == GO_TO_PREVIOUS ? GO_TO_WPS : ret);
847 } 860 }
848 else if (quick_screen_quick(button) > 0)
849 return GO_TO_ROOT;
850 restore = true;
851 } 861 }
852 break; 862 break;
853#endif /* HAVE_QUICKSCREEN */ 863#endif /* HAVE_QUICKSCREEN */