diff options
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 36 | ||||
-rw-r--r-- | apps/main.c | 1 | ||||
-rw-r--r-- | apps/status.c | 7 | ||||
-rw-r--r-- | apps/status.h | 1 |
4 files changed, 26 insertions, 19 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; |
diff --git a/apps/main.c b/apps/main.c index 58ff1381b7..f48dd2d0a0 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -564,7 +564,6 @@ static void init(void) | |||
564 | eeprom_settings_store(); | 564 | eeprom_settings_store(); |
565 | } | 565 | } |
566 | #endif | 566 | #endif |
567 | status_init(); | ||
568 | playlist_init(); | 567 | playlist_init(); |
569 | tree_mem_init(); | 568 | tree_mem_init(); |
570 | filetype_init(); | 569 | filetype_init(); |
diff --git a/apps/status.c b/apps/status.c index 92f29c1b83..485ca0aa34 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -27,12 +27,7 @@ | |||
27 | #include "radio.h" | 27 | #include "radio.h" |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | static enum playmode ff_mode; | 30 | static enum playmode ff_mode = 0; |
31 | |||
32 | void status_init(void) | ||
33 | { | ||
34 | ff_mode = 0; | ||
35 | } | ||
36 | 31 | ||
37 | void status_set_ffmode(enum playmode mode) | 32 | void status_set_ffmode(enum playmode mode) |
38 | { | 33 | { |
diff --git a/apps/status.h b/apps/status.h index 8a7a69bc64..36b723ecb8 100644 --- a/apps/status.h +++ b/apps/status.h | |||
@@ -41,7 +41,6 @@ enum playmode | |||
41 | STATUS_RADIO_PAUSE | 41 | STATUS_RADIO_PAUSE |
42 | }; | 42 | }; |
43 | 43 | ||
44 | void status_init(void); | ||
45 | void status_set_ffmode(enum playmode mode); | 44 | void status_set_ffmode(enum playmode mode); |
46 | enum playmode status_get_ffmode(void); | 45 | enum playmode status_get_ffmode(void); |
47 | int current_playmode(void); | 46 | int current_playmode(void); |