summaryrefslogtreecommitdiffstats
path: root/apps/wps-display.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-08-21 19:17:50 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-08-21 19:17:50 +0000
commitd9874b266ee420e214bdc8c9c96d946c0a922203 (patch)
tree13fb4c05dfd6873af4e3832b549707972ab352d6 /apps/wps-display.c
parentb2e94eff7fee70c57574610eb03093ddc9ef7985 (diff)
downloadrockbox-d9874b266ee420e214bdc8c9c96d946c0a922203.tar.gz
rockbox-d9874b266ee420e214bdc8c9c96d946c0a922203.tar.bz2
rockbox-d9874b266ee420e214bdc8c9c96d946c0a922203.zip
Committed the "[ 1247788 ] Adds wps tags for repeat modes" patch.
Please revert back should it cause problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7371 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 11a2506611..318da5a717 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -43,6 +43,7 @@
#include "powermgmt.h"
#include "sprintf.h"
#include "backlight.h"
+#include "button.h"
#ifdef HAVE_LCD_BITMAP
#include "icons.h"
@@ -578,6 +579,72 @@ static char* get_tag(struct mp3entry* cid3,
}
break;
+
+ case 'm': /* playback repeat mode */
+ switch (tag[1])
+ {
+ case 'f': /* off */
+ if (global_settings.repeat_mode == REPEAT_OFF)
+ return "f";
+ else
+ return NULL;
+ case 'a': /* all */
+ if (global_settings.repeat_mode == REPEAT_ALL)
+ return "a";
+ else
+ return NULL;
+ case 'o': /* one */
+ if (global_settings.repeat_mode == REPEAT_ONE)
+ return "o";
+ else
+ return NULL;
+ case 's': /* shuffle */
+ if (global_settings.repeat_mode == REPEAT_SHUFFLE)
+ return "s";
+ else
+ return NULL;
+ /* playback status */
+ case 'p': /* play */
+ *flags |= WPS_REFRESH_DYNAMIC;
+ int status = audio_status();
+ if (status == AUDIO_STATUS_PLAY && \
+ !(status & AUDIO_STATUS_PAUSE))
+ return "p";
+ else
+ return NULL;
+ case 'u': /* pause*/
+ *flags |= WPS_REFRESH_DYNAMIC;
+ if (audio_status() & AUDIO_STATUS_PAUSE && \
+ (! status_get_ffmode()))
+ return "u";
+ else
+ return NULL;
+ case 'w': /* fast forward */
+ *flags |= WPS_REFRESH_DYNAMIC;
+ if (status_get_ffmode() == STATUS_FASTFORWARD)
+ return "w";
+ else
+ return NULL;
+ case 'b': /* Fast backwards */
+ *flags |= WPS_REFRESH_DYNAMIC;
+ if (status_get_ffmode() == STATUS_FASTBACKWARD)
+ return "b";
+ else
+ return NULL;
+ case 'h': /* hold */
+ *flags |= WPS_REFRESH_DYNAMIC;
+ if (button_hold())
+ return "h";
+ else
+ return NULL;
+ case 'r': /* remote hold */
+ *flags |= WPS_REFRESH_DYNAMIC;
+ if (remote_button_hold())
+ return "r";
+ else
+ return NULL;
+ }
+ break;
case 'b': /* battery info */
*flags |= WPS_REFRESH_DYNAMIC;