summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-08-17 12:33:36 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-08-17 12:33:36 +0000
commitf1781318d3483bac2bb5f87f4bdb96f678e6945a (patch)
tree854da549cfca5dc0e33084beb681453dbf28b4b4 /apps/gui
parent0b35bcfc7151e7e12b221d6917e31a46c73e1d3a (diff)
downloadrockbox-f1781318d3483bac2bb5f87f4bdb96f678e6945a.tar.gz
rockbox-f1781318d3483bac2bb5f87f4bdb96f678e6945a.zip
software keylock works again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10632 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps.c22
-rw-r--r--apps/gui/gwps.h2
-rw-r--r--apps/gui/statusbar.c4
3 files changed, 8 insertions, 20 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 12e120f7d4..06e7ae4aed 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -65,8 +65,6 @@ struct wps_state wps_state;
65struct gui_wps gui_wps[NB_SCREENS]; 65struct gui_wps gui_wps[NB_SCREENS];
66static struct wps_data wps_datas[NB_SCREENS]; 66static struct wps_data wps_datas[NB_SCREENS];
67 67
68bool keys_locked = false;
69
70/* change the path to the current played track */ 68/* change the path to the current played track */
71static void wps_state_update_ctp(const char *path); 69static void wps_state_update_ctp(const char *path);
72 70
@@ -163,7 +161,7 @@ long gui_wps_show(void)
163 long next_big_refresh = current_tick + HZ / 5; 161 long next_big_refresh = current_tick + HZ / 5;
164 button = BUTTON_NONE; 162 button = BUTTON_NONE;
165 while (TIME_BEFORE(current_tick, next_big_refresh)) { 163 while (TIME_BEFORE(current_tick, next_big_refresh)) {
166 button = get_action(CONTEXT_WPS,TIMEOUT_NOBLOCK); 164 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,TIMEOUT_NOBLOCK);
167 if (button != ACTION_NONE) { 165 if (button != ACTION_NONE) {
168 break; 166 break;
169 } 167 }
@@ -186,10 +184,10 @@ long gui_wps_show(void)
186 /* The peak meter is disabled 184 /* The peak meter is disabled
187 -> no additional screen updates needed */ 185 -> no additional screen updates needed */
188 else { 186 else {
189 button = get_action(CONTEXT_WPS,HZ/5); 187 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
190 } 188 }
191#else 189#else
192 button = get_action(CONTEXT_WPS,HZ/5); 190 button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
193#endif 191#endif
194 192
195 /* Exit if audio has stopped playing. This can happen if using the 193 /* Exit if audio has stopped playing. This can happen if using the
@@ -426,13 +424,6 @@ long gui_wps_show(void)
426 restore = true; 424 restore = true;
427 break; 425 break;
428 426
429 /* key lock */
430 case ACTION_STD_KEYLOCK:
431 action_setsoftwarekeylock(ACTION_STD_KEYLOCK,true);
432 display_keylock_text(true);
433 restore = true;
434 break;
435
436 427
437#ifdef HAVE_QUICKSCREEN 428#ifdef HAVE_QUICKSCREEN
438 case ACTION_WPS_QUICKSCREEN: 429 case ACTION_WPS_QUICKSCREEN:
@@ -542,6 +533,9 @@ long gui_wps_show(void)
542 restore = true; 533 restore = true;
543 break; 534 break;
544 535
536 case ACTION_REDRAW: /* yes are locked, just redraw */
537 restore = true;
538 break;
545 case ACTION_NONE: /* Timeout */ 539 case ACTION_NONE: /* Timeout */
546 update_track = true; 540 update_track = true;
547 ffwd_rew(button); /* hopefully fix the ffw/rwd bug */ 541 ffwd_rew(button); /* hopefully fix the ffw/rwd bug */
@@ -599,10 +593,6 @@ long gui_wps_show(void)
599 ab_reset_markers(); 593 ab_reset_markers();
600#endif 594#endif
601 595
602 /* Keys can be locked when exiting, so either unlock here
603 or implement key locking in tree.c too */
604 keys_locked=false;
605
606 /* set dir browser to current playing song */ 596 /* set dir browser to current playing song */
607 if (global_settings.browse_current && 597 if (global_settings.browse_current &&
608 wps_state.current_track_path[0] != '\0') 598 wps_state.current_track_path[0] != '\0')
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 5b27696dd8..2c9638d5c9 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -318,8 +318,6 @@
318#define WPS_ALIGN_CENTER 64 318#define WPS_ALIGN_CENTER 64
319#define WPS_ALIGN_LEFT 128 319#define WPS_ALIGN_LEFT 128
320 320
321
322extern bool keys_locked;
323/* wps_data*/ 321/* wps_data*/
324 322
325#ifdef HAVE_LCD_BITMAP 323#ifdef HAVE_LCD_BITMAP
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index cceb54ede6..cbd1709bbc 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -34,7 +34,7 @@
34#include "led.h" 34#include "led.h"
35 35
36#include "status.h" /* needed for battery_state global var */ 36#include "status.h" /* needed for battery_state global var */
37#include "gwps.h" /* for keys_locked */ 37#include "action.h" /* for keys_locked */
38#include "statusbar.h" 38#include "statusbar.h"
39 39
40 40
@@ -178,7 +178,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
178#ifdef HAS_BUTTON_HOLD 178#ifdef HAS_BUTTON_HOLD
179 bar->info.keylock = button_hold(); 179 bar->info.keylock = button_hold();
180#else 180#else
181 bar->info.keylock = keys_locked; 181 bar->info.keylock = is_keys_locked();
182#endif /* HAS_BUTTON_HOLD */ 182#endif /* HAS_BUTTON_HOLD */
183#ifdef HAS_REMOTE_BUTTON_HOLD 183#ifdef HAS_REMOTE_BUTTON_HOLD
184 bar->info.keylockremote = remote_button_hold(); 184 bar->info.keylockremote = remote_button_hold();