summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/backdrop.h34
-rw-r--r--apps/gui/usb_screen.c2
-rw-r--r--apps/gui/viewport.c5
-rw-r--r--apps/gui/wps.c8
4 files changed, 13 insertions, 36 deletions
diff --git a/apps/gui/backdrop.h b/apps/gui/backdrop.h
index 4083464cee..f770797aa8 100644
--- a/apps/gui/backdrop.h
+++ b/apps/gui/backdrop.h
@@ -37,23 +37,6 @@ void backdrop_unload(enum backdrop_type bdrop);
37void backdrop_show(enum backdrop_type bdrop); 37void backdrop_show(enum backdrop_type bdrop);
38void backdrop_hide(void); 38void backdrop_hide(void);
39 39
40#else /* LCD_DEPTH <= 1 || __PCTOOL__ */
41
42static inline bool backdrop_load(enum backdrop_type bdrop, const char* filename)
43{
44 (void)filename; (void)bdrop; return true;
45}
46
47static inline void backdrop_unload(enum backdrop_type bdrop)
48{
49 (void)bdrop;
50}
51static inline void backdrop_show(enum backdrop_type bdrop)
52{
53 (void)bdrop;
54}
55
56static inline void backdrop_hide(void) {}
57#endif 40#endif
58 41
59#if defined(HAVE_REMOTE_LCD) 42#if defined(HAVE_REMOTE_LCD)
@@ -63,23 +46,6 @@ bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename);
63void remote_backdrop_unload(enum backdrop_type bdrop); 46void remote_backdrop_unload(enum backdrop_type bdrop);
64void remote_backdrop_show(enum backdrop_type bdrop); 47void remote_backdrop_show(enum backdrop_type bdrop);
65void remote_backdrop_hide(void); 48void remote_backdrop_hide(void);
66#else
67static inline
68bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename)
69{
70 (void)filename; (void)bdrop; return true;
71}
72
73static inline void remote_backdrop_unload(enum backdrop_type bdrop)
74{
75 (void)bdrop;
76}
77
78static inline void remote_backdrop_show(enum backdrop_type bdrop)
79{
80 (void)bdrop;
81}
82static inline void remote_backdrop_hide(void) {}
83#endif 49#endif
84#endif 50#endif
85 51
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 86b77cb49e..ac31708718 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -202,7 +202,9 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
202#endif 202#endif
203 203
204 screen->set_viewport(parent); 204 screen->set_viewport(parent);
205#if LCD_DEPTH > 1
205 screen->backdrop_show(BACKDROP_MAIN); 206 screen->backdrop_show(BACKDROP_MAIN);
207#endif
206 screen->backlight_on(); 208 screen->backlight_on();
207 screen->clear_viewport(); 209 screen->clear_viewport();
208 210
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 3c5249cff9..ad9fad6846 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -89,8 +89,9 @@ static void toggle_theme(enum screen_type screen, bool force)
89 add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false, 89 add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false,
90 do_sbs_update_callback); 90 do_sbs_update_callback);
91 91
92#if LCD_DEPTH > 1
92 screens[screen].backdrop_show(BACKDROP_MAIN); 93 screens[screen].backdrop_show(BACKDROP_MAIN);
93 94#endif
94 /* remove the left overs from the previous screen. 95 /* remove the left overs from the previous screen.
95 * could cause a tiny flicker. Redo your screen code if that happens */ 96 * could cause a tiny flicker. Redo your screen code if that happens */
96 if (!was_enabled[screen] || force) 97 if (!was_enabled[screen] || force)
@@ -145,7 +146,9 @@ static void toggle_theme(enum screen_type screen, bool force)
145 { 146 {
146 FOR_NB_SCREENS(i) 147 FOR_NB_SCREENS(i)
147 { 148 {
149#if LCD_DEPTH > 1
148 screens[i].backdrop_hide(); 150 screens[i].backdrop_hide();
151#endif
149 screens[i].stop_scroll(); 152 screens[i].stop_scroll();
150 } 153 }
151 154
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index cb73e6f92c..3c0982270e 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -99,7 +99,9 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
99{ 99{
100 bool loaded_ok; 100 bool loaded_ok;
101 101
102#if LCD_DEPTH > 1
102 screens[screen].backdrop_unload(BACKDROP_SKIN_WPS); 103 screens[screen].backdrop_unload(BACKDROP_SKIN_WPS);
104#endif
103 105
104#ifndef __PCTOOL__ 106#ifndef __PCTOOL__
105 /* 107 /*
@@ -561,7 +563,9 @@ static void gwps_leave_wps(void)
561 FOR_NB_SCREENS(i) 563 FOR_NB_SCREENS(i)
562 { 564 {
563 gui_wps[i].display->stop_scroll(); 565 gui_wps[i].display->stop_scroll();
566#if LCD_DEPTH > 1
564 gui_wps[i].display->backdrop_show(BACKDROP_MAIN); 567 gui_wps[i].display->backdrop_show(BACKDROP_MAIN);
568#endif
565 569
566#ifdef HAVE_LCD_BITMAP 570#ifdef HAVE_LCD_BITMAP
567 bool draw = false; 571 bool draw = false;
@@ -610,8 +614,8 @@ static void gwps_enter_wps(void)
610 vp->fg_pattern = display->get_foreground(); 614 vp->fg_pattern = display->get_foreground();
611 vp->bg_pattern = display->get_background(); 615 vp->bg_pattern = display->get_background();
612 } 616 }
613#endif
614 display->backdrop_show(BACKDROP_SKIN_WPS); 617 display->backdrop_show(BACKDROP_SKIN_WPS);
618#endif
615 /* make the backdrop actually take effect */ 619 /* make the backdrop actually take effect */
616 display->clear_display(); 620 display->clear_display();
617 skin_update(gwps, WPS_REFRESH_ALL); 621 skin_update(gwps, WPS_REFRESH_ALL);
@@ -1294,7 +1298,9 @@ void gui_sync_wps_init(void)
1294 /* Currently no seperate wps_state needed/possible 1298 /* Currently no seperate wps_state needed/possible
1295 so use the only available ( "global" ) one */ 1299 so use the only available ( "global" ) one */
1296 gui_wps[i].state = &wps_state; 1300 gui_wps[i].state = &wps_state;
1301#if LCD_DEPTH > 1
1297 gui_wps[i].display->backdrop_unload(BACKDROP_SKIN_WPS); 1302 gui_wps[i].display->backdrop_unload(BACKDROP_SKIN_WPS);
1303#endif
1298 /* must point to the same struct for both screens */ 1304 /* must point to the same struct for both screens */
1299 gui_wps[i].sync_data = &wps_sync_data; 1305 gui_wps[i].sync_data = &wps_sync_data;
1300 } 1306 }