diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-06-26 21:13:14 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-06-26 21:13:14 +0000 |
commit | 9e376a557dd3ad8a29879ac534b0569428b0c92a (patch) | |
tree | 1e092e3bed60c1550bd6b2a6923720a0620586bd | |
parent | c567bb9c9544a26618347accbab692a2a610eac8 (diff) | |
download | rockbox-9e376a557dd3ad8a29879ac534b0569428b0c92a.tar.gz rockbox-9e376a557dd3ad8a29879ac534b0569428b0c92a.zip |
Iriver: remote FFWD/REW support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6883 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 20 | ||||
-rw-r--r-- | apps/wps.h | 12 |
2 files changed, 27 insertions, 5 deletions
diff --git a/apps/wps.c b/apps/wps.c index f05109872d..be0ad448dd 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -105,8 +105,14 @@ static bool ffwd_rew(int button) | |||
105 | while (!exit) { | 105 | while (!exit) { |
106 | switch ( button ) { | 106 | switch ( button ) { |
107 | case WPS_FFWD: | 107 | case WPS_FFWD: |
108 | #ifdef WPS_RC_FFWD | ||
109 | case WPS_RC_FFWD: | ||
110 | #endif | ||
108 | direction = 1; | 111 | direction = 1; |
109 | case WPS_REW: | 112 | case WPS_REW: |
113 | #ifdef WPS_RC_REW | ||
114 | case WPS_RC_REW: | ||
115 | #endif | ||
110 | if (ff_rewind) | 116 | if (ff_rewind) |
111 | { | 117 | { |
112 | if (direction == 1) | 118 | if (direction == 1) |
@@ -186,6 +192,10 @@ static bool ffwd_rew(int button) | |||
186 | 192 | ||
187 | case WPS_PREV: | 193 | case WPS_PREV: |
188 | case WPS_NEXT: | 194 | case WPS_NEXT: |
195 | #ifdef WPS_RC_PREV | ||
196 | case WPS_RC_PREV: | ||
197 | case WPS_RC_NEXT: | ||
198 | #endif | ||
189 | audio_ff_rewind(id3->elapsed+ff_rewind_count); | 199 | audio_ff_rewind(id3->elapsed+ff_rewind_count); |
190 | ff_rewind_count = 0; | 200 | ff_rewind_count = 0; |
191 | ff_rewind = false; | 201 | ff_rewind = false; |
@@ -576,7 +586,7 @@ long wps_show(void) | |||
576 | case WPS_REW: | 586 | case WPS_REW: |
577 | #ifdef WPS_RC_FFWD | 587 | #ifdef WPS_RC_FFWD |
578 | case WPS_RC_FFWD: | 588 | case WPS_RC_FFWD: |
579 | case WPS_RC_RWD: | 589 | case WPS_RC_REW: |
580 | #endif | 590 | #endif |
581 | ffwd_rew(button); | 591 | ffwd_rew(button); |
582 | break; | 592 | break; |
@@ -589,6 +599,10 @@ long wps_show(void) | |||
589 | #endif | 599 | #endif |
590 | #ifdef WPS_RC_PREV | 600 | #ifdef WPS_RC_PREV |
591 | case WPS_RC_PREV: | 601 | case WPS_RC_PREV: |
602 | #ifdef WPS_RC_PREV_PRE | ||
603 | if ((button == WPS_RC_PREV) && (lastbutton != WPS_RC_PREV_PRE)) | ||
604 | break; | ||
605 | #endif | ||
592 | #endif | 606 | #endif |
593 | if (!id3 || (id3->elapsed < 3*1000)) { | 607 | if (!id3 || (id3->elapsed < 3*1000)) { |
594 | audio_prev(); | 608 | audio_prev(); |
@@ -612,6 +626,10 @@ long wps_show(void) | |||
612 | #endif | 626 | #endif |
613 | #ifdef WPS_RC_NEXT | 627 | #ifdef WPS_RC_NEXT |
614 | case WPS_RC_NEXT: | 628 | case WPS_RC_NEXT: |
629 | #ifdef WPS_RC_NEXT_PRE | ||
630 | if ((button == WPS_RC_NEXT) && (lastbutton != WPS_RC_NEXT_PRE)) | ||
631 | break; | ||
632 | #endif | ||
615 | #endif | 633 | #endif |
616 | audio_next(); | 634 | audio_next(); |
617 | break; | 635 | break; |
diff --git a/apps/wps.h b/apps/wps.h index 94a6b04859..3fac42d648 100644 --- a/apps/wps.h +++ b/apps/wps.h | |||
@@ -42,15 +42,19 @@ | |||
42 | #define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) | 42 | #define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) |
43 | #define WPS_QUICK (BUTTON_ON | BUTTON_REPEAT) | 43 | #define WPS_QUICK (BUTTON_ON | BUTTON_REPEAT) |
44 | 44 | ||
45 | #define WPS_RC_NEXT BUTTON_RC_FF | 45 | #define WPS_RC_NEXT (BUTTON_RC_FF | BUTTON_REL) |
46 | #define WPS_RC_PREV BUTTON_RC_REW | 46 | #define WPS_RC_NEXT_PRE BUTTON_RC_FF |
47 | #define WPS_RC_PREV (BUTTON_RC_REW | BUTTON_REL) | ||
48 | #define WPS_RC_PREV_PRE BUTTON_RC_REW | ||
49 | #define WPS_RC_FFWD (BUTTON_RC_FF | BUTTON_REPEAT) | ||
50 | #define WPS_RC_REW (BUTTON_RC_REW | BUTTON_REPEAT) | ||
47 | #define WPS_RC_PAUSE BUTTON_RC_ON | 51 | #define WPS_RC_PAUSE BUTTON_RC_ON |
48 | #define WPS_RC_INCVOL BUTTON_RC_VOL_UP | 52 | #define WPS_RC_INCVOL BUTTON_RC_VOL_UP |
49 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN | 53 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN |
50 | #define WPS_RC_EXIT BUTTON_RC_STOP | 54 | #define WPS_RC_EXIT BUTTON_RC_STOP |
51 | #define WPS_RC_MENU (BUTTON_RC_MENU | BUTTON_REL) | 55 | #define WPS_RC_MENU (BUTTON_RC_MENU | BUTTON_REL) |
52 | #define WPS_RC_MENU_PRE BUTTON_RC_MENU | 56 | #define WPS_RC_MENU_PRE BUTTON_RC_MENU |
53 | #define WPS_RC_BROWSE (BUTTON_RC_MODE | BUTTON_REL) | 57 | #define WPS_RC_BROWSE (BUTTON_RC_MODE | BUTTON_REL) |
54 | #define WPS_RC_BROWSE_PRE BUTTON_RC_MODE | 58 | #define WPS_RC_BROWSE_PRE BUTTON_RC_MODE |
55 | 59 | ||
56 | #elif CONFIG_KEYPAD == RECORDER_PAD | 60 | #elif CONFIG_KEYPAD == RECORDER_PAD |