summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_display.c19
-rw-r--r--apps/gui/skin_engine/skin_display.h2
-rw-r--r--apps/gui/skin_engine/skin_engine.c10
-rw-r--r--apps/gui/skin_engine/skin_engine.h5
-rw-r--r--apps/gui/skin_engine/skin_parser.c53
-rw-r--r--apps/gui/skin_engine/skin_render.c38
-rw-r--r--apps/gui/skin_engine/skin_tokens.c6
-rw-r--r--apps/gui/skin_engine/wps_internals.h14
8 files changed, 8 insertions, 139 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 345d74b65c..bd3a2b40aa 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -47,14 +47,12 @@
#include "list.h"
#include "option_select.h"
-#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h"
/* Image stuff */
#include "bmp.h"
#ifdef HAVE_ALBUMART
#include "albumart.h"
#endif
-#endif
#include "cuesheet.h"
#include "playback.h"
@@ -93,9 +91,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
SKIN_REFRESH_ALL : update_type);
}
-#ifdef HAVE_LCD_BITMAP
-
-
#ifdef AB_REPEAT_ENABLE
#define DIRECTION_RIGHT 1
@@ -171,7 +166,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
unsigned long length, end;
int flags = HORIZONTAL;
-
+
if (height < 0)
height = font_get(vp->font)->height;
@@ -423,8 +418,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
display->set_drawmode(DRMODE_SOLID);
}
-#endif /* HAVE_LCD_BITMAP */
-
/* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position.
*/
@@ -587,21 +580,17 @@ void write_line(struct screen *display, struct align_pos *format_align,
else
{
linedes->scroll = false;
-#ifdef HAVE_LCD_BITMAP
/* clear the line first */
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fillrect(0, line*string_height, viewport_width, string_height);
display->set_drawmode(DRMODE_SOLID);
-#endif
/* Nasty hack: we output an empty scrolling string,
which will reset the scroller for that line */
display->puts_scroll(0, line, (unsigned char *)"");
-#ifdef HAVE_LCD_BITMAP
line *= string_height;
center_xpos = (viewport_width-center_width)/2;
right_xpos = viewport_width-right_width;
-#endif
/* print aligned strings. print whole line at once so that %Vs works
* across the full viewport width */
char *left = format_align->left ?: "";
@@ -614,7 +603,6 @@ void write_line(struct screen *display, struct align_pos *format_align,
}
}
-#ifdef HAVE_LCD_BITMAP
void draw_peakmeters(struct gui_wps *gwps, int line_number,
struct viewport *viewport)
{
@@ -645,15 +633,12 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
(void)screen;
(void)data;
bool draw = false;
-#ifdef HAVE_LCD_BITMAP
if (data->wps_sb_tag)
draw = data->show_sb_on_wps;
else if (statusbar_position(screen) != STATUSBAR_OFF)
draw = true;
-#endif
return draw;
}
-#endif
/* do the button loop as often as required for the peak meters to update
* with a good refresh rate.
@@ -661,7 +646,6 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
{
int button = ACTION_NONE;
-#ifdef HAVE_LCD_BITMAP
/* when the peak meter is enabled we want to have a
few extra updates to make it look smooth. On the
other hand we don't want to waste energy if it
@@ -700,7 +684,6 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
/* The peak meter is disabled
-> no additional screen updates needed */
else
-#endif
{
button = get_action(context, timeout);
}
diff --git a/apps/gui/skin_engine/skin_display.h b/apps/gui/skin_engine/skin_display.h
index 01a2169952..de1b0b20b5 100644
--- a/apps/gui/skin_engine/skin_display.h
+++ b/apps/gui/skin_engine/skin_display.h
@@ -29,7 +29,6 @@
#define _SKIN_DISPLAY_H_
-#ifdef HAVE_LCD_BITMAP
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb);
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
/* clears the area where the image was shown */
@@ -40,7 +39,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp);
void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
struct skin_viewport* skin_viewport, unsigned long refresh_type);
-#endif
/* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position.
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index ec4e1fd073..cd763def1c 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -56,9 +56,7 @@ static struct gui_skin_helper {
char* (*default_skin)(enum screen_type screen);
bool load_on_boot;
} skin_helpers[SKINNABLE_SCREENS_COUNT] = {
-#ifdef HAVE_LCD_BITMAP
[CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true },
-#endif
[WPS] = { NULL, NULL, wps_default_skin, true },
#if CONFIG_TUNER
[FM_SCREEN] = { NULL, NULL, default_radio_skin, false }
@@ -115,10 +113,8 @@ static void gui_skin_reset(struct gui_skin *skin)
#ifdef HAVE_SKIN_VARIABLES
skin->data.skinvars = -1;
#endif
-#ifdef HAVE_LCD_BITMAP
skin->data.font_ids = -1;
skin->data.images = -1;
-#endif
#ifdef HAVE_ALBUMART
skin->data.albumart = -1;
skin->data.playback_aa_slot = -1;
@@ -157,9 +153,7 @@ void settings_apply_skins(void)
char filename[MAX_PATH];
static bool first_run = true;
-#ifdef HAVE_LCD_BITMAP
skin_backdrop_init();
-#endif
skins_initialised = true;
/* Make sure each skin is loaded */
@@ -236,7 +230,6 @@ static char* get_skin_filename(char *buf, size_t buf_size,
char *setting = NULL, *ext = NULL;
switch (skin)
{
-#ifdef HAVE_LCD_BITMAP
case CUSTOM_STATUSBAR:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE)
@@ -251,7 +244,6 @@ static char* get_skin_filename(char *buf, size_t buf_size,
ext = "sbs";
}
break;
-#endif
case WPS:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE)
@@ -296,10 +288,8 @@ static char* get_skin_filename(char *buf, size_t buf_size,
struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen)
{
-#ifdef HAVE_LCD_BITMAP
if (skin == CUSTOM_STATUSBAR && !skins_initialised)
return &skins[skin][screen].gui_wps;
-#endif
if (skins[skin][screen].data.wps_loaded == false)
{
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h
index 59e00b5176..55839608be 100644
--- a/apps/gui/skin_engine/skin_engine.h
+++ b/apps/gui/skin_engine/skin_engine.h
@@ -30,15 +30,12 @@
#include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
enum skinnable_screens {
-#ifdef HAVE_LCD_BITMAP
CUSTOM_STATUSBAR,
-#endif
WPS,
#if CONFIG_TUNER
FM_SCREEN,
#endif
-
-
+
SKINNABLE_SCREENS_COUNT
};
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index de7c1db372..f3a23377ef 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -66,9 +66,7 @@
#include "tuner.h"
#endif
-#ifdef HAVE_LCD_BITMAP
#include "bmp.h"
-#endif
#ifdef HAVE_ALBUMART
#include "playback.h"
@@ -127,7 +125,6 @@ typedef int (*parse_function)(struct skin_element *element,
struct wps_token *token,
struct wps_data *wps_data);
-#ifdef HAVE_LCD_BITMAP
/* add a skin_token_list item to the list chain. ALWAYS appended because some of the
* chains require the order to be kept.
*/
@@ -147,9 +144,6 @@ static void add_to_ll_chain(OFFSETTYPE(struct skin_token_list *) *listoffset,
}
}
-#endif
-
-
void *skin_find_item(const char *label, enum skin_find_what what,
struct wps_data *data)
{
@@ -170,11 +164,9 @@ void *skin_find_item(const char *label, enum skin_find_what what,
list.vplist = SKINOFFSETTOPTR(databuf, data->tree);
isvplist = true;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->images);
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->touchregions);
@@ -190,11 +182,9 @@ void *skin_find_item(const char *label, enum skin_find_what what,
while (list.linkedlist)
{
bool skip = false;
-#ifdef HAVE_LCD_BITMAP
struct wps_token *token = NULL;
if (!isvplist)
token = SKINOFFSETTOPTR(databuf, list.linkedlist->token);
-#endif
switch (what)
{
case SKIN_FIND_UIVP:
@@ -207,12 +197,10 @@ void *skin_find_item(const char *label, enum skin_find_what what,
skip = !(((struct skin_viewport *)ret)->is_infovp ==
(what==SKIN_FIND_UIVP));
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE:
ret = SKINOFFSETTOPTR(databuf, token->value.data);
itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label);
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION:
ret = SKINOFFSETTOPTR(databuf, token->value.data);
@@ -240,8 +228,6 @@ void *skin_find_item(const char *label, enum skin_find_what what,
return NULL;
}
-#ifdef HAVE_LCD_BITMAP
-
/* create and init a new wpsll item.
* passing NULL to token will alloc a new one.
* You should only pass NULL for the token when the token type (table above)
@@ -493,9 +479,6 @@ static int parse_font_load(struct skin_element *element,
return 0;
}
-
-#ifdef HAVE_LCD_BITMAP
-
static int parse_playlistview(struct skin_element *element,
struct wps_token *token,
struct wps_data *wps_data)
@@ -513,7 +496,7 @@ static int parse_playlistview(struct skin_element *element,
return 0;
}
-#endif
+
#ifdef HAVE_LCD_COLOR
static int parse_viewport_gradient_setup(struct skin_element *element,
struct wps_token *token,
@@ -756,8 +739,6 @@ static int parse_image_special(struct skin_element *element,
}
#endif
-#endif /* HAVE_LCD_BITMAP */
-
static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token,
struct wps_data *wps_data);
@@ -898,7 +879,6 @@ static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token,
struct wps_data *wps_data)
{
-#ifdef HAVE_LCD_BITMAP
struct progressbar *pb;
struct viewport *vp = &curr_vp->vp;
struct skin_tag_parameter *param = get_param(element, 0);
@@ -1211,20 +1191,7 @@ static int parse_progressbar_tag(struct skin_element* element,
add_to_ll_chain(&wps_data->touchregions, item);
}
#endif
-
- return 0;
-
-#else
- (void)element;
- if (token->type == SKIN_TOKEN_PROGRESSBAR ||
- token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR)
- {
- wps_data->full_line_progressbar =
- token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR;
- }
return 0;
-
-#endif
}
#ifdef HAVE_ALBUMART
@@ -1741,7 +1708,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
{
if (wps_data->wps_loaded)
skin_buffer = get_skin_buffer(wps_data);
-#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__
struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images);
int *font_ids = SKINOFFSETTOPTR(skin_buffer, wps_data->font_ids);
@@ -1776,7 +1742,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
core_free(wps_data->buflib_handle);
wps_data->buflib_handle = -1;
#endif
-#endif
}
/*
@@ -1787,9 +1752,7 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
static void skin_data_reset(struct wps_data *wps_data)
{
skin_data_free_buflib_allocs(wps_data);
-#ifdef HAVE_LCD_BITMAP
wps_data->images = INVALID_OFFSET;
-#endif
wps_data->tree = INVALID_OFFSET;
#ifdef HAVE_BACKDROP_IMAGE
if (wps_data->backdrop_id >= 0)
@@ -1811,15 +1774,12 @@ static void skin_data_reset(struct wps_data *wps_data)
}
#endif
-#ifdef HAVE_LCD_BITMAP
wps_data->peak_meter_enabled = false;
wps_data->wps_sb_tag = false;
wps_data->show_sb_on_wps = false;
-#endif
wps_data->wps_loaded = false;
}
-#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__
static int currently_loading_handle = -1;
static int buflib_move_callback(int handle, void* current, void* new)
@@ -2065,7 +2025,6 @@ static bool skin_load_fonts(struct wps_data *data)
return success;
}
-#endif /* HAVE_LCD_BITMAP */
static int convert_viewport(struct wps_data *data, struct skin_element* element)
{
struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(*skin_vp));
@@ -2176,11 +2135,9 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
skin_vp->vp.height = display->lcdheight - skin_vp->vp.y;
}
param++;
-#ifdef HAVE_LCD_BITMAP
/* font */
if (!isdefault(param))
skin_vp->parsed_fontid = param->data.number;
-#endif
if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth ||
skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth ||
(unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight ||
@@ -2259,7 +2216,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_TRACK_ENDING:
function = parse_timeout_tag;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_TEXT:
case SKIN_TOKEN_LIST_ITEM_ICON:
function = parse_listitem;
@@ -2274,7 +2230,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
sb_skin_has_title(curr_screen);
#endif
break;
-#endif
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
case SKIN_TOKEN_DRAWRECTANGLE:
function = parse_drawrectangle;
@@ -2309,7 +2264,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_SETTING:
function = parse_setting_and_lang;
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_VIEWPORT_CUSTOMLIST:
function = parse_playlistview;
break;
@@ -2331,7 +2285,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_LIST_ITEM_CFG:
function = parse_listitemviewport;
break;
-#endif
#ifdef HAVE_TOUCHSCREEN
case SKIN_TOKEN_TOUCHREGION:
function = parse_touchregion;
@@ -2423,14 +2376,12 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
char *wps_buffer = NULL;
if (!wps_data || !buf)
return false;
-#ifdef HAVE_LCD_BITMAP
int i;
for (i=0;i<MAXUSERFONTS;i++)
{
skinfonts[i].id = -1;
skinfonts[i].name = NULL;
}
-#endif
#ifdef DEBUG_SKIN_ENGINE
if (isfile && debug_wps)
{
@@ -2504,7 +2455,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
return false;
}
-#ifdef HAVE_LCD_BITMAP
char bmpdir[MAX_PATH];
if (isfile)
{
@@ -2523,7 +2473,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
skin_data_reset(wps_data);
return false;
}
-#endif
#if defined(HAVE_ALBUMART) && !defined(__PCTOOL__)
/* last_albumart_{width,height} is either both 0 or valid AA dimensions */
struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart);
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index e14c882dd9..51c58fc196 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -77,12 +77,10 @@ struct skin_draw_info {
typedef bool (*skin_render_func)(struct skin_element* alternator, struct skin_draw_info *info);
bool skin_render_alternator(struct skin_element* alternator, struct skin_draw_info *info);
-#ifdef HAVE_LCD_BITMAP
static void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps,
struct skin_viewport* skin_viewport,
unsigned long refresh_type);
-#endif
static char* skin_buffer;
@@ -99,11 +97,10 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
{
struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data);
-#ifdef HAVE_LCD_BITMAP
struct viewport *vp = &skin_vp->vp;
struct wps_data *data = gwps->data;
bool do_refresh = (element->tag->flags & info->refresh_type) > 0;
-#endif
+
switch (token->type)
{
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
@@ -181,7 +178,6 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
}
}
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_CFG:
skinlist_set_cfg(gwps->display->screen_type,
SKINOFFSETTOPTR(skin_buffer, token->value.data));
@@ -225,11 +221,9 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
case SKIN_TOKEN_PEAKMETER_RIGHTBAR:
data->peak_meter_enabled = true;
/* fall through to the progressbar code */
-#endif
case SKIN_TOKEN_VOLUMEBAR:
case SKIN_TOKEN_BATTERY_PERCENTBAR:
case SKIN_TOKEN_SETTINGBAR:
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_PROGRESSBAR:
case SKIN_TOKEN_TUNER_RSSI_BAR:
case SKIN_TOKEN_LIST_SCROLLBAR:
@@ -238,9 +232,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
if (do_refresh)
draw_progressbar(gwps, info->line_number, bar);
}
-#endif
break;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_IMAGE_DISPLAY:
{
struct gui_img *img = SKINOFFSETTOPTR(skin_buffer, token->value.data);
@@ -321,8 +313,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
skin_render_playlistviewer(SKINOFFSETTOPTR(skin_buffer, token->value.data), gwps,
info->skin_vp, info->refresh_type);
break;
-
-#endif /* HAVE_LCD_BITMAP */
+
#ifdef HAVE_SKIN_VARIABLES
case SKIN_TOKEN_VAR_SET:
{
@@ -352,16 +343,12 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
}
return true;
}
-
-
static void do_tags_in_hidden_conditional(struct skin_element* branch,
struct skin_draw_info *info)
{
-#ifdef HAVE_LCD_BITMAP
struct gui_wps *gwps = info->gwps;
struct wps_data *data = gwps->data;
-#endif
/* Tags here are ones which need to be "turned off" or cleared
* if they are in a conditional branch which isnt being used */
if (branch->type == LINE_ALTERNATOR)
@@ -375,9 +362,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
else if (branch->type == LINE && branch->children_count)
{
struct skin_element *child = get_child(branch->children, 0);
-#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
struct wps_token *token;
-#endif
while (child)
{
if (child->type == CONDITIONAL)
@@ -395,10 +380,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
child = SKINOFFSETTOPTR(skin_buffer, child->next);
continue;
}
-#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data);
-#endif
-#ifdef HAVE_LCD_BITMAP
/* clear all pictures in the conditional and nested ones */
if (token->type == SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY)
{
@@ -420,7 +402,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
viewport = SKINOFFSETTOPTR(skin_buffer, viewport->next))
{
struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data);
-
char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label);
if (skin_viewport->label == VP_DEFAULT_LABEL)
vplabel = VP_DEFAULT_LABEL_STRING;
@@ -460,7 +441,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
}
}
}
-#endif
#ifdef HAVE_ALBUMART
else if (data->albumart && token->type == SKIN_TOKEN_ALBUMART_DISPLAY)
{
@@ -734,11 +714,10 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
.offset = 0,
.line_desc = LINE_DESC_DEFINIT,
};
-
+
struct align_pos * align = &info.align;
bool needs_update, update_all = false;
skin_buffer = get_skin_buffer(gwps->data);
-#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */
struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images);
while (imglist)
@@ -752,10 +731,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
/* fix font ID's */
if (skin_viewport->parsed_fontid == 1)
skin_viewport->vp.font = display->getuifont();
-#endif
-
-
while (line)
{
linebuf[0] = '\0';
@@ -811,9 +787,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
info.line_number++;
line = SKINOFFSETTOPTR(skin_buffer, line->next);
}
-#ifdef HAVE_LCD_BITMAP
wps_display_images(gwps, &skin_viewport->vp);
-#endif
}
void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
@@ -903,8 +877,7 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
display->update();
}
-#ifdef HAVE_LCD_BITMAP
-static __attribute__((noinline))
+static __attribute__((noinline))
void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps,
struct skin_viewport* skin_viewport,
@@ -926,7 +899,7 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
.offset = viewer->start_offset,
.line_desc = LINE_DESC_DEFINIT,
};
-
+
struct align_pos * align = &info.align;
bool needs_update;
int cur_pos, start_item, max;
@@ -989,4 +962,3 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
start_item++;
}
}
-#endif
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 2528a0af55..db9a9e694b 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -41,11 +41,9 @@
#include "lang.h"
#include "misc.h"
#include "led.h"
-#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h"
/* Image stuff */
#include "albumart.h"
-#endif
#include "playlist.h"
#include "playback.h"
#include "tdspeed.h"
@@ -813,7 +811,6 @@ const char *get_token_value(struct gui_wps *gwps,
if (intval)
*intval = playlist_amount();
return buf;
-#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_TITLE_TEXT:
return sb_get_title(gwps->display->screen_type);
case SKIN_TOKEN_LIST_TITLE_ICON:
@@ -854,7 +851,6 @@ const char *get_token_value(struct gui_wps *gwps,
}
case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR:
return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : "";
-#endif
case SKIN_TOKEN_PLAYLIST_NAME:
return playlist_name(NULL, buf, buf_size);
@@ -1202,7 +1198,6 @@ const char *get_token_value(struct gui_wps *gwps,
return "-";
#endif
-#ifdef HAVE_LCD_BITMAP
/* peakmeter */
case SKIN_TOKEN_PEAKMETER_LEFT:
case SKIN_TOKEN_PEAKMETER_RIGHT:
@@ -1218,7 +1213,6 @@ const char *get_token_value(struct gui_wps *gwps,
data->peak_meter_enabled = true;
return buf;
}
-#endif
case SKIN_TOKEN_CROSSFADE:
#ifdef HAVE_CROSSFADE
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index caf43b21cb..b7d7ff35d0 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -80,7 +80,6 @@ struct skin_token_list {
OFFSETTYPE(struct skin_token_list *) next;
};
-#ifdef HAVE_LCD_BITMAP
struct gui_img {
OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */
short int x; /* x-pos */
@@ -137,9 +136,6 @@ struct draw_rectangle {
unsigned start_colour;
unsigned end_colour;
};
-#endif
-
-
struct align_pos {
char* left;
@@ -147,11 +143,7 @@ struct align_pos {
char* right;
};
-#ifdef HAVE_LCD_BITMAP
#define WPS_MAX_TOKENS 1150
-#else
-#define WPS_MAX_TOKENS 64
-#endif
enum wps_parse_error {
PARSE_OK,
@@ -344,11 +336,9 @@ struct wps_data
int buflib_handle;
OFFSETTYPE(struct skin_element *) tree;
-#ifdef HAVE_LCD_BITMAP
OFFSETTYPE(struct skin_token_list *) images;
OFFSETTYPE(int *) font_ids;
int font_count;
-#endif
#ifdef HAVE_BACKDROP_IMAGE
int backdrop_id;
bool use_extra_framebuffer;
@@ -370,11 +360,9 @@ struct wps_data
OFFSETTYPE(struct skin_token_list *) skinvars;
#endif
-#ifdef HAVE_LCD_BITMAP
bool peak_meter_enabled;
bool wps_sb_tag;
bool show_sb_on_wps;
-#endif
bool wps_loaded;
};
@@ -448,9 +436,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
enum skin_find_what {
SKIN_FIND_VP = 0,
SKIN_FIND_UIVP,
-#ifdef HAVE_LCD_BITMAP
SKIN_FIND_IMAGE,
-#endif
#ifdef HAVE_TOUCHSCREEN
SKIN_FIND_TOUCHREGION,
#endif