diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c index 4663a8756f..0b67125bbf 100644 --- a/apps/gui/skin_engine/skin_backdrops.c +++ b/apps/gui/skin_engine/skin_backdrops.c @@ -28,8 +28,7 @@ #include "wps_internals.h" #include "skin_engine.h" -#if !defined(__PCTOOL__) && \ - ((LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))) +#if !defined(__PCTOOL__) && defined(HAVE_BACKDROP_IMAGE) #define NB_BDROPS SKINNABLE_SCREENS_COUNT*NB_SCREENS static struct skin_backdrop { diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 75862faab0..c6791cac09 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c @@ -133,11 +133,11 @@ void settings_apply_skins(void) FOR_NB_SCREENS(j) skin_get_gwps(i, j); } -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrops_preload(); /* should maybe check the retval here... */ #endif viewportmanager_theme_changed(THEME_STATUSBAR); -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE FOR_NB_SCREENS(i) skin_backdrop_show(sb_get_backdrop(i)); #endif diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 33561bfed4..ad10689107 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1537,7 +1537,7 @@ static void skin_data_reset(struct wps_data *wps_data) wps_data->images = INVALID_OFFSET; #endif wps_data->tree = INVALID_OFFSET; -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE if (wps_data->backdrop_id >= 0) skin_backdrop_unload(wps_data->backdrop_id); backdrop_filename = NULL; @@ -2202,7 +2202,7 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, } skin_buffer = (void *)(((unsigned long)skin_buffer + 3) & ~3); buffersize -= 3; -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE backdrop_filename = "-"; wps_data->backdrop_id = -1; #endif diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 65a063592f..9c3fa1b5bc 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h @@ -325,7 +325,7 @@ struct wps_data OFFSETTYPE(int *) font_ids; int font_count; #endif -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE int backdrop_id; #endif diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 940f7f9cfa..a55ccc3221 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -117,7 +117,7 @@ static void toggle_theme(enum screen_type screen, bool force) bool first_boot = theme_stack_top[screen] == 0; /* remove the left overs from the previous screen. * could cause a tiny flicker. Redo your screen code if that happens */ -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(sb_get_backdrop(screen)); #endif if (LIKELY(after_boot[screen]) && (!was_enabled[screen] || force)) diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 97c945d0e8..284aa57a3e 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -631,7 +631,7 @@ static void gwps_leave_wps(void) FOR_NB_SCREENS(i) { skin_get_gwps(WPS, i)->display->stop_scroll(); -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(sb_get_backdrop(i)); #endif viewportmanager_theme_undo(i, skin_has_sbs(i, skin_get_gwps(WPS, i)->data)); @@ -678,7 +678,7 @@ static void gwps_enter_wps(void) } #endif /* make the backdrop actually take effect */ -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(gwps->data->backdrop_id); #endif display->clear_display(); diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index 4aceb83291..f5af1c7b78 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c @@ -40,7 +40,7 @@ #include "statusbar-skinned.h" #include "skin_engine/skin_engine.h" -#if LCD_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE /** * Menu to clear the backdrop image */ @@ -387,7 +387,7 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), &browse_rsbs, #endif &show_icons, -#if LCD_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE &clear_main_bd, #endif #ifdef HAVE_LCD_BITMAP diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c index 055de90429..2c9c369979 100644 --- a/apps/radio/radio_skin.c +++ b/apps/radio/radio_skin.c @@ -69,7 +69,7 @@ void fms_fix_displays(enum fms_exiting toggle_state) if (toggle_state == FMS_ENTER) { viewportmanager_theme_enable(i, skin_has_sbs(i, data), NULL); -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(data->backdrop_id); #endif screens[i].clear_display(); @@ -79,7 +79,7 @@ void fms_fix_displays(enum fms_exiting toggle_state) else { screens[i].stop_scroll(); -#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(sb_get_backdrop(i)); #endif viewportmanager_theme_undo(i, skin_has_sbs(i, data)); diff --git a/firmware/export/config.h b/firmware/export/config.h index 2e7b4dc4d6..a7f0a3578f 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -655,6 +655,10 @@ Lyre prototype 1 */ #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6 #endif +#if LCD_DEPTH > 1 || defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 +#define HAVE_BACKDROP_IMAGE +#endif + #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0 /* Multiple possible tuners */ #define CONFIG_TUNER_MULTI