diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 19:14:28 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 19:14:28 +0000 |
commit | 71411ee83a224034c5779c8046539fdd136d213f (patch) | |
tree | cd0ca6e9f0c39df44b5facc06461391fd2483a60 /apps/gui/skin_engine | |
parent | 000cff5bae1576091ee9c23e33066bd3341d38d2 (diff) | |
download | rockbox-71411ee83a224034c5779c8046539fdd136d213f.tar.gz rockbox-71411ee83a224034c5779c8046539fdd136d213f.zip |
Change %mp tag to use current_playmode(). It has upto 9 values now, including recording and radio states.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index ad4613ed99..2df087bb70 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -467,17 +467,31 @@ const char *get_token_value(struct gui_wps *gwps, | |||
467 | 467 | ||
468 | case WPS_TOKEN_PLAYBACK_STATUS: | 468 | case WPS_TOKEN_PLAYBACK_STATUS: |
469 | { | 469 | { |
470 | int status = audio_status(); | 470 | int status = current_playmode(); |
471 | int mode = 1; | 471 | /* music */ |
472 | if (status == AUDIO_STATUS_PLAY) | 472 | int mode = 1; /* stop */ |
473 | mode = 2; | 473 | if (status == STATUS_PLAY) |
474 | if (is_wps_fading() || | 474 | mode = 2; /* play */ |
475 | (status & AUDIO_STATUS_PAUSE && !status_get_ffmode())) | 475 | if (is_wps_fading() || |
476 | mode = 3; | 476 | (status == STATUS_PAUSE && !status_get_ffmode())) |
477 | if (status_get_ffmode() == STATUS_FASTFORWARD) | 477 | mode = 3; /* pause */ |
478 | mode = 4; | 478 | else |
479 | if (status_get_ffmode() == STATUS_FASTBACKWARD) | 479 | { /* ff / rwd */ |
480 | mode = 5; | 480 | if (status_get_ffmode() == STATUS_FASTFORWARD) |
481 | mode = 4; | ||
482 | if (status_get_ffmode() == STATUS_FASTBACKWARD) | ||
483 | mode = 5; | ||
484 | } | ||
485 | /* recording */ | ||
486 | if (status == STATUS_RECORD) | ||
487 | mode = 6; | ||
488 | else if (status == STATUS_RECORD_PAUSE) | ||
489 | mode = 7; | ||
490 | /* radio */ | ||
491 | if (status == STATUS_RADIO) | ||
492 | mode = 8; | ||
493 | else if (status == STATUS_RADIO_PAUSE) | ||
494 | mode = 9; | ||
481 | 495 | ||
482 | if (intval) { | 496 | if (intval) { |
483 | *intval = mode; | 497 | *intval = mode; |