summaryrefslogtreecommitdiffstats
path: root/apps/wps.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-04-23 09:21:37 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-04-23 09:21:37 +0000
commit28cce684a3f433200e5257eb929ee8d7a63b67ff (patch)
tree6afe48a8bd53bac805e6ae19dd58f6843af5ccf1 /apps/wps.c
parent86587527f52db8320f8d8ea48dfc76d3d93d79c8 (diff)
downloadrockbox-28cce684a3f433200e5257eb929ee8d7a63b67ff.tar.gz
rockbox-28cce684a3f433200e5257eb929ee8d7a63b67ff.zip
Changed remote control button events to separate codes. Now the remote control works while keys are locked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3586 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 0fbe8d713e..a82ebc1a80 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -574,7 +574,7 @@ static bool menu(void)
case BUTTON_MENU | BUTTON_REL:
#endif
exit = true;
- if ( !last_button ) {
+ if ( !last_button && !keys_locked ) {
lcd_stop_scroll();
if (main_menu())
@@ -807,6 +807,13 @@ int wps_show(void)
continue;
}
+ /* ignore non-remote buttons when keys are locked */
+ if (keys_locked &&
+ ! ((button & BUTTON_F1) ||
+ (button == SYS_USB_CONNECTED) ||
+ (button & BUTTON_REMOTE)))
+ continue;
+
switch(button)
{
case BUTTON_ON:
@@ -848,6 +855,7 @@ int wps_show(void)
/* play/pause */
case BUTTON_PLAY:
+ case BUTTON_RC_PLAY:
if ( paused )
{
paused = false;
@@ -879,7 +887,7 @@ int wps_show(void)
case BUTTON_UP:
case BUTTON_UP | BUTTON_REPEAT:
#endif
- case BUTTON_VOL_UP:
+ case BUTTON_RC_VOL_UP:
global_settings.volume++;
if(global_settings.volume > mpeg_sound_max(SOUND_VOLUME))
global_settings.volume = mpeg_sound_max(SOUND_VOLUME);
@@ -893,7 +901,7 @@ int wps_show(void)
case BUTTON_DOWN:
case BUTTON_DOWN | BUTTON_REPEAT:
#endif
- case BUTTON_VOL_DOWN:
+ case BUTTON_RC_VOL_DOWN:
global_settings.volume--;
if(global_settings.volume < mpeg_sound_min(SOUND_VOLUME))
global_settings.volume = mpeg_sound_min(SOUND_VOLUME);
@@ -909,6 +917,7 @@ int wps_show(void)
break;
/* prev / restart */
+ case BUTTON_RC_LEFT:
case BUTTON_LEFT | BUTTON_REL:
#ifdef HAVE_RECORDER_KEYPAD
if ( lastbutton != BUTTON_LEFT )
@@ -929,6 +938,7 @@ int wps_show(void)
break;
/* next */
+ case BUTTON_RC_RIGHT:
case BUTTON_RIGHT | BUTTON_REL:
#ifdef HAVE_RECORDER_KEYPAD
if ( lastbutton != BUTTON_RIGHT )
@@ -973,6 +983,7 @@ int wps_show(void)
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_OFF:
#else
+ case BUTTON_RC_STOP:
case BUTTON_STOP | BUTTON_REL:
if ( lastbutton != BUTTON_STOP )
break;