summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 9848be0965..3934f2483f 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -84,24 +84,6 @@ static bool setvol(void)
84 return false; 84 return false;
85} 85}
86 86
87static void display_keylock_text(bool locked)
88{
89 char* s;
90 lcd_stop_scroll();
91#ifdef HAVE_LCD_CHARCELLS
92 if(locked)
93 s = str(LANG_KEYLOCK_ON_PLAYER);
94 else
95 s = str(LANG_KEYLOCK_OFF_PLAYER);
96#else
97 if(locked)
98 s = str(LANG_KEYLOCK_ON_RECORDER);
99 else
100 s = str(LANG_KEYLOCK_OFF_RECORDER);
101#endif
102 splash(HZ, true, s);
103}
104
105static bool ffwd_rew(int button) 87static bool ffwd_rew(int button)
106{ 88{
107 static const int ff_rew_steps[] = { 89 static const int ff_rew_steps[] = {
@@ -321,12 +303,32 @@ static void fade(bool fade_in)
321} 303}
322 304
323 305
306#ifdef WPS_KEYLOCK
307static void display_keylock_text(bool locked)
308{
309 char* s;
310 lcd_stop_scroll();
311#ifdef HAVE_LCD_CHARCELLS
312 if(locked)
313 s = str(LANG_KEYLOCK_ON_PLAYER);
314 else
315 s = str(LANG_KEYLOCK_OFF_PLAYER);
316#else
317 if(locked)
318 s = str(LANG_KEYLOCK_ON_RECORDER);
319 else
320 s = str(LANG_KEYLOCK_OFF_RECORDER);
321#endif
322 splash(HZ, true, s);
323}
324
324static void waitfor_nokey(void) 325static void waitfor_nokey(void)
325{ 326{
326 /* wait until all keys are released */ 327 /* wait until all keys are released */
327 while (button_get(false) != BUTTON_NONE) 328 while (button_get(false) != BUTTON_NONE)
328 yield(); 329 yield();
329} 330}
331#endif
330 332
331/* demonstrates showing different formats from playtune */ 333/* demonstrates showing different formats from playtune */
332long wps_show(void) 334long wps_show(void)
@@ -624,6 +626,7 @@ long wps_show(void)
624 restore = true; 626 restore = true;
625 break; 627 break;
626 628
629#ifdef WPS_KEYLOCK
627 /* key lock */ 630 /* key lock */
628 case WPS_KEYLOCK: 631 case WPS_KEYLOCK:
629 case WPS_KEYLOCK | BUTTON_REPEAT: 632 case WPS_KEYLOCK | BUTTON_REPEAT:
@@ -632,6 +635,7 @@ long wps_show(void)
632 restore = true; 635 restore = true;
633 waitfor_nokey(); 636 waitfor_nokey();
634 break; 637 break;
638#endif
635 639
636#if CONFIG_KEYPAD == RECORDER_PAD 640#if CONFIG_KEYPAD == RECORDER_PAD
637 /* play settings */ 641 /* play settings */