diff options
-rw-r--r-- | apps/bookmark.c | 4 | ||||
-rw-r--r-- | apps/gui/backdrop.h | 34 | ||||
-rw-r--r-- | apps/gui/usb_screen.c | 2 | ||||
-rw-r--r-- | apps/gui/viewport.c | 5 | ||||
-rw-r--r-- | apps/gui/wps.c | 8 | ||||
-rw-r--r-- | apps/screen_access.c | 4 | ||||
-rw-r--r-- | apps/screen_access.h | 2 | ||||
-rw-r--r-- | apps/settings.c | 5 |
8 files changed, 27 insertions, 37 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index d4bca415b4..78bbb77c86 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -194,7 +194,11 @@ bool bookmark_autobookmark(void) | |||
194 | const struct text_message message={lines, 2}; | 194 | const struct text_message message={lines, 2}; |
195 | #endif | 195 | #endif |
196 | FOR_NB_SCREENS(i) | 196 | FOR_NB_SCREENS(i) |
197 | { | ||
198 | #if LCD_DEPTH > 1 | ||
197 | screens[i].backdrop_show(BACKDROP_MAIN); | 199 | screens[i].backdrop_show(BACKDROP_MAIN); |
200 | #endif | ||
201 | } | ||
198 | 202 | ||
199 | if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) | 203 | if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) |
200 | { | 204 | { |
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); | |||
37 | void backdrop_show(enum backdrop_type bdrop); | 37 | void backdrop_show(enum backdrop_type bdrop); |
38 | void backdrop_hide(void); | 38 | void backdrop_hide(void); |
39 | 39 | ||
40 | #else /* LCD_DEPTH <= 1 || __PCTOOL__ */ | ||
41 | |||
42 | static inline bool backdrop_load(enum backdrop_type bdrop, const char* filename) | ||
43 | { | ||
44 | (void)filename; (void)bdrop; return true; | ||
45 | } | ||
46 | |||
47 | static inline void backdrop_unload(enum backdrop_type bdrop) | ||
48 | { | ||
49 | (void)bdrop; | ||
50 | } | ||
51 | static inline void backdrop_show(enum backdrop_type bdrop) | ||
52 | { | ||
53 | (void)bdrop; | ||
54 | } | ||
55 | |||
56 | static 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); | |||
63 | void remote_backdrop_unload(enum backdrop_type bdrop); | 46 | void remote_backdrop_unload(enum backdrop_type bdrop); |
64 | void remote_backdrop_show(enum backdrop_type bdrop); | 47 | void remote_backdrop_show(enum backdrop_type bdrop); |
65 | void remote_backdrop_hide(void); | 48 | void remote_backdrop_hide(void); |
66 | #else | ||
67 | static inline | ||
68 | bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename) | ||
69 | { | ||
70 | (void)filename; (void)bdrop; return true; | ||
71 | } | ||
72 | |||
73 | static inline void remote_backdrop_unload(enum backdrop_type bdrop) | ||
74 | { | ||
75 | (void)bdrop; | ||
76 | } | ||
77 | |||
78 | static inline void remote_backdrop_show(enum backdrop_type bdrop) | ||
79 | { | ||
80 | (void)bdrop; | ||
81 | } | ||
82 | static 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 | } |
diff --git a/apps/screen_access.c b/apps/screen_access.c index 8267ce3ecd..775dc50d5f 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c | |||
@@ -199,10 +199,12 @@ struct screen screens[NB_SCREENS] = | |||
199 | .backlight_off=&backlight_off, | 199 | .backlight_off=&backlight_off, |
200 | .is_backlight_on=&is_backlight_on, | 200 | .is_backlight_on=&is_backlight_on, |
201 | .backlight_set_timeout=&backlight_set_timeout, | 201 | .backlight_set_timeout=&backlight_set_timeout, |
202 | #if LCD_DEPTH > 1 | ||
202 | .backdrop_load=&backdrop_load, | 203 | .backdrop_load=&backdrop_load, |
203 | .backdrop_unload=&backdrop_unload, | 204 | .backdrop_unload=&backdrop_unload, |
204 | .backdrop_show=&backdrop_show, | 205 | .backdrop_show=&backdrop_show, |
205 | .backdrop_hide=&backdrop_hide, | 206 | .backdrop_hide=&backdrop_hide, |
207 | #endif | ||
206 | #ifdef HAVE_BUTTONBAR | 208 | #ifdef HAVE_BUTTONBAR |
207 | .has_buttonbar=false, | 209 | .has_buttonbar=false, |
208 | #endif | 210 | #endif |
@@ -286,10 +288,12 @@ struct screen screens[NB_SCREENS] = | |||
286 | .backlight_off=&remote_backlight_off, | 288 | .backlight_off=&remote_backlight_off, |
287 | .is_backlight_on=&is_remote_backlight_on, | 289 | .is_backlight_on=&is_remote_backlight_on, |
288 | .backlight_set_timeout=&remote_backlight_set_timeout, | 290 | .backlight_set_timeout=&remote_backlight_set_timeout, |
291 | #if LCD_DEPTH > 1 | ||
289 | .backdrop_load=&remote_backdrop_load, | 292 | .backdrop_load=&remote_backdrop_load, |
290 | .backdrop_unload=&remote_backdrop_unload, | 293 | .backdrop_unload=&remote_backdrop_unload, |
291 | .backdrop_show=&remote_backdrop_show, | 294 | .backdrop_show=&remote_backdrop_show, |
292 | .backdrop_hide=&remote_backdrop_hide, | 295 | .backdrop_hide=&remote_backdrop_hide, |
296 | #endif | ||
293 | #ifdef HAVE_BUTTONBAR | 297 | #ifdef HAVE_BUTTONBAR |
294 | .has_buttonbar=false, | 298 | .has_buttonbar=false, |
295 | #endif | 299 | #endif |
diff --git a/apps/screen_access.h b/apps/screen_access.h index 396a0d0e88..31d4b0cf1b 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h | |||
@@ -147,10 +147,12 @@ struct screen | |||
147 | void (*backlight_off)(void); | 147 | void (*backlight_off)(void); |
148 | bool (*is_backlight_on)(bool ignore_always_off); | 148 | bool (*is_backlight_on)(bool ignore_always_off); |
149 | void (*backlight_set_timeout)(int index); | 149 | void (*backlight_set_timeout)(int index); |
150 | #if LCD_DEPTH > 1 | ||
150 | bool (*backdrop_load)(enum backdrop_type bdrop, const char* filename); | 151 | bool (*backdrop_load)(enum backdrop_type bdrop, const char* filename); |
151 | void (*backdrop_unload)(enum backdrop_type bdrop); | 152 | void (*backdrop_unload)(enum backdrop_type bdrop); |
152 | void (*backdrop_show)(enum backdrop_type bdrop); | 153 | void (*backdrop_show)(enum backdrop_type bdrop); |
153 | void (*backdrop_hide)(void); | 154 | void (*backdrop_hide)(void); |
155 | #endif | ||
154 | }; | 156 | }; |
155 | 157 | ||
156 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) | 158 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) |
diff --git a/apps/settings.c b/apps/settings.c index 9492448ade..8d1bcf7ae5 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -796,8 +796,9 @@ void settings_apply(bool read_disk) | |||
796 | #if CONFIG_CODEC == SWCODEC | 796 | #if CONFIG_CODEC == SWCODEC |
797 | int i; | 797 | int i; |
798 | #endif | 798 | #endif |
799 | #if LCD_DEPTH > 1 | ||
799 | int screen; | 800 | int screen; |
800 | 801 | #endif | |
801 | sound_settings_apply(); | 802 | sound_settings_apply(); |
802 | 803 | ||
803 | #ifdef HAVE_DISK_STORAGE | 804 | #ifdef HAVE_DISK_STORAGE |
@@ -918,8 +919,10 @@ void settings_apply(bool read_disk) | |||
918 | } | 919 | } |
919 | #endif | 920 | #endif |
920 | 921 | ||
922 | #if LCD_DEPTH > 1 | ||
921 | FOR_NB_SCREENS(screen) | 923 | FOR_NB_SCREENS(screen) |
922 | screens[screen].backdrop_show(BACKDROP_MAIN); | 924 | screens[screen].backdrop_show(BACKDROP_MAIN); |
925 | #endif | ||
923 | 926 | ||
924 | if ( global_settings.lang_file[0]) { | 927 | if ( global_settings.lang_file[0]) { |
925 | snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", | 928 | snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", |