summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2004-06-10 21:47:43 +0000
committerBjörn Stenberg <bjorn@haxx.se>2004-06-10 21:47:43 +0000
commit01db3ba568ba4b07b72c426709be092e443ac233 (patch)
treeb906041780f20bfdae873f97da68656735479af7
parent1541baca471bc2528c392f112f5f36b6f51086c3 (diff)
Keylock now locks combo keys too (mute, id3 viewer etc)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4732 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/wps.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/apps/wps.c b/apps/wps.c
index f1b0e214a7..0f393a0faf 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -499,6 +499,33 @@ static bool menu(void)
while (!exit) {
int button = button_get(true);
+
+ /* these are never locked */
+ switch (button)
+ {
+ /* key lock */
+#ifdef HAVE_RECORDER_KEYPAD
+ case BUTTON_F1 | BUTTON_DOWN:
+#else
+ case BUTTON_MENU | BUTTON_STOP:
+#endif
+ keys_locked = !keys_locked;
+ display_keylock_text(keys_locked);
+ exit = true;
+ while (button_get(false)); /* clear button queue */
+ break;
+
+ case SYS_USB_CONNECTED:
+ status_set_playmode(STATUS_STOP);
+ usb_screen();
+ keys_locked = false;
+ return true;
+ }
+
+ if (keys_locked) {
+ display_keylock_text(true);
+ break;
+ }
switch ( button ) {
/* go into menu */
@@ -539,18 +566,6 @@ static bool menu(void)
display_mute_text(muted);
break;
- /* key lock */
-#ifdef HAVE_RECORDER_KEYPAD
- case BUTTON_F1 | BUTTON_DOWN:
-#else
- case BUTTON_MENU | BUTTON_STOP:
-#endif
- keys_locked = !keys_locked;
- display_keylock_text(keys_locked);
- exit = true;
- while (button_get(false)); /* clear button queue */
- break;
-
#ifdef BUTTON_MENU
/* change volume */
case BUTTON_MENU | BUTTON_LEFT:
@@ -584,11 +599,6 @@ static bool menu(void)
#endif
exit = true;
break;
-
- case SYS_USB_CONNECTED:
- status_set_playmode(STATUS_STOP);
- usb_screen();
- return true;
}
last_button = button;
}