diff options
Diffstat (limited to 'apps/gui/gwps.c')
-rw-r--r-- | apps/gui/gwps.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index d7d436c089..00d7aaa507 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include "onplay.h" | 52 | #include "onplay.h" |
53 | #include "abrepeat.h" | 53 | #include "abrepeat.h" |
54 | #include "playback.h" | 54 | #include "playback.h" |
55 | 55 | #include "backdrop.h" | |
56 | #include "splash.h" | 56 | #include "splash.h" |
57 | 57 | ||
58 | #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" | 58 | #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" |
@@ -62,6 +62,11 @@ struct wps_state wps_state; | |||
62 | struct gui_wps gui_wps[NB_SCREENS]; | 62 | struct gui_wps gui_wps[NB_SCREENS]; |
63 | static struct wps_data wps_datas[NB_SCREENS]; | 63 | static struct wps_data wps_datas[NB_SCREENS]; |
64 | 64 | ||
65 | #ifdef HAVE_LCD_COLOR | ||
66 | bool wps_has_backdrop; | ||
67 | fb_data* old_backdrop; | ||
68 | #endif | ||
69 | |||
65 | bool keys_locked = false; | 70 | bool keys_locked = false; |
66 | 71 | ||
67 | /* change the path to the current played track */ | 72 | /* change the path to the current played track */ |
@@ -102,6 +107,12 @@ long gui_wps_show(void) | |||
102 | { | 107 | { |
103 | gui_wps_set_margin(&gui_wps[i]); | 108 | gui_wps_set_margin(&gui_wps[i]); |
104 | } | 109 | } |
110 | #if HAVE_LCD_COLOR | ||
111 | old_backdrop = lcd_get_backdrop(); | ||
112 | if (wps_has_backdrop) { | ||
113 | lcd_set_backdrop(&wps_backdrop[0][0]); | ||
114 | } | ||
115 | #endif | ||
105 | #endif | 116 | #endif |
106 | 117 | ||
107 | #ifdef AB_REPEAT_ENABLE | 118 | #ifdef AB_REPEAT_ENABLE |
@@ -225,7 +236,14 @@ long gui_wps_show(void) | |||
225 | #ifdef WPS_RC_CONTEXT | 236 | #ifdef WPS_RC_CONTEXT |
226 | case WPS_RC_CONTEXT: | 237 | case WPS_RC_CONTEXT: |
227 | #endif | 238 | #endif |
239 | #ifdef HAVE_LCD_COLOR | ||
240 | lcd_set_backdrop(old_backdrop); | ||
241 | #endif | ||
228 | onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); | 242 | onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); |
243 | #ifdef HAVE_LCD_COLOR | ||
244 | if (wps_has_backdrop) | ||
245 | lcd_set_backdrop(&wps_backdrop[0][0]); | ||
246 | #endif | ||
229 | #ifdef HAVE_LCD_BITMAP | 247 | #ifdef HAVE_LCD_BITMAP |
230 | FOR_NB_SCREENS(i) | 248 | FOR_NB_SCREENS(i) |
231 | { | 249 | { |
@@ -510,8 +528,15 @@ long gui_wps_show(void) | |||
510 | FOR_NB_SCREENS(i) | 528 | FOR_NB_SCREENS(i) |
511 | gui_wps[i].display->stop_scroll(); | 529 | gui_wps[i].display->stop_scroll(); |
512 | 530 | ||
531 | #ifdef HAVE_LCD_COLOR | ||
532 | lcd_set_backdrop(old_backdrop); | ||
533 | #endif | ||
513 | if (main_menu()) | 534 | if (main_menu()) |
514 | return true; | 535 | return true; |
536 | #ifdef HAVE_LCD_COLOR | ||
537 | if (wps_has_backdrop) | ||
538 | lcd_set_backdrop(&wps_backdrop[0][0]); | ||
539 | #endif | ||
515 | #ifdef HAVE_LCD_BITMAP | 540 | #ifdef HAVE_LCD_BITMAP |
516 | FOR_NB_SCREENS(i) | 541 | FOR_NB_SCREENS(i) |
517 | { | 542 | { |
@@ -540,8 +565,15 @@ long gui_wps_show(void) | |||
540 | #ifdef WPS_RC_QUICK | 565 | #ifdef WPS_RC_QUICK |
541 | case WPS_RC_QUICK: | 566 | case WPS_RC_QUICK: |
542 | #endif | 567 | #endif |
568 | #ifdef HAVE_LCD_COLOR | ||
569 | lcd_set_backdrop(old_backdrop); | ||
570 | #endif | ||
543 | if (quick_screen_quick(button)) | 571 | if (quick_screen_quick(button)) |
544 | return SYS_USB_CONNECTED; | 572 | return SYS_USB_CONNECTED; |
573 | #ifdef HAVE_LCD_COLOR | ||
574 | if (wps_has_backdrop) | ||
575 | lcd_set_backdrop(&wps_backdrop[0][0]); | ||
576 | #endif | ||
545 | #ifdef HAVE_LCD_BITMAP | 577 | #ifdef HAVE_LCD_BITMAP |
546 | FOR_NB_SCREENS(i) | 578 | FOR_NB_SCREENS(i) |
547 | { | 579 | { |
@@ -566,8 +598,15 @@ long gui_wps_show(void) | |||
566 | || CONFIG_KEYPAD == IRIVER_H300_PAD | 598 | || CONFIG_KEYPAD == IRIVER_H300_PAD |
567 | case BUTTON_ON | BUTTON_UP: | 599 | case BUTTON_ON | BUTTON_UP: |
568 | case BUTTON_ON | BUTTON_DOWN: | 600 | case BUTTON_ON | BUTTON_DOWN: |
601 | #ifdef HAVE_LCD_COLOR | ||
602 | lcd_set_backdrop(old_backdrop); | ||
603 | #endif | ||
569 | if (2 == pitch_screen()) | 604 | if (2 == pitch_screen()) |
570 | return SYS_USB_CONNECTED; | 605 | return SYS_USB_CONNECTED; |
606 | #ifdef HAVE_LCD_COLOR | ||
607 | if (wps_has_backdrop) | ||
608 | lcd_set_backdrop(&wps_backdrop[0][0]); | ||
609 | #endif | ||
571 | restore = true; | 610 | restore = true; |
572 | break; | 611 | break; |
573 | #endif | 612 | #endif |
@@ -981,4 +1020,7 @@ void gui_sync_wps_init(void) | |||
981 | gui_wps_set_data(&gui_wps[i], &wps_datas[i]); | 1020 | gui_wps_set_data(&gui_wps[i], &wps_datas[i]); |
982 | gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]); | 1021 | gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]); |
983 | } | 1022 | } |
1023 | #ifdef HAVE_LCD_COLOR | ||
1024 | wps_has_backdrop = false; | ||
1025 | #endif | ||
984 | } | 1026 | } |