Get rid of a really annoying #ifdef line to check if backdrop support should be enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
852b68c74a
commit
1252d0d540
9 changed files with 17 additions and 14 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue