[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.

Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
This commit is contained in:
Solomon Peachy 2020-07-17 10:31:31 -04:00
parent 8cb555460f
commit 658026e626
240 changed files with 288 additions and 1759 deletions

View File

@ -71,15 +71,11 @@ iap/iap-lingo7.c
#endif #endif
#endif #endif
screen_access.c screen_access.c
#ifdef HAVE_LCD_BITMAP
gui/icon.c gui/icon.c
#endif
gui/list.c gui/list.c
gui/line.c gui/line.c
#ifdef HAVE_LCD_BITMAP
gui/bitmap/list.c gui/bitmap/list.c
gui/bitmap/list-skinned.c gui/bitmap/list-skinned.c
#endif
gui/option_select.c gui/option_select.c
#ifdef HAVE_PITCHCONTROL #ifdef HAVE_PITCHCONTROL
gui/pitchscreen.c gui/pitchscreen.c
@ -96,9 +92,7 @@ gui/wps.c
gui/scrollbar.c gui/scrollbar.c
gui/splash.c gui/splash.c
gui/statusbar.c gui/statusbar.c
#ifdef HAVE_LCD_BITMAP
gui/statusbar-skinned.c gui/statusbar-skinned.c
#endif
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) #if (CONFIG_PLATFORM&PLATFORM_ANDROID)
hosted/android/yesno.c hosted/android/yesno.c
hosted/android/notification.c hosted/android/notification.c
@ -121,7 +115,6 @@ gui/skin_engine/skin_touchsupport.c
gui/backdrop.c gui/backdrop.c
#endif #endif
#ifdef HAVE_LCD_BITMAP
recorder/bmp.c recorder/bmp.c
recorder/icons.c recorder/icons.c
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) #if (CONFIG_PLATFORM&PLATFORM_ANDROID)
@ -145,7 +138,7 @@ recorder/albumart.c
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
gui/color_picker.c gui/color_picker.c
#endif #endif
#endif
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
recorder/recording.c recorder/recording.c
#endif #endif

View File

@ -26,7 +26,7 @@
#include "config.h" #include "config.h"
#include "lang.h" #include "lang.h"
#if defined(HAVE_LCD_BITMAP) && !defined(BOOTLOADER) #if !defined(BOOTLOADER)
#include "language.h" #include "language.h"
#endif #endif
@ -421,7 +421,7 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur
static inline void button_flip_horizontally(int context, int *button) static inline void button_flip_horizontally(int context, int *button)
{ {
#if !defined(HAVE_LCD_BITMAP) || defined(BOOTLOADER) #if defined(BOOTLOADER)
(void) context; (void) context;
(void) *button; (void) *button;
return; return;
@ -473,7 +473,7 @@ static inline void button_flip_horizontally(int context, int *button)
#endif /* !SIMULATOR */ #endif /* !SIMULATOR */
*button = newbutton; *button = newbutton;
#endif /* !HAVE_LCD_BITMAP | BOOTLOADER */ #endif /* !BOOTLOADER */
} /* button_flip_horizontally */ } /* button_flip_horizontally */
/********************************************************************** /**********************************************************************

View File

@ -1,6 +1,4 @@
#ifdef HAVE_LCD_BITMAP
default_icons.bmp default_icons.bmp
#endif
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
osx_dummy.bmp osx_dummy.bmp

View File

@ -1,5 +1,3 @@
#ifdef HAVE_LCD_BITMAP
/* Rockbox logo */ /* Rockbox logo */
#if (LCD_DEPTH == 1) #if (LCD_DEPTH == 1)
#if (LCD_WIDTH == 160) #if (LCD_WIDTH == 160)
@ -81,5 +79,3 @@ usblogo.104x27x1.bmp
#endif #endif
#endif /* BOOTLOADER */ #endif /* BOOTLOADER */
#endif /* HAVE_LCD_BITMAP */

View File

@ -1,6 +1,4 @@
#ifdef HAVE_LCD_BITMAP
remote_default_icons.bmp remote_default_icons.bmp
#endif
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
osx_remote_dummy.bmp osx_remote_dummy.bmp

View File

@ -198,14 +198,8 @@ bool bookmark_autobookmark(bool prompt_ok)
case BOOKMARK_RECENT_ONLY_YES: case BOOKMARK_RECENT_ONLY_YES:
return write_bookmark(false, bookmark); return write_bookmark(false, bookmark);
} }
#ifdef HAVE_LCD_BITMAP
const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY)}; const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY)};
const struct text_message message={lines, 1}; const struct text_message message={lines, 1};
#else
const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY),
str(LANG_CONFIRM_WITH_BUTTON)};
const struct text_message message={lines, 2};
#endif
if(prompt_ok && gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) if(prompt_ok && gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES)
{ {

View File

@ -482,7 +482,6 @@ bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_
} }
#ifdef HAVE_LCD_BITMAP
static inline void draw_veritcal_line_mark(struct screen * screen, static inline void draw_veritcal_line_mark(struct screen * screen,
int x, int y, int h) int x, int y, int h)
{ {
@ -498,7 +497,7 @@ void cue_draw_markers(struct screen *screen, struct cuesheet *cue,
{ {
int i,xi; int i,xi;
unsigned long tracklen_seconds = tracklen/1000; /* duration in seconds */ unsigned long tracklen_seconds = tracklen/1000; /* duration in seconds */
for (i=1; i < cue->track_count; i++) for (i=1; i < cue->track_count; i++)
{ {
/* Convert seconds prior to multiplication to avoid overflow. */ /* Convert seconds prior to multiplication to avoid overflow. */
@ -506,7 +505,6 @@ void cue_draw_markers(struct screen *screen, struct cuesheet *cue,
draw_veritcal_line_mark(screen, xi, y, h); draw_veritcal_line_mark(screen, xi, y, h);
} }
} }
#endif
bool cuesheet_subtrack_changed(struct mp3entry *id3) bool cuesheet_subtrack_changed(struct mp3entry *id3)
{ {

View File

@ -79,12 +79,10 @@ int cue_find_current_track(struct cuesheet *cue, unsigned long curpos);
/* skip to next track in the cuesheet towards "direction" (which is 1 or -1) */ /* skip to next track in the cuesheet towards "direction" (which is 1 or -1) */
bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos); bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos);
#ifdef HAVE_LCD_BITMAP
/* draw track markers on the progressbar */ /* draw track markers on the progressbar */
void cue_draw_markers(struct screen *screen, struct cuesheet *cue, void cue_draw_markers(struct screen *screen, struct cuesheet *cue,
unsigned long tracklen, unsigned long tracklen,
int x, int y, int w, int h); int x, int y, int w, int h);
#endif
/* check if the subtrack has changed */ /* check if the subtrack has changed */
bool cuesheet_subtrack_changed(struct mp3entry *id3); bool cuesheet_subtrack_changed(struct mp3entry *id3);

View File

@ -80,11 +80,9 @@
#include "radio.h" #include "radio.h"
#endif #endif
#ifdef HAVE_LCD_BITMAP
#include "scrollbar.h" #include "scrollbar.h"
#include "peakmeter.h" #include "peakmeter.h"
#include "skin_engine/skin_engine.h" #include "skin_engine/skin_engine.h"
#endif
#include "logfdisp.h" #include "logfdisp.h"
#include "core_alloc.h" #include "core_alloc.h"
#include "pcmbuf.h" #include "pcmbuf.h"
@ -300,7 +298,6 @@ static bool dbg_cpuinfo(void)
#endif #endif
#ifdef HAVE_LCD_BITMAP
static unsigned int ticks, freq_sum; static unsigned int ticks, freq_sum;
#ifndef CPU_MULTI_FREQUENCY #ifndef CPU_MULTI_FREQUENCY
static unsigned int boost_ticks; static unsigned int boost_ticks;
@ -442,7 +439,6 @@ static bool dbg_buffering_thread(void)
return false; return false;
} }
#endif /* HAVE_LCD_BITMAP */
static const char* bf_getname(int selected_item, void *data, static const char* bf_getname(int selected_item, void *data,
char *buffer, size_t buffer_len) char *buffer, size_t buffer_len)
@ -688,9 +684,7 @@ static bool dbg_pcf(void)
{ {
int line; int line;
#ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED);
#endif
lcd_clear_display(); lcd_clear_display();
while(1) while(1)
@ -731,9 +725,7 @@ static bool dbg_cpufreq(void)
int x = 0; int x = 0;
bool done = false; bool done = false;
#ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED);
#endif
lcd_clear_display(); lcd_clear_display();
while(!done) while(!done)
@ -838,7 +830,7 @@ static bool tsc2100_debug(void)
return simplelist_show_list(&info); return simplelist_show_list(&info);
} }
#endif #endif
#if (CONFIG_BATTERY_MEASURE != 0) && defined(HAVE_LCD_BITMAP) && !defined(SIMULATOR) #if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR)
/* /*
* view_battery() shows a automatically scaled graph of the battery voltage * view_battery() shows a automatically scaled graph of the battery voltage
* over time. Usable for estimating battery life / charging rate. * over time. Usable for estimating battery life / charging rate.
@ -1165,7 +1157,7 @@ static bool view_battery(void)
return false; return false;
} }
#endif /* (CONFIG_BATTERY_MEASURE != 0) && HAVE_LCD_BITMAP */ #endif /* (CONFIG_BATTERY_MEASURE != 0) */
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
@ -2103,7 +2095,7 @@ static bool dbg_fm_radio(void)
#endif /* CONFIG_TUNER */ #endif /* CONFIG_TUNER */
#endif /* !SIMULATOR */ #endif /* !SIMULATOR */
#if defined(HAVE_LCD_BITMAP) && !defined(APPLICATION) #if !defined(APPLICATION)
extern bool do_screendump_instead_of_usb; extern bool do_screendump_instead_of_usb;
static bool dbg_screendump(void) static bool dbg_screendump(void)
@ -2112,7 +2104,7 @@ static bool dbg_screendump(void)
splashf(HZ, "Screendump %sabled", do_screendump_instead_of_usb?"en":"dis"); splashf(HZ, "Screendump %sabled", do_screendump_instead_of_usb?"en":"dis");
return false; return false;
} }
#endif /* HAVE_LCD_BITMAP */ #endif /* !APPLICATION */
extern bool write_metadata_log; extern bool write_metadata_log;
@ -2397,7 +2389,6 @@ static bool dbg_pic(void)
} }
#endif #endif
#ifdef HAVE_LCD_BITMAP
static bool dbg_skin_engine(void) static bool dbg_skin_engine(void)
{ {
struct simplelist_info info; struct simplelist_info info;
@ -2451,7 +2442,6 @@ static bool dbg_skin_engine(void)
#endif #endif
return simplelist_show_list(&info); return simplelist_show_list(&info);
} }
#endif
#if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR)
static bool dbg_boot_data(void) static bool dbg_boot_data(void)
@ -2528,7 +2518,6 @@ static const struct {
#ifdef __linux__ #ifdef __linux__
{ "View CPU stats", dbg_cpuinfo }, { "View CPU stats", dbg_cpuinfo },
#endif #endif
#ifdef HAVE_LCD_BITMAP
#if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR) #if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR)
{ "View battery", view_battery }, { "View battery", view_battery },
#endif #endif
@ -2536,7 +2525,6 @@ static const struct {
{ "Screendump", dbg_screendump }, { "Screendump", dbg_screendump },
#endif #endif
{ "Skin Engine RAM usage", dbg_skin_engine }, { "Skin Engine RAM usage", dbg_skin_engine },
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) || (defined(SONY_NWZ_LINUX) && !defined(SIMULATOR)) #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || (defined(SONY_NWZ_LINUX) && !defined(SIMULATOR))
{ "View HW info", dbg_hw_info }, { "View HW info", dbg_hw_info },
#endif #endif
@ -2559,12 +2547,10 @@ static const struct {
#ifdef HAVE_TAGCACHE #ifdef HAVE_TAGCACHE
{ "View database info", dbg_tagcache_info }, { "View database info", dbg_tagcache_info },
#endif #endif
#ifdef HAVE_LCD_BITMAP
{ "View buffering thread", dbg_buffering_thread }, { "View buffering thread", dbg_buffering_thread },
#ifdef PM_DEBUG #ifdef PM_DEBUG
{ "pm histogram", peak_meter_histogram}, { "pm histogram", peak_meter_histogram},
#endif /* PM_DEBUG */ #endif /* PM_DEBUG */
#endif /* HAVE_LCD_BITMAP */
{ "View buflib allocs", dbg_buflib_allocs }, { "View buflib allocs", dbg_buflib_allocs },
#ifndef SIMULATOR #ifndef SIMULATOR
#if CONFIG_TUNER #if CONFIG_TUNER

View File

@ -60,9 +60,7 @@ hold_button
hotkey hotkey
#endif #endif
#if defined(HAVE_LCD_BITMAP)
lcd_bitmap lcd_bitmap
#endif
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
lcd_non-mono lcd_non-mono

View File

@ -44,9 +44,7 @@
#include "filetree.h" #include "filetree.h"
#include "misc.h" #include "misc.h"
#include "strnatcmp.h" #include "strnatcmp.h"
#ifdef HAVE_LCD_BITMAP
#include "keyboard.h" #include "keyboard.h"
#endif
#if CONFIG_TUNER #if CONFIG_TUNER
#include "radio.h" #include "radio.h"
@ -339,13 +337,11 @@ int ft_load(struct tree_context* c, const char* tempdir)
(dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) || (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) ||
(*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) || (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) ||
(*c->dirfilter == SHOW_WPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_WPS) || (*c->dirfilter == SHOW_WPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_WPS) ||
#ifdef HAVE_LCD_BITMAP
(*c->dirfilter == SHOW_FONT && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FONT) || (*c->dirfilter == SHOW_FONT && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FONT) ||
(*c->dirfilter == SHOW_SBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_SBS) || (*c->dirfilter == SHOW_SBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_SBS) ||
#if CONFIG_TUNER #if CONFIG_TUNER
(*c->dirfilter == SHOW_FMS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FMS) || (*c->dirfilter == SHOW_FMS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FMS) ||
#endif #endif
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
(*c->dirfilter == SHOW_RWPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RWPS) || (*c->dirfilter == SHOW_RWPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RWPS) ||
(*c->dirfilter == SHOW_RSBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RSBS) || (*c->dirfilter == SHOW_RSBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RSBS) ||
@ -399,7 +395,6 @@ int ft_load(struct tree_context* c, const char* tempdir)
tree_unlock_cache(c); tree_unlock_cache(c);
return 0; return 0;
} }
#ifdef HAVE_LCD_BITMAP
static void ft_load_font(char *file) static void ft_load_font(char *file)
{ {
int current_font_id; int current_font_id;
@ -428,8 +423,7 @@ static void ft_load_font(char *file)
screens[screen].setuifont( screens[screen].setuifont(
font_load_ex(file,0,global_settings.glyphs_to_cache)); font_load_ex(file,0,global_settings.glyphs_to_cache));
viewportmanager_theme_changed(THEME_UI_VIEWPORT); viewportmanager_theme_changed(THEME_UI_VIEWPORT);
} }
#endif
int ft_enter(struct tree_context* c) int ft_enter(struct tree_context* c)
{ {
@ -550,13 +544,11 @@ int ft_enter(struct tree_context* c)
#endif #endif
#endif #endif
#ifdef HAVE_LCD_BITMAP
case FILE_ATTR_SBS: case FILE_ATTR_SBS:
splash(0, ID2P(LANG_WAIT)); splash(0, ID2P(LANG_WAIT));
set_file(buf, (char *)global_settings.sbs_file, MAX_FILENAME); set_file(buf, (char *)global_settings.sbs_file, MAX_FILENAME);
settings_apply_skins(); settings_apply_skins();
break; break;
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
case FILE_ATTR_RSBS: case FILE_ATTR_RSBS:
splash(0, ID2P(LANG_WAIT)); splash(0, ID2P(LANG_WAIT));
@ -610,7 +602,6 @@ int ft_enter(struct tree_context* c)
splash(HZ, ID2P(LANG_LANGUAGE_LOADED)); splash(HZ, ID2P(LANG_LANGUAGE_LOADED));
break; break;
#ifdef HAVE_LCD_BITMAP
case FILE_ATTR_FONT: case FILE_ATTR_FONT:
ft_load_font(buf); ft_load_font(buf);
break; break;
@ -621,7 +612,6 @@ int ft_enter(struct tree_context* c)
splash(HZ, ID2P(LANG_KEYBOARD_LOADED)); splash(HZ, ID2P(LANG_KEYBOARD_LOADED));
set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME);
break; break;
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
/* firmware file */ /* firmware file */

View File

@ -43,11 +43,7 @@
/* max filetypes (plugins & icons stored here) */ /* max filetypes (plugins & icons stored here) */
#define MAX_FILETYPES 192 #define MAX_FILETYPES 192
/* max viewer plugins */ /* max viewer plugins */
#ifdef HAVE_LCD_BITMAP
#define MAX_VIEWERS 56 #define MAX_VIEWERS 56
#else
#define MAX_VIEWERS 24
#endif
/* a table for the known file types */ /* a table for the known file types */
static const struct filetype inbuilt_filetypes[] = { static const struct filetype inbuilt_filetypes[] = {
@ -129,15 +125,11 @@ static const struct filetype inbuilt_filetypes[] = {
{ "lng", FILE_ATTR_LNG, Icon_Language, LANG_LANGUAGE }, { "lng", FILE_ATTR_LNG, Icon_Language, LANG_LANGUAGE },
{ "rock",FILE_ATTR_ROCK,Icon_Plugin, VOICE_EXT_ROCK }, { "rock",FILE_ATTR_ROCK,Icon_Plugin, VOICE_EXT_ROCK },
{ "lua", FILE_ATTR_LUA, Icon_Plugin, VOICE_EXT_ROCK }, { "lua", FILE_ATTR_LUA, Icon_Plugin, VOICE_EXT_ROCK },
#ifdef HAVE_LCD_BITMAP
{ "fnt", FILE_ATTR_FONT,Icon_Font, VOICE_EXT_FONT }, { "fnt", FILE_ATTR_FONT,Icon_Font, VOICE_EXT_FONT },
{ "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD }, { "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD },
#endif
{ "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK }, { "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK },
{ "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET },
#ifdef HAVE_LCD_BITMAP
{ "sbs", FILE_ATTR_SBS, Icon_Wps, VOICE_EXT_SBS }, { "sbs", FILE_ATTR_SBS, Icon_Wps, VOICE_EXT_SBS },
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
{ "rsbs", FILE_ATTR_RSBS, Icon_Wps, VOICE_EXT_RSBS }, { "rsbs", FILE_ATTR_RSBS, Icon_Wps, VOICE_EXT_RSBS },
#if CONFIG_TUNER #if CONFIG_TUNER
@ -289,7 +281,6 @@ void read_color_theme_file(void) {
close(fd); close(fd);
} }
#endif #endif
#ifdef HAVE_LCD_BITMAP
void read_viewer_theme_file(void) void read_viewer_theme_file(void)
{ {
char buffer[MAX_PATH]; char buffer[MAX_PATH];
@ -340,7 +331,6 @@ void read_viewer_theme_file(void)
close(fd); close(fd);
custom_icons_loaded = true; custom_icons_loaded = true;
} }
#endif
void filetype_init(void) void filetype_init(void)
{ {
@ -368,9 +358,7 @@ void filetype_init(void)
read_builtin_types(); read_builtin_types();
read_config(fd); read_config(fd);
close(fd); close(fd);
#ifdef HAVE_LCD_BITMAP
read_viewer_theme_file(); read_viewer_theme_file();
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
read_color_theme_file(); read_color_theme_file();
#endif #endif

View File

@ -236,7 +236,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
int cols = (parent->width / listcfg[screen]->width); int cols = (parent->width / listcfg[screen]->width);
current_column = (cur_line)%cols; current_column = (cur_line)%cols;
current_row = (cur_line)/cols; current_row = (cur_line)/cols;
skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x; skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x;
skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y; skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y;
} }
@ -249,7 +249,6 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
(listcfg[screen]->height*cur_line); (listcfg[screen]->height*cur_line);
} }
display->set_viewport(&skin_viewport->vp); display->set_viewport(&skin_viewport->vp);
#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */ /* Set images to not to be displayed */
struct skin_token_list *imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), wps.data->images); struct skin_token_list *imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), wps.data->images);
while (imglist) while (imglist)
@ -259,13 +258,10 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
img->display = -1; img->display = -1;
imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), imglist->next); imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), imglist->next);
} }
#endif
struct skin_element** children = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->children); struct skin_element** children = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->children);
skin_render_viewport(SKINOFFSETTOPTR(get_skin_buffer(wps.data), (intptr_t)children[0]), skin_render_viewport(SKINOFFSETTOPTR(get_skin_buffer(wps.data), (intptr_t)children[0]),
&wps, skin_viewport, SKIN_REFRESH_ALL); &wps, skin_viewport, SKIN_REFRESH_ALL);
#ifdef HAVE_LCD_BITMAP
wps_display_images(&wps, &skin_viewport->vp); wps_display_images(&wps, &skin_viewport->vp);
#endif
/* force disableing scroll because it breaks later */ /* force disableing scroll because it breaks later */
if (!is_selected) if (!is_selected)
{ {

View File

@ -144,11 +144,7 @@ void screen_put_iconxy(struct screen * display,
void screen_put_cursorxy(struct screen * display, int x, int y, bool on) void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
{ {
#ifdef HAVE_LCD_BITMAP
screen_put_icon(display, x, y, on?Icon_Cursor:0); screen_put_icon(display, x, y, on?Icon_Cursor:0);
#else
screen_put_icon(display, x, y, on?CURSOR_CHAR:-1);
#endif
} }
static int buflib_move_callback(int handle, void* current, void* new) static int buflib_move_callback(int handle, void* current, void* new)

View File

@ -24,11 +24,7 @@
#include "screen_access.h" #include "screen_access.h"
/* Defines a type for the icons since it's not the same thing on /* Defines a type for the icons since it's not the same thing on
* char-based displays and bitmap displays */ * char-based displays and bitmap displays */
#ifdef HAVE_LCD_BITMAP
typedef const unsigned char * ICON; typedef const unsigned char * ICON;
#else
typedef long ICON;
#endif
/* Don't #ifdef icon values, or we wont be able to use the same /* Don't #ifdef icon values, or we wont be able to use the same
bmp for every target. */ bmp for every target. */

View File

@ -294,7 +294,6 @@ next:
} }
} }
#ifdef HAVE_LCD_BITMAP
static void style_line(struct screen *display, static void style_line(struct screen *display,
int x, int y, struct line_desc *line) int x, int y, struct line_desc *line)
{ {
@ -380,7 +379,6 @@ static void style_line(struct screen *display,
} }
#endif #endif
} }
#endif /* HAVE_LCD_BITMAP */
void vput_line(struct screen *display, void vput_line(struct screen *display,
int x, int y, struct line_desc *line, int x, int y, struct line_desc *line,

View File

@ -47,17 +47,14 @@
*/ */
#define FRAMEDROP_TRIGGER 6 #define FRAMEDROP_TRIGGER 6
#ifdef HAVE_LCD_BITMAP
static int offset_step = 16; /* pixels per screen scroll step */ static int offset_step = 16; /* pixels per screen scroll step */
/* should lines scroll out of the screen */ /* should lines scroll out of the screen */
static bool offset_out_of_view = false; static bool offset_out_of_view = false;
#endif
static void gui_list_select_at_offset(struct gui_synclist * gui_list, static void gui_list_select_at_offset(struct gui_synclist * gui_list,
int offset); int offset);
void list_draw(struct screen *display, struct gui_synclist *list); void list_draw(struct screen *display, struct gui_synclist *list);
#ifdef HAVE_LCD_BITMAP
static long last_dirty_tick; static long last_dirty_tick;
static struct viewport parent[NB_SCREENS]; static struct viewport parent[NB_SCREENS];
@ -92,23 +89,7 @@ static void list_init_viewports(struct gui_synclist *list)
} }
list->dirty_tick = current_tick; list->dirty_tick = current_tick;
} }
#else
static struct viewport parent[NB_SCREENS] =
{
[SCREEN_MAIN] =
{
.x = 0,
.y = 0,
.width = LCD_WIDTH,
.height = LCD_HEIGHT
},
};
#define list_init_viewports(a)
#define list_is_dirty(a) false
#endif
#ifdef HAVE_LCD_BITMAP
static int list_nb_lines(struct gui_synclist *list, enum screen_type screen) static int list_nb_lines(struct gui_synclist *list, enum screen_type screen)
{ {
struct viewport *vp = list->parent[screen]; struct viewport *vp = list->parent[screen];
@ -148,13 +129,6 @@ void list_init_item_height(struct gui_synclist *list, enum screen_type screen)
#endif #endif
} }
#else
#define list_display_title(l, i) false
#define list_get_nb_lines(list, screen) \
viewport_get_nb_lines((list)->parent[(screen)]);
#define list_init_item_height(l, i)
#endif
/* /*
* Initializes a scrolling list * Initializes a scrolling list
* - gui_list : the list structure to initialize * - gui_list : the list structure to initialize
@ -181,9 +155,7 @@ void gui_synclist_init(struct gui_synclist * gui_list,
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
gui_list->start_item[i] = 0; gui_list->start_item[i] = 0;
#ifdef HAVE_LCD_BITMAP
gui_list->offset_position[i] = 0; gui_list->offset_position[i] = 0;
#endif
if (list_parent) if (list_parent)
gui_list->parent[i] = &list_parent[i]; gui_list->parent[i] = &list_parent[i];
else else
@ -216,7 +188,6 @@ void gui_synclist_hide_selection_marker(struct gui_synclist * lists, bool hide)
} }
#ifdef HAVE_LCD_BITMAP
int gui_list_get_item_offset(struct gui_synclist * gui_list, int gui_list_get_item_offset(struct gui_synclist * gui_list,
int item_width, int item_width,
int text_pos, int text_pos,
@ -248,7 +219,6 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list,
return item_offset; return item_offset;
} }
#endif
/* /*
* Force a full screen update. * Force a full screen update.
@ -264,9 +234,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
} }
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
#ifdef HAVE_LCD_BITMAP
if (!skinlist_draw(&screens[i], gui_list)) if (!skinlist_draw(&screens[i], gui_list))
#endif
list_draw(&screens[i], gui_list); list_draw(&screens[i], gui_list);
} }
} }
@ -481,7 +449,6 @@ void gui_synclist_del_item(struct gui_synclist * gui_list)
} }
} }
#ifdef HAVE_LCD_BITMAP
void gui_list_screen_scroll_step(int ofs) void gui_list_screen_scroll_step(int ofs)
{ {
offset_step = ofs; offset_step = ofs;
@ -491,7 +458,6 @@ void gui_list_screen_scroll_out_of_view(bool enable)
{ {
offset_out_of_view = enable; offset_out_of_view = enable;
} }
#endif /* HAVE_LCD_BITMAP */
/* /*
* Set the title and title icon of the list. Setting title to NULL disables * Set the title and title icon of the list. Setting title to NULL disables
@ -502,22 +468,18 @@ void gui_synclist_set_title(struct gui_synclist * gui_list,
{ {
gui_list->title = title; gui_list->title = title;
gui_list->title_icon = icon; gui_list->title_icon = icon;
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
sb_set_title_text(title, icon, i); sb_set_title_text(title, icon, i);
#endif
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
} }
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items) void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
{ {
lists->nb_items = nb_items; lists->nb_items = nb_items;
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
lists->offset_position[i] = 0; lists->offset_position[i] = 0;
} }
#endif
} }
int gui_synclist_get_nb_items(struct gui_synclist * lists) int gui_synclist_get_nb_items(struct gui_synclist * lists)
{ {
@ -576,7 +538,6 @@ void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
lists->limit_scroll = scroll; lists->limit_scroll = scroll;
} }
#ifdef HAVE_LCD_BITMAP
/* /*
* Makes all the item in the list scroll by one step to the right. * Makes all the item in the list scroll by one step to the right.
* Should stop increasing the value when reaching the widest item value * Should stop increasing the value when reaching the widest item value
@ -608,7 +569,6 @@ static void gui_synclist_scroll_left(struct gui_synclist * lists)
lists->offset_position[i] = 0; lists->offset_position[i] = 0;
} }
} }
#endif /* HAVE_LCD_BITMAP */
bool gui_synclist_keyclick_callback(int action, void* data) bool gui_synclist_keyclick_callback(int action, void* data)
{ {
@ -652,9 +612,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
int *actionptr, enum list_wrap wrap) int *actionptr, enum list_wrap wrap)
{ {
int action = *actionptr; int action = *actionptr;
#ifdef HAVE_LCD_BITMAP
static bool pgleft_allow_cancel = false; static bool pgleft_allow_cancel = false;
#endif
#ifdef HAVE_WHEEL_ACCELERATION #ifdef HAVE_WHEEL_ACCELERATION
int next_item_modifier = button_apply_acceleration(get_action_data()); int next_item_modifier = button_apply_acceleration(get_action_data());
@ -753,7 +711,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
*actionptr = ACTION_STD_NEXT; *actionptr = ACTION_STD_NEXT;
return true; return true;
#ifdef HAVE_LCD_BITMAP
case ACTION_TREE_PGRIGHT: case ACTION_TREE_PGRIGHT:
gui_synclist_scroll_right(lists); gui_synclist_scroll_right(lists);
gui_synclist_draw(lists); gui_synclist_draw(lists);
@ -784,7 +741,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT
skipping to root */ skipping to root */
return true; return true;
#endif
/* for pgup / pgdown, we are obliged to have a different behaviour depending /* for pgup / pgdown, we are obliged to have a different behaviour depending
* on the screen for which the user pressed the key since for example, remote * on the screen for which the user pressed the key since for example, remote
* and main screen doesn't have the same number of lines */ * and main screen doesn't have the same number of lines */

View File

@ -102,9 +102,7 @@ struct gui_synclist
int selected_size; int selected_size;
/* the number of pixels each line occupies (including optional padding on touchscreen */ /* the number of pixels each line occupies (including optional padding on touchscreen */
int line_height[NB_SCREENS]; int line_height[NB_SCREENS];
#ifdef HAVE_LCD_BITMAP
int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */ int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */
#endif
long scheduled_talk_tick, last_talked_tick, dirty_tick; long scheduled_talk_tick, last_talked_tick, dirty_tick;
list_get_icon *callback_get_item_icon; list_get_icon *callback_get_item_icon;
@ -127,14 +125,12 @@ struct gui_synclist
}; };
#ifdef HAVE_LCD_BITMAP
extern void list_init(void); extern void list_init(void);
/* parse global setting to static int */ /* parse global setting to static int */
extern void gui_list_screen_scroll_step(int ofs); extern void gui_list_screen_scroll_step(int ofs);
/* parse global setting to static bool */ /* parse global setting to static bool */
extern void gui_list_screen_scroll_out_of_view(bool enable); extern void gui_list_screen_scroll_out_of_view(bool enable);
#endif /* HAVE_LCD_BITMAP */
extern void gui_synclist_init( extern void gui_synclist_init(
struct gui_synclist * lists, struct gui_synclist * lists,
@ -179,7 +175,7 @@ extern bool gui_synclist_keyclick_callback(int action, void* data);
extern bool gui_synclist_do_button(struct gui_synclist * lists, extern bool gui_synclist_do_button(struct gui_synclist * lists,
int *action, int *action,
enum list_wrap); enum list_wrap);
#if defined(HAVE_LCD_BITMAP) && !defined(PLUGIN) #if !defined(PLUGIN)
struct listitem_viewport_cfg { struct listitem_viewport_cfg {
struct wps_data *data; struct wps_data *data;
OFFSETTYPE(char *) label; OFFSETTYPE(char *) label;
@ -204,7 +200,7 @@ enum themable_icons skinlist_get_item_icon(int offset, bool wrap);
bool skinlist_needs_scrollbar(enum screen_type screen); bool skinlist_needs_scrollbar(enum screen_type screen);
void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown); void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown);
int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list); int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list);
#endif #endif /* !PLUGIN) */
#if defined(HAVE_TOUCHSCREEN) #if defined(HAVE_TOUCHSCREEN)
/* this needs to be fixed if we ever get more than 1 touchscreen on a target */ /* this needs to be fixed if we ever get more than 1 touchscreen on a target */

View File

@ -20,7 +20,6 @@
****************************************************************************/ ****************************************************************************/
#include "scrollbar.h" #include "scrollbar.h"
#ifdef HAVE_LCD_BITMAP
#include "config.h" #include "config.h"
#include "limits.h" #include "limits.h"
#include "bmp.h" #include "bmp.h"
@ -264,5 +263,3 @@ void show_busy_slider(struct screen *s, int x, int y, int width, int height)
dir = 1; dir = 1;
} }
} }
#endif /* HAVE_LCD_BITMAP */

View File

@ -23,8 +23,6 @@
#define _GUI_SCROLLBAR_H_ #define _GUI_SCROLLBAR_H_
#include "screen_access.h" #include "screen_access.h"
#ifdef HAVE_LCD_BITMAP
enum orientation { enum orientation {
VERTICAL = 0x0000, /* Vertical orientation */ VERTICAL = 0x0000, /* Vertical orientation */
HORIZONTAL = 0x0001, /* Horizontal orientation */ HORIZONTAL = 0x0001, /* Horizontal orientation */
@ -64,5 +62,4 @@ extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap *bm,
unsigned flags); unsigned flags);
extern void show_busy_slider(struct screen *s, int x, int y, extern void show_busy_slider(struct screen *s, int x, int y,
int width, int height); int width, int height);
#endif /* HAVE_LCD_BITMAP */
#endif /* _GUI_SCROLLBAR_H_ */ #endif /* _GUI_SCROLLBAR_H_ */

View File

@ -47,14 +47,12 @@
#include "list.h" #include "list.h"
#include "option_select.h" #include "option_select.h"
#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h" #include "peakmeter.h"
/* Image stuff */ /* Image stuff */
#include "bmp.h" #include "bmp.h"
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
#include "albumart.h" #include "albumart.h"
#endif #endif
#endif
#include "cuesheet.h" #include "cuesheet.h"
#include "playback.h" #include "playback.h"
@ -93,9 +91,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
SKIN_REFRESH_ALL : update_type); SKIN_REFRESH_ALL : update_type);
} }
#ifdef HAVE_LCD_BITMAP
#ifdef AB_REPEAT_ENABLE #ifdef AB_REPEAT_ENABLE
#define DIRECTION_RIGHT 1 #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; int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
unsigned long length, end; unsigned long length, end;
int flags = HORIZONTAL; int flags = HORIZONTAL;
if (height < 0) if (height < 0)
height = font_get(vp->font)->height; 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); display->set_drawmode(DRMODE_SOLID);
} }
#endif /* HAVE_LCD_BITMAP */
/* Evaluate the conditional that is at *token_index and return whether a skip /* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position. 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 else
{ {
linedes->scroll = false; linedes->scroll = false;
#ifdef HAVE_LCD_BITMAP
/* clear the line first */ /* clear the line first */
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fillrect(0, line*string_height, viewport_width, string_height); display->fillrect(0, line*string_height, viewport_width, string_height);
display->set_drawmode(DRMODE_SOLID); display->set_drawmode(DRMODE_SOLID);
#endif
/* Nasty hack: we output an empty scrolling string, /* Nasty hack: we output an empty scrolling string,
which will reset the scroller for that line */ which will reset the scroller for that line */
display->puts_scroll(0, line, (unsigned char *)""); display->puts_scroll(0, line, (unsigned char *)"");
#ifdef HAVE_LCD_BITMAP
line *= string_height; line *= string_height;
center_xpos = (viewport_width-center_width)/2; center_xpos = (viewport_width-center_width)/2;
right_xpos = viewport_width-right_width; right_xpos = viewport_width-right_width;
#endif
/* print aligned strings. print whole line at once so that %Vs works /* print aligned strings. print whole line at once so that %Vs works
* across the full viewport width */ * across the full viewport width */
char *left = format_align->left ?: ""; 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, void draw_peakmeters(struct gui_wps *gwps, int line_number,
struct viewport *viewport) struct viewport *viewport)
{ {
@ -645,15 +633,12 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
(void)screen; (void)screen;
(void)data; (void)data;
bool draw = false; bool draw = false;
#ifdef HAVE_LCD_BITMAP
if (data->wps_sb_tag) if (data->wps_sb_tag)
draw = data->show_sb_on_wps; draw = data->show_sb_on_wps;
else if (statusbar_position(screen) != STATUSBAR_OFF) else if (statusbar_position(screen) != STATUSBAR_OFF)
draw = true; draw = true;
#endif
return draw; return draw;
} }
#endif
/* do the button loop as often as required for the peak meters to update /* do the button loop as often as required for the peak meters to update
* with a good refresh rate. * 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 skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
{ {
int button = ACTION_NONE; int button = ACTION_NONE;
#ifdef HAVE_LCD_BITMAP
/* when the peak meter is enabled we want to have a /* when the peak meter is enabled we want to have a
few extra updates to make it look smooth. On the few extra updates to make it look smooth. On the
other hand we don't want to waste energy if it 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 /* The peak meter is disabled
-> no additional screen updates needed */ -> no additional screen updates needed */
else else
#endif
{ {
button = get_action(context, timeout); button = get_action(context, timeout);
} }

View File

@ -29,7 +29,6 @@
#define _SKIN_DISPLAY_H_ #define _SKIN_DISPLAY_H_
#ifdef HAVE_LCD_BITMAP
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb); void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb);
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer); void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
/* clears the area where the image was shown */ /* 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, void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
struct skin_viewport* skin_viewport, unsigned long refresh_type); struct skin_viewport* skin_viewport, unsigned long refresh_type);
#endif
/* Evaluate the conditional that is at *token_index and return whether a skip /* Evaluate the conditional that is at *token_index and return whether a skip
has ocurred. *token_index is updated with the new position. has ocurred. *token_index is updated with the new position.

View File

@ -56,9 +56,7 @@ static struct gui_skin_helper {
char* (*default_skin)(enum screen_type screen); char* (*default_skin)(enum screen_type screen);
bool load_on_boot; bool load_on_boot;
} skin_helpers[SKINNABLE_SCREENS_COUNT] = { } skin_helpers[SKINNABLE_SCREENS_COUNT] = {
#ifdef HAVE_LCD_BITMAP
[CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true }, [CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true },
#endif
[WPS] = { NULL, NULL, wps_default_skin, true }, [WPS] = { NULL, NULL, wps_default_skin, true },
#if CONFIG_TUNER #if CONFIG_TUNER
[FM_SCREEN] = { NULL, NULL, default_radio_skin, false } [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 #ifdef HAVE_SKIN_VARIABLES
skin->data.skinvars = -1; skin->data.skinvars = -1;
#endif #endif
#ifdef HAVE_LCD_BITMAP
skin->data.font_ids = -1; skin->data.font_ids = -1;
skin->data.images = -1; skin->data.images = -1;
#endif
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
skin->data.albumart = -1; skin->data.albumart = -1;
skin->data.playback_aa_slot = -1; skin->data.playback_aa_slot = -1;
@ -157,9 +153,7 @@ void settings_apply_skins(void)
char filename[MAX_PATH]; char filename[MAX_PATH];
static bool first_run = true; static bool first_run = true;
#ifdef HAVE_LCD_BITMAP
skin_backdrop_init(); skin_backdrop_init();
#endif
skins_initialised = true; skins_initialised = true;
/* Make sure each skin is loaded */ /* 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; char *setting = NULL, *ext = NULL;
switch (skin) switch (skin)
{ {
#ifdef HAVE_LCD_BITMAP
case CUSTOM_STATUSBAR: case CUSTOM_STATUSBAR:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE) if (screen == SCREEN_REMOTE)
@ -251,7 +244,6 @@ static char* get_skin_filename(char *buf, size_t buf_size,
ext = "sbs"; ext = "sbs";
} }
break; break;
#endif
case WPS: case WPS:
#if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1
if (screen == SCREEN_REMOTE) 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) struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen)
{ {
#ifdef HAVE_LCD_BITMAP
if (skin == CUSTOM_STATUSBAR && !skins_initialised) if (skin == CUSTOM_STATUSBAR && !skins_initialised)
return &skins[skin][screen].gui_wps; return &skins[skin][screen].gui_wps;
#endif
if (skins[skin][screen].data.wps_loaded == false) if (skins[skin][screen].data.wps_loaded == false)
{ {

View File

@ -30,15 +30,12 @@
#include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */ #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
enum skinnable_screens { enum skinnable_screens {
#ifdef HAVE_LCD_BITMAP
CUSTOM_STATUSBAR, CUSTOM_STATUSBAR,
#endif
WPS, WPS,
#if CONFIG_TUNER #if CONFIG_TUNER
FM_SCREEN, FM_SCREEN,
#endif #endif
SKINNABLE_SCREENS_COUNT SKINNABLE_SCREENS_COUNT
}; };

View File

@ -66,9 +66,7 @@
#include "tuner.h" #include "tuner.h"
#endif #endif
#ifdef HAVE_LCD_BITMAP
#include "bmp.h" #include "bmp.h"
#endif
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
#include "playback.h" #include "playback.h"
@ -127,7 +125,6 @@ typedef int (*parse_function)(struct skin_element *element,
struct wps_token *token, struct wps_token *token,
struct wps_data *wps_data); 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 /* add a skin_token_list item to the list chain. ALWAYS appended because some of the
* chains require the order to be kept. * 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, void *skin_find_item(const char *label, enum skin_find_what what,
struct wps_data *data) 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); list.vplist = SKINOFFSETTOPTR(databuf, data->tree);
isvplist = true; isvplist = true;
break; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE: case SKIN_FIND_IMAGE:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->images); list.linkedlist = SKINOFFSETTOPTR(databuf, data->images);
break; break;
#endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION: case SKIN_FIND_TOUCHREGION:
list.linkedlist = SKINOFFSETTOPTR(databuf, data->touchregions); 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) while (list.linkedlist)
{ {
bool skip = false; bool skip = false;
#ifdef HAVE_LCD_BITMAP
struct wps_token *token = NULL; struct wps_token *token = NULL;
if (!isvplist) if (!isvplist)
token = SKINOFFSETTOPTR(databuf, list.linkedlist->token); token = SKINOFFSETTOPTR(databuf, list.linkedlist->token);
#endif
switch (what) switch (what)
{ {
case SKIN_FIND_UIVP: 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 == skip = !(((struct skin_viewport *)ret)->is_infovp ==
(what==SKIN_FIND_UIVP)); (what==SKIN_FIND_UIVP));
break; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_FIND_IMAGE: case SKIN_FIND_IMAGE:
ret = SKINOFFSETTOPTR(databuf, token->value.data); ret = SKINOFFSETTOPTR(databuf, token->value.data);
itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label); itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label);
break; break;
#endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION: case SKIN_FIND_TOUCHREGION:
ret = SKINOFFSETTOPTR(databuf, token->value.data); ret = SKINOFFSETTOPTR(databuf, token->value.data);
@ -240,8 +228,6 @@ void *skin_find_item(const char *label, enum skin_find_what what,
return NULL; return NULL;
} }
#ifdef HAVE_LCD_BITMAP
/* create and init a new wpsll item. /* create and init a new wpsll item.
* passing NULL to token will alloc a new one. * passing NULL to token will alloc a new one.
* You should only pass NULL for the token when the token type (table above) * 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; return 0;
} }
#ifdef HAVE_LCD_BITMAP
static int parse_playlistview(struct skin_element *element, static int parse_playlistview(struct skin_element *element,
struct wps_token *token, struct wps_token *token,
struct wps_data *wps_data) struct wps_data *wps_data)
@ -513,7 +496,7 @@ static int parse_playlistview(struct skin_element *element,
return 0; return 0;
} }
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
static int parse_viewport_gradient_setup(struct skin_element *element, static int parse_viewport_gradient_setup(struct skin_element *element,
struct wps_token *token, struct wps_token *token,
@ -756,8 +739,6 @@ static int parse_image_special(struct skin_element *element,
} }
#endif #endif
#endif /* HAVE_LCD_BITMAP */
static int parse_progressbar_tag(struct skin_element* element, static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token, struct wps_token *token,
struct wps_data *wps_data); struct wps_data *wps_data);
@ -898,7 +879,6 @@ static int parse_progressbar_tag(struct skin_element* element,
struct wps_token *token, struct wps_token *token,
struct wps_data *wps_data) struct wps_data *wps_data)
{ {
#ifdef HAVE_LCD_BITMAP
struct progressbar *pb; struct progressbar *pb;
struct viewport *vp = &curr_vp->vp; struct viewport *vp = &curr_vp->vp;
struct skin_tag_parameter *param = get_param(element, 0); 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); add_to_ll_chain(&wps_data->touchregions, item);
} }
#endif #endif
return 0; 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 #ifdef HAVE_ALBUMART
@ -1741,7 +1708,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
{ {
if (wps_data->wps_loaded) if (wps_data->wps_loaded)
skin_buffer = get_skin_buffer(wps_data); skin_buffer = get_skin_buffer(wps_data);
#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__ #ifndef __PCTOOL__
struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images); struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images);
int *font_ids = SKINOFFSETTOPTR(skin_buffer, wps_data->font_ids); 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); core_free(wps_data->buflib_handle);
wps_data->buflib_handle = -1; wps_data->buflib_handle = -1;
#endif #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) static void skin_data_reset(struct wps_data *wps_data)
{ {
skin_data_free_buflib_allocs(wps_data); skin_data_free_buflib_allocs(wps_data);
#ifdef HAVE_LCD_BITMAP
wps_data->images = INVALID_OFFSET; wps_data->images = INVALID_OFFSET;
#endif
wps_data->tree = INVALID_OFFSET; wps_data->tree = INVALID_OFFSET;
#ifdef HAVE_BACKDROP_IMAGE #ifdef HAVE_BACKDROP_IMAGE
if (wps_data->backdrop_id >= 0) if (wps_data->backdrop_id >= 0)
@ -1811,15 +1774,12 @@ static void skin_data_reset(struct wps_data *wps_data)
} }
#endif #endif
#ifdef HAVE_LCD_BITMAP
wps_data->peak_meter_enabled = false; wps_data->peak_meter_enabled = false;
wps_data->wps_sb_tag = false; wps_data->wps_sb_tag = false;
wps_data->show_sb_on_wps = false; wps_data->show_sb_on_wps = false;
#endif
wps_data->wps_loaded = false; wps_data->wps_loaded = false;
} }
#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__ #ifndef __PCTOOL__
static int currently_loading_handle = -1; static int currently_loading_handle = -1;
static int buflib_move_callback(int handle, void* current, void* new) 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; return success;
} }
#endif /* HAVE_LCD_BITMAP */
static int convert_viewport(struct wps_data *data, struct skin_element* element) static int convert_viewport(struct wps_data *data, struct skin_element* element)
{ {
struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(*skin_vp)); 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; skin_vp->vp.height = display->lcdheight - skin_vp->vp.y;
} }
param++; param++;
#ifdef HAVE_LCD_BITMAP
/* font */ /* font */
if (!isdefault(param)) if (!isdefault(param))
skin_vp->parsed_fontid = param->data.number; skin_vp->parsed_fontid = param->data.number;
#endif
if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth || if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth ||
skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth || skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth ||
(unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight || (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: case SKIN_TOKEN_TRACK_ENDING:
function = parse_timeout_tag; function = parse_timeout_tag;
break; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_TEXT: case SKIN_TOKEN_LIST_ITEM_TEXT:
case SKIN_TOKEN_LIST_ITEM_ICON: case SKIN_TOKEN_LIST_ITEM_ICON:
function = parse_listitem; function = parse_listitem;
@ -2274,7 +2230,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
sb_skin_has_title(curr_screen); sb_skin_has_title(curr_screen);
#endif #endif
break; break;
#endif
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
case SKIN_TOKEN_DRAWRECTANGLE: case SKIN_TOKEN_DRAWRECTANGLE:
function = parse_drawrectangle; function = parse_drawrectangle;
@ -2309,7 +2264,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_SETTING: case SKIN_TOKEN_SETTING:
function = parse_setting_and_lang; function = parse_setting_and_lang;
break; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_VIEWPORT_CUSTOMLIST: case SKIN_TOKEN_VIEWPORT_CUSTOMLIST:
function = parse_playlistview; function = parse_playlistview;
break; break;
@ -2331,7 +2285,6 @@ static int skin_element_callback(struct skin_element* element, void* data)
case SKIN_TOKEN_LIST_ITEM_CFG: case SKIN_TOKEN_LIST_ITEM_CFG:
function = parse_listitemviewport; function = parse_listitemviewport;
break; break;
#endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
case SKIN_TOKEN_TOUCHREGION: case SKIN_TOKEN_TOUCHREGION:
function = parse_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; char *wps_buffer = NULL;
if (!wps_data || !buf) if (!wps_data || !buf)
return false; return false;
#ifdef HAVE_LCD_BITMAP
int i; int i;
for (i=0;i<MAXUSERFONTS;i++) for (i=0;i<MAXUSERFONTS;i++)
{ {
skinfonts[i].id = -1; skinfonts[i].id = -1;
skinfonts[i].name = NULL; skinfonts[i].name = NULL;
} }
#endif
#ifdef DEBUG_SKIN_ENGINE #ifdef DEBUG_SKIN_ENGINE
if (isfile && debug_wps) if (isfile && debug_wps)
{ {
@ -2504,7 +2455,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
return false; return false;
} }
#ifdef HAVE_LCD_BITMAP
char bmpdir[MAX_PATH]; char bmpdir[MAX_PATH];
if (isfile) if (isfile)
{ {
@ -2523,7 +2473,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
skin_data_reset(wps_data); skin_data_reset(wps_data);
return false; return false;
} }
#endif
#if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__)
/* last_albumart_{width,height} is either both 0 or valid AA dimensions */ /* last_albumart_{width,height} is either both 0 or valid AA dimensions */
struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart);

View File

@ -77,12 +77,10 @@ struct skin_draw_info {
typedef bool (*skin_render_func)(struct skin_element* alternator, struct skin_draw_info *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); 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, static void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps, struct gui_wps *gwps,
struct skin_viewport* skin_viewport, struct skin_viewport* skin_viewport,
unsigned long refresh_type); unsigned long refresh_type);
#endif
static char* skin_buffer; 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); struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data);
#ifdef HAVE_LCD_BITMAP
struct viewport *vp = &skin_vp->vp; struct viewport *vp = &skin_vp->vp;
struct wps_data *data = gwps->data; struct wps_data *data = gwps->data;
bool do_refresh = (element->tag->flags & info->refresh_type) > 0; bool do_refresh = (element->tag->flags & info->refresh_type) > 0;
#endif
switch (token->type) switch (token->type)
{ {
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) #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; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_ITEM_CFG: case SKIN_TOKEN_LIST_ITEM_CFG:
skinlist_set_cfg(gwps->display->screen_type, skinlist_set_cfg(gwps->display->screen_type,
SKINOFFSETTOPTR(skin_buffer, token->value.data)); 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: case SKIN_TOKEN_PEAKMETER_RIGHTBAR:
data->peak_meter_enabled = true; data->peak_meter_enabled = true;
/* fall through to the progressbar code */ /* fall through to the progressbar code */
#endif
case SKIN_TOKEN_VOLUMEBAR: case SKIN_TOKEN_VOLUMEBAR:
case SKIN_TOKEN_BATTERY_PERCENTBAR: case SKIN_TOKEN_BATTERY_PERCENTBAR:
case SKIN_TOKEN_SETTINGBAR: case SKIN_TOKEN_SETTINGBAR:
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_PROGRESSBAR: case SKIN_TOKEN_PROGRESSBAR:
case SKIN_TOKEN_TUNER_RSSI_BAR: case SKIN_TOKEN_TUNER_RSSI_BAR:
case SKIN_TOKEN_LIST_SCROLLBAR: 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) if (do_refresh)
draw_progressbar(gwps, info->line_number, bar); draw_progressbar(gwps, info->line_number, bar);
} }
#endif
break; break;
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_IMAGE_DISPLAY: case SKIN_TOKEN_IMAGE_DISPLAY:
{ {
struct gui_img *img = SKINOFFSETTOPTR(skin_buffer, token->value.data); 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, skin_render_playlistviewer(SKINOFFSETTOPTR(skin_buffer, token->value.data), gwps,
info->skin_vp, info->refresh_type); info->skin_vp, info->refresh_type);
break; break;
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_SKIN_VARIABLES #ifdef HAVE_SKIN_VARIABLES
case SKIN_TOKEN_VAR_SET: 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; return true;
} }
static void do_tags_in_hidden_conditional(struct skin_element* branch, static void do_tags_in_hidden_conditional(struct skin_element* branch,
struct skin_draw_info *info) struct skin_draw_info *info)
{ {
#ifdef HAVE_LCD_BITMAP
struct gui_wps *gwps = info->gwps; struct gui_wps *gwps = info->gwps;
struct wps_data *data = gwps->data; struct wps_data *data = gwps->data;
#endif
/* Tags here are ones which need to be "turned off" or cleared /* Tags here are ones which need to be "turned off" or cleared
* if they are in a conditional branch which isnt being used */ * if they are in a conditional branch which isnt being used */
if (branch->type == LINE_ALTERNATOR) 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) else if (branch->type == LINE && branch->children_count)
{ {
struct skin_element *child = get_child(branch->children, 0); struct skin_element *child = get_child(branch->children, 0);
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
struct wps_token *token; struct wps_token *token;
#endif
while (child) while (child)
{ {
if (child->type == CONDITIONAL) 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); child = SKINOFFSETTOPTR(skin_buffer, child->next);
continue; continue;
} }
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART)
token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data); token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data);
#endif
#ifdef HAVE_LCD_BITMAP
/* clear all pictures in the conditional and nested ones */ /* clear all pictures in the conditional and nested ones */
if (token->type == SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY) 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)) viewport = SKINOFFSETTOPTR(skin_buffer, viewport->next))
{ {
struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data);
char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label); char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label);
if (skin_viewport->label == VP_DEFAULT_LABEL) if (skin_viewport->label == VP_DEFAULT_LABEL)
vplabel = VP_DEFAULT_LABEL_STRING; vplabel = VP_DEFAULT_LABEL_STRING;
@ -460,7 +441,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch,
} }
} }
} }
#endif
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
else if (data->albumart && token->type == SKIN_TOKEN_ALBUMART_DISPLAY) 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, .offset = 0,
.line_desc = LINE_DESC_DEFINIT, .line_desc = LINE_DESC_DEFINIT,
}; };
struct align_pos * align = &info.align; struct align_pos * align = &info.align;
bool needs_update, update_all = false; bool needs_update, update_all = false;
skin_buffer = get_skin_buffer(gwps->data); skin_buffer = get_skin_buffer(gwps->data);
#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */ /* Set images to not to be displayed */
struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images); struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images);
while (imglist) while (imglist)
@ -752,10 +731,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
/* fix font ID's */ /* fix font ID's */
if (skin_viewport->parsed_fontid == 1) if (skin_viewport->parsed_fontid == 1)
skin_viewport->vp.font = display->getuifont(); skin_viewport->vp.font = display->getuifont();
#endif
while (line) while (line)
{ {
linebuf[0] = '\0'; linebuf[0] = '\0';
@ -811,9 +787,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps,
info.line_number++; info.line_number++;
line = SKINOFFSETTOPTR(skin_buffer, line->next); line = SKINOFFSETTOPTR(skin_buffer, line->next);
} }
#ifdef HAVE_LCD_BITMAP
wps_display_images(gwps, &skin_viewport->vp); wps_display_images(gwps, &skin_viewport->vp);
#endif
} }
void skin_render(struct gui_wps *gwps, unsigned refresh_mode) 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(); display->update();
} }
#ifdef HAVE_LCD_BITMAP static __attribute__((noinline))
static __attribute__((noinline))
void skin_render_playlistviewer(struct playlistviewer* viewer, void skin_render_playlistviewer(struct playlistviewer* viewer,
struct gui_wps *gwps, struct gui_wps *gwps,
struct skin_viewport* skin_viewport, struct skin_viewport* skin_viewport,
@ -926,7 +899,7 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
.offset = viewer->start_offset, .offset = viewer->start_offset,
.line_desc = LINE_DESC_DEFINIT, .line_desc = LINE_DESC_DEFINIT,
}; };
struct align_pos * align = &info.align; struct align_pos * align = &info.align;
bool needs_update; bool needs_update;
int cur_pos, start_item, max; int cur_pos, start_item, max;
@ -989,4 +962,3 @@ void skin_render_playlistviewer(struct playlistviewer* viewer,
start_item++; start_item++;
} }
} }
#endif

View File

@ -41,11 +41,9 @@
#include "lang.h" #include "lang.h"
#include "misc.h" #include "misc.h"
#include "led.h" #include "led.h"
#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h" #include "peakmeter.h"
/* Image stuff */ /* Image stuff */
#include "albumart.h" #include "albumart.h"
#endif
#include "playlist.h" #include "playlist.h"
#include "playback.h" #include "playback.h"
#include "tdspeed.h" #include "tdspeed.h"
@ -813,7 +811,6 @@ const char *get_token_value(struct gui_wps *gwps,
if (intval) if (intval)
*intval = playlist_amount(); *intval = playlist_amount();
return buf; return buf;
#ifdef HAVE_LCD_BITMAP
case SKIN_TOKEN_LIST_TITLE_TEXT: case SKIN_TOKEN_LIST_TITLE_TEXT:
return sb_get_title(gwps->display->screen_type); return sb_get_title(gwps->display->screen_type);
case SKIN_TOKEN_LIST_TITLE_ICON: 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: case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR:
return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : ""; return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : "";
#endif
case SKIN_TOKEN_PLAYLIST_NAME: case SKIN_TOKEN_PLAYLIST_NAME:
return playlist_name(NULL, buf, buf_size); return playlist_name(NULL, buf, buf_size);
@ -1202,7 +1198,6 @@ const char *get_token_value(struct gui_wps *gwps,
return "-"; return "-";
#endif #endif
#ifdef HAVE_LCD_BITMAP
/* peakmeter */ /* peakmeter */
case SKIN_TOKEN_PEAKMETER_LEFT: case SKIN_TOKEN_PEAKMETER_LEFT:
case SKIN_TOKEN_PEAKMETER_RIGHT: case SKIN_TOKEN_PEAKMETER_RIGHT:
@ -1218,7 +1213,6 @@ const char *get_token_value(struct gui_wps *gwps,
data->peak_meter_enabled = true; data->peak_meter_enabled = true;
return buf; return buf;
} }
#endif
case SKIN_TOKEN_CROSSFADE: case SKIN_TOKEN_CROSSFADE:
#ifdef HAVE_CROSSFADE #ifdef HAVE_CROSSFADE

View File

@ -80,7 +80,6 @@ struct skin_token_list {
OFFSETTYPE(struct skin_token_list *) next; OFFSETTYPE(struct skin_token_list *) next;
}; };
#ifdef HAVE_LCD_BITMAP
struct gui_img { struct gui_img {
OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */ OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */
short int x; /* x-pos */ short int x; /* x-pos */
@ -137,9 +136,6 @@ struct draw_rectangle {
unsigned start_colour; unsigned start_colour;
unsigned end_colour; unsigned end_colour;
}; };
#endif
struct align_pos { struct align_pos {
char* left; char* left;
@ -147,11 +143,7 @@ struct align_pos {
char* right; char* right;
}; };
#ifdef HAVE_LCD_BITMAP
#define WPS_MAX_TOKENS 1150 #define WPS_MAX_TOKENS 1150
#else
#define WPS_MAX_TOKENS 64
#endif
enum wps_parse_error { enum wps_parse_error {
PARSE_OK, PARSE_OK,
@ -344,11 +336,9 @@ struct wps_data
int buflib_handle; int buflib_handle;
OFFSETTYPE(struct skin_element *) tree; OFFSETTYPE(struct skin_element *) tree;
#ifdef HAVE_LCD_BITMAP
OFFSETTYPE(struct skin_token_list *) images; OFFSETTYPE(struct skin_token_list *) images;
OFFSETTYPE(int *) font_ids; OFFSETTYPE(int *) font_ids;
int font_count; int font_count;
#endif
#ifdef HAVE_BACKDROP_IMAGE #ifdef HAVE_BACKDROP_IMAGE
int backdrop_id; int backdrop_id;
bool use_extra_framebuffer; bool use_extra_framebuffer;
@ -370,11 +360,9 @@ struct wps_data
OFFSETTYPE(struct skin_token_list *) skinvars; OFFSETTYPE(struct skin_token_list *) skinvars;
#endif #endif
#ifdef HAVE_LCD_BITMAP
bool peak_meter_enabled; bool peak_meter_enabled;
bool wps_sb_tag; bool wps_sb_tag;
bool show_sb_on_wps; bool show_sb_on_wps;
#endif
bool wps_loaded; bool wps_loaded;
}; };
@ -448,9 +436,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
enum skin_find_what { enum skin_find_what {
SKIN_FIND_VP = 0, SKIN_FIND_VP = 0,
SKIN_FIND_UIVP, SKIN_FIND_UIVP,
#ifdef HAVE_LCD_BITMAP
SKIN_FIND_IMAGE, SKIN_FIND_IMAGE,
#endif
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
SKIN_FIND_TOUCHREGION, SKIN_FIND_TOUCHREGION,
#endif #endif

View File

@ -31,16 +31,11 @@
#include "viewport.h" #include "viewport.h"
#include "strtok_r.h" #include "strtok_r.h"
#ifdef HAVE_LCD_BITMAP
#define MAXLINES (LCD_HEIGHT/6) #define MAXLINES (LCD_HEIGHT/6)
#define MAXBUFFER 512 #define MAXBUFFER 512
#define RECT_SPACING 2 #define RECT_SPACING 2
#define SPLASH_MEMORY_INTERVAL (HZ) #define SPLASH_MEMORY_INTERVAL (HZ)
#endif
static void splash_internal(struct screen * screen, const char *fmt, va_list ap) static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
{ {
char splash_buf[MAXBUFFER]; char splash_buf[MAXBUFFER];
@ -54,15 +49,13 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
int y, i; int y, i;
int space_w, w, h; int space_w, w, h;
struct viewport vp; struct viewport vp;
#ifdef HAVE_LCD_BITMAP
int width, height; int width, height;
int maxw = 0; int maxw = 0;
viewport_set_defaults(&vp, screen->screen_type); viewport_set_defaults(&vp, screen->screen_type);
screen->set_viewport(&vp); screen->set_viewport(&vp);
screen->getstringsize(" ", &space_w, &h); screen->getstringsize(" ", &space_w, &h);
#endif
y = h; y = h;
vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap); vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap);
@ -77,20 +70,14 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
lines[0] = next; lines[0] = next;
while (true) while (true)
{ {
#ifdef HAVE_LCD_BITMAP
screen->getstringsize(next, &w, NULL); screen->getstringsize(next, &w, NULL);
#else
w = utf8length(next);
#endif
if (lastbreak) if (lastbreak)
{ {
if (x + (next - lastbreak) * space_w + w if (x + (next - lastbreak) * space_w + w
> vp.width - RECT_SPACING*2) > vp.width - RECT_SPACING*2)
{ /* too wide, wrap */ { /* too wide, wrap */
#ifdef HAVE_LCD_BITMAP
if (x > maxw) if (x > maxw)
maxw = x; maxw = x;
#endif
if ((y + h > vp.height) || (line >= (MAXLINES-1))) if ((y + h > vp.height) || (line >= (MAXLINES-1)))
break; /* screen full or out of lines */ break; /* screen full or out of lines */
x = 0; x = 0;
@ -109,10 +96,8 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
next = strtok_r(NULL, " ", &store); next = strtok_r(NULL, " ", &store);
if (!next) if (!next)
{ /* no more words */ { /* no more words */
#ifdef HAVE_LCD_BITMAP
if (x > maxw) if (x > maxw)
maxw = x; maxw = x;
#endif
break; break;
} }
} }
@ -123,8 +108,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
screen->scroll_stop(); screen->scroll_stop();
#ifdef HAVE_LCD_BITMAP
width = maxw + 2*RECT_SPACING; width = maxw + 2*RECT_SPACING;
height = y + 2*RECT_SPACING; height = y + 2*RECT_SPACING;
@ -166,14 +149,11 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
/* prepare putting the text */ /* prepare putting the text */
y = RECT_SPACING; y = RECT_SPACING;
#endif
/* print the message to screen */ /* print the message to screen */
for (i = 0; i <= line; i++, y+=h) for (i = 0; i <= line; i++, y+=h)
{ {
#ifdef HAVE_LCD_BITMAP
screen->putsxy(0, y, lines[i]); screen->putsxy(0, y, lines[i]);
#endif
} }
screen->update_viewport(); screen->update_viewport();
end: end:

View File

@ -23,8 +23,6 @@
#define DEFAULT_UPDATE_DELAY (HZ/7) #define DEFAULT_UPDATE_DELAY (HZ/7)
#ifdef HAVE_LCD_BITMAP
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -57,14 +55,5 @@ int sb_get_backdrop(enum screen_type screen);
int sb_preproccess(enum screen_type screen, struct wps_data *data); int sb_preproccess(enum screen_type screen, struct wps_data *data);
int sb_postproccess(enum screen_type screen, struct wps_data *data); int sb_postproccess(enum screen_type screen, struct wps_data *data);
#else /* CHARCELL */
#define sb_skin_init()
#define sb_skin_data_load(a,b,c)
#define sb_skin_set_update_delay(a)
#define sb_skin_set_state(a,b)
#define sb_create_from_settings NULL
#define sb_preproccess NULL
#define sb_postproccess NULL
#endif
void do_sbs_update_callback(unsigned short id, void *param); void do_sbs_update_callback(unsigned short id, void *param);
#endif /* __STATUSBAR_SKINNED_H__ */ #endif /* __STATUSBAR_SKINNED_H__ */

View File

@ -132,7 +132,6 @@
struct gui_syncstatusbar statusbars; struct gui_syncstatusbar statusbars;
/* Prototypes */ /* Prototypes */
#ifdef HAVE_LCD_BITMAP
static void gui_statusbar_icon_battery(struct screen * display, int percent, static void gui_statusbar_icon_battery(struct screen * display, int percent,
int batt_charge_step); int batt_charge_step);
static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume); static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume);
@ -152,7 +151,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display);
#if CONFIG_RTC #if CONFIG_RTC
static void gui_statusbar_time(struct screen * display, struct tm *time); static void gui_statusbar_time(struct screen * display, struct tm *time);
#endif #endif
#endif
/* End prototypes */ /* End prototypes */
@ -242,7 +240,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
} }
bar->info.volume = global_settings.volume; bar->info.volume = global_settings.volume;
#ifdef HAVE_LCD_BITMAP
bar->info.shuffle = global_settings.playlist_shuffle; bar->info.shuffle = global_settings.playlist_shuffle;
#ifdef HAS_BUTTON_HOLD #ifdef HAS_BUTTON_HOLD
bar->info.keylock = button_hold(); bar->info.keylock = button_hold();
@ -349,11 +346,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
display->set_viewport(NULL); display->set_viewport(NULL);
bar->lastinfo = bar->info; bar->lastinfo = bar->info;
} }
#endif /* HAVE_LCD_BITMAP */
} }
#ifdef HAVE_LCD_BITMAP
/* from icon.c */ /* from icon.c */
/* /*
* Print battery icon to status bar * Print battery icon to status bar
@ -717,8 +711,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display)
} }
#endif /* HAVE_RECORDING */ #endif /* HAVE_RECORDING */
#endif /* HAVE_LCD_BITMAP */
void gui_syncstatusbar_init(struct gui_syncstatusbar * bars) void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
{ {
FOR_NB_SCREENS(i) { FOR_NB_SCREENS(i) {
@ -730,7 +722,6 @@ void gui_syncstatusbar_init(struct gui_syncstatusbar * bars)
void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
bool force_redraw) bool force_redraw)
{ {
#ifdef HAVE_LCD_BITMAP
if(!global_settings.statusbar) if(!global_settings.statusbar)
return; return;
struct viewport viewport; struct viewport viewport;
@ -738,9 +729,6 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
GET_RECT(viewport,statusbar_position(i),&screens[i]); GET_RECT(viewport,statusbar_position(i),&screens[i]);
gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport ); gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport );
} }
#else
gui_statusbar_draw( &(bars->statusbars[0]), force_redraw, NULL );
#endif /* HAVE_LCD_BITMAP */
} }

View File

@ -42,9 +42,7 @@
#include "playlist.h" #include "playlist.h"
#include "misc.h" #include "misc.h"
#ifdef HAVE_LCD_BITMAP
#include "bitmaps/usblogo.h" #include "bitmaps/usblogo.h"
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
#include "bitmaps/remote_usblogo.h" #include "bitmaps/remote_usblogo.h"
@ -122,15 +120,12 @@ static int handle_usb_events(void)
struct usb_screen_vps_t struct usb_screen_vps_t
{ {
struct viewport parent; struct viewport parent;
#ifdef HAVE_LCD_BITMAP
struct viewport logo; struct viewport logo;
#ifdef USB_ENABLE_HID #ifdef USB_ENABLE_HID
struct viewport title; struct viewport title;
#endif #endif
#endif
}; };
#ifdef HAVE_LCD_BITMAP
static void usb_screen_fix_viewports(struct screen *screen, static void usb_screen_fix_viewports(struct screen *screen,
struct usb_screen_vps_t *usb_screen_vps) struct usb_screen_vps_t *usb_screen_vps)
{ {
@ -181,18 +176,15 @@ static void usb_screen_fix_viewports(struct screen *screen,
} }
#endif #endif
} }
#endif
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
{ {
#ifdef HAVE_LCD_BITMAP
static const struct bitmap* logos[NB_SCREENS] = { static const struct bitmap* logos[NB_SCREENS] = {
&bm_usblogo, &bm_usblogo,
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
&bm_remote_usblogo, &bm_remote_usblogo,
#endif #endif
}; };
#endif
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
@ -200,15 +192,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i]; struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i];
struct viewport *parent = &usb_screen_vps->parent; struct viewport *parent = &usb_screen_vps->parent;
#ifdef HAVE_LCD_BITMAP
struct viewport *logo = &usb_screen_vps->logo; struct viewport *logo = &usb_screen_vps->logo;
#endif
screen->set_viewport(parent); screen->set_viewport(parent);
screen->clear_viewport(); screen->clear_viewport();
screen->backlight_on(); screen->backlight_on();
#ifdef HAVE_LCD_BITMAP
screen->set_viewport(logo); screen->set_viewport(logo);
screen->bmp(logos[i], 0, 0); screen->bmp(logos[i], 0, 0);
if (i == SCREEN_MAIN) if (i == SCREEN_MAIN)
@ -228,14 +217,6 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
} }
screen->set_viewport(parent); screen->set_viewport(parent);
#else /* !HAVE_LCD_BITMAP */
screen->double_height(false);
screen->puts_scroll(0, 0, "[USB Mode]");
status_set_param(false);
status_set_audio(false);
status_set_usb(true);
#endif /* HAVE_LCD_BITMAP */
screen->set_viewport(NULL); screen->set_viewport(NULL);
screen->update_viewport(); screen->update_viewport();
} }
@ -275,13 +256,11 @@ void gui_usb_screen_run(bool early_usb)
/* update the UI before disabling fonts, this maximizes the propability /* update the UI before disabling fonts, this maximizes the propability
* that font cache lookups succeed during USB */ * that font cache lookups succeed during USB */
send_event(GUI_EVENT_ACTIONUPDATE, NULL); send_event(GUI_EVENT_ACTIONUPDATE, NULL);
#ifdef HAVE_LCD_BITMAP
if(!early_usb) if(!early_usb)
{ {
/* The font system leaves the .fnt fd's open, so we need for force close them all */ /* The font system leaves the .fnt fd's open, so we need for force close them all */
font_disable_all(); font_disable_all();
} }
#endif
usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_acknowledge(SYS_USB_CONNECTED_ACK);
@ -302,10 +281,8 @@ void gui_usb_screen_run(bool early_usb)
{ {
const struct viewport* vp = NULL; const struct viewport* vp = NULL;
#if defined(HAVE_LCD_BITMAP) && defined(USB_ENABLE_HID) #if defined(USB_ENABLE_HID)
vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL; vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL;
#elif !defined(HAVE_LCD_BITMAP)
vp = &usb_screen_vps_ar[i].parent;
#endif #endif
if (vp) if (vp)
screens[i].scroll_stop_viewport(vp); screens[i].scroll_stop_viewport(vp);
@ -322,7 +299,6 @@ void gui_usb_screen_run(bool early_usb)
touchscreen_set_mode(old_mode); touchscreen_set_mode(old_mode);
#endif #endif
#ifdef HAVE_LCD_BITMAP
if(!early_usb) if(!early_usb)
{ {
font_enable_all(); font_enable_all();
@ -331,7 +307,6 @@ void gui_usb_screen_run(bool early_usb)
/* Reload playlist */ /* Reload playlist */
playlist_resume(); playlist_resume();
} }
#endif
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {

View File

@ -54,9 +54,7 @@
#include "statusbar.h" #include "statusbar.h"
#include "appevents.h" #include "appevents.h"
#include "panic.h" #include "panic.h"
#ifdef HAVE_LCD_BITMAP
#include "language.h" #include "language.h"
#endif
#include "statusbar-skinned.h" #include "statusbar-skinned.h"
#include "skin_engine/skin_engine.h" #include "skin_engine/skin_engine.h"
#include "debug.h" #include "debug.h"
@ -68,7 +66,6 @@ struct viewport_stack_item
bool enabled; bool enabled;
}; };
#ifdef HAVE_LCD_BITMAP
static void viewportmanager_redraw(unsigned short id, void* data); static void viewportmanager_redraw(unsigned short id, void* data);
static int theme_stack_top[NB_SCREENS]; /* the last item added */ static int theme_stack_top[NB_SCREENS]; /* the last item added */
@ -218,16 +215,10 @@ static bool is_theme_enabled(enum screen_type screen)
int top = theme_stack_top[screen]; int top = theme_stack_top[screen];
return theme_stack[screen][top].enabled; return theme_stack[screen][top].enabled;
} }
#endif /* HAVE_LCD_BITMAP */
int viewport_get_nb_lines(const struct viewport *vp) int viewport_get_nb_lines(const struct viewport *vp)
{ {
#ifdef HAVE_LCD_BITMAP
return vp->height/font_get(vp->font)->height; return vp->height/font_get(vp->font)->height;
#else
(void)vp;
return 2;
#endif
} }
static void viewportmanager_redraw(unsigned short id, void* data) static void viewportmanager_redraw(unsigned short id, void* data)
@ -235,31 +226,21 @@ static void viewportmanager_redraw(unsigned short id, void* data)
(void)id; (void)id;
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
#ifdef HAVE_LCD_BITMAP
if (is_theme_enabled(i)) if (is_theme_enabled(i))
sb_skin_update(i, NULL != data); sb_skin_update(i, NULL != data);
#else
(void)data;
gui_statusbar_draw(&statusbars.statusbars[i], NULL, NULL);
#endif
} }
} }
void viewportmanager_init() void viewportmanager_init()
{ {
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
theme_stack_top[i] = -1; /* the next call fixes this to 0 */ theme_stack_top[i] = -1; /* the next call fixes this to 0 */
/* We always want the theme enabled by default... */ /* We always want the theme enabled by default... */
viewportmanager_theme_enable(i, true, NULL); viewportmanager_theme_enable(i, true, NULL);
} }
#else
add_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw);
#endif
} }
#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_changed(const int which) void viewportmanager_theme_changed(const int which)
{ {
if (which & THEME_LANGUAGE) if (which & THEME_LANGUAGE)
@ -296,7 +277,6 @@ static void set_default_align_flags(struct viewport *vp)
vp->flags |= VP_FLAG_ALIGN_RIGHT; vp->flags |= VP_FLAG_ALIGN_RIGHT;
} }
#endif /* HAVE_LCD_BITMAP */
#endif /* __PCTOOL__ */ #endif /* __PCTOOL__ */
void viewport_set_fullscreen(struct viewport *vp, void viewport_set_fullscreen(struct viewport *vp,
@ -307,7 +287,6 @@ void viewport_set_fullscreen(struct viewport *vp,
vp->width = screens[screen].lcdwidth; vp->width = screens[screen].lcdwidth;
vp->height = screens[screen].lcdheight; vp->height = screens[screen].lcdheight;
#ifdef HAVE_LCD_BITMAP
#ifndef __PCTOOL__ #ifndef __PCTOOL__
set_default_align_flags(vp); set_default_align_flags(vp);
#endif #endif
@ -331,13 +310,12 @@ void viewport_set_fullscreen(struct viewport *vp,
vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; vp->bg_pattern = LCD_REMOTE_DEFAULT_BG;
} }
#endif #endif
#endif
} }
void viewport_set_defaults(struct viewport *vp, void viewport_set_defaults(struct viewport *vp,
const enum screen_type screen) const enum screen_type screen)
{ {
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) #if !defined(__PCTOOL__)
struct viewport *sbs_area = NULL; struct viewport *sbs_area = NULL;
if (!is_theme_enabled(screen)) if (!is_theme_enabled(screen))
{ {
@ -349,13 +327,11 @@ void viewport_set_defaults(struct viewport *vp,
if (sbs_area) if (sbs_area)
*vp = *sbs_area; *vp = *sbs_area;
else else
#endif /* HAVE_LCD_BITMAP */ #endif /* !__PCTOOL__ */
viewport_set_fullscreen(vp, screen); viewport_set_fullscreen(vp, screen);
} }
#ifdef HAVE_LCD_BITMAP
int get_viewport_default_colour(enum screen_type screen, bool fgcolour) int get_viewport_default_colour(enum screen_type screen, bool fgcolour)
{ {
(void)screen; (void)fgcolour; (void)screen; (void)fgcolour;
@ -392,5 +368,3 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour)
return 0; return 0;
#endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */ #endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */
} }
#endif

View File

@ -53,7 +53,6 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour);
*/ */
void viewportmanager_init(void) INIT_ATTR; void viewportmanager_init(void) INIT_ATTR;
#ifdef HAVE_LCD_BITMAP
void viewportmanager_theme_enable(enum screen_type screen, bool enable, void viewportmanager_theme_enable(enum screen_type screen, bool enable,
struct viewport *viewport); struct viewport *viewport);
/* Force will cause a redraw even if the theme was previously and /* Force will cause a redraw even if the theme was previously and
@ -69,8 +68,6 @@ bool viewport_point_within_vp(const struct viewport *vp,
const int x, const int y); const int x, const int y);
#endif #endif
#endif
#endif /* __PCTOOL__ */ #endif /* __PCTOOL__ */
#endif /* __VIEWPORT_H__ */ #endif /* __VIEWPORT_H__ */

View File

@ -39,9 +39,7 @@
#include "storage.h" #include "storage.h"
#include "screens.h" #include "screens.h"
#include "playlist.h" #include "playlist.h"
#ifdef HAVE_LCD_BITMAP
#include "icons.h" #include "icons.h"
#endif
#include "lang.h" #include "lang.h"
#include "bookmark.h" #include "bookmark.h"
#include "misc.h" #include "misc.h"
@ -87,7 +85,6 @@ static void track_info_callback(unsigned short id, void *param);
char* wps_default_skin(enum screen_type screen) char* wps_default_skin(enum screen_type screen)
{ {
static char *skin_buf[NB_SCREENS] = { static char *skin_buf[NB_SCREENS] = {
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
"%X(d)\n" "%X(d)\n"
#endif #endif
@ -97,10 +94,6 @@ char* wps_default_skin(enum screen_type screen)
"%al%pc/%pt%ar[%pp:%pe]\n" "%al%pc/%pt%ar[%pp:%pe]\n"
"%fbkBit %?fv<avg|> %?iv<%(id3v%iv%)|%(no id3%)>\n" "%fbkBit %?fv<avg|> %?iv<%(id3v%iv%)|%(no id3%)>\n"
"%pb\n%pm\n", "%pb\n%pm\n",
#else
"%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d(2)> - %?id<%id|%d(1)>\n"
"%pc%?ps<*|/>%pt\n",
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
#if LCD_REMOTE_DEPTH > 1 #if LCD_REMOTE_DEPTH > 1
"%X(d)\n" "%X(d)\n"

View File

@ -112,9 +112,7 @@ static void gui_yesno_draw(struct gui_yesno * yn)
if(line_shift+3 <= vp_lines) if(line_shift+3 <= vp_lines)
line_shift++; line_shift++;
display->puts(0, line_shift, str(LANG_CONFIRM_WITH_BUTTON)); display->puts(0, line_shift, str(LANG_CONFIRM_WITH_BUTTON));
#ifdef HAVE_LCD_BITMAP
display->puts(0, line_shift+1, str(LANG_CANCEL_WITH_ANY)); display->puts(0, line_shift+1, str(LANG_CANCEL_WITH_ANY));
#endif
} }
#endif #endif
display->update_viewport(); display->update_viewport();

View File

@ -25,8 +25,6 @@
int kbd_input(char* buffer, int buflen, unsigned short *kbd); int kbd_input(char* buffer, int buflen, unsigned short *kbd);
#ifdef HAVE_LCD_BITMAP
int load_kbd(unsigned char* filename); int load_kbd(unsigned char* filename);
#endif
#endif #endif

View File

@ -39,7 +39,6 @@ ukrainian.lang
vlaams.lang vlaams.lang
wallisertitsch.lang wallisertitsch.lang
walon.lang walon.lang
#ifdef HAVE_LCD_BITMAP /* Not for the Player */
arabic.lang arabic.lang
chinese-simp.lang chinese-simp.lang
chinese-trad.lang chinese-trad.lang
@ -47,4 +46,3 @@ hindi.lang
japanese.lang japanese.lang
korean.lang korean.lang
thai.lang thai.lang
#endif /* HAVE_LCD_BITMAP */

View File

@ -26,9 +26,7 @@
#include "lang.h" #include "lang.h"
#include "debug.h" #include "debug.h"
#include "string.h" #include "string.h"
#ifdef HAVE_LCD_BITMAP
#include "viewport.h" #include "viewport.h"
#endif
/* The following header is generated by the build system and only defines /* The following header is generated by the build system and only defines
MAX_LANGUAGE_SIZE to be the size of the largest currently available MAX_LANGUAGE_SIZE to be the size of the largest currently available

View File

@ -36,15 +36,14 @@
#include "action.h" #include "action.h"
#include "splash.h" #include "splash.h"
#ifdef HAVE_LCD_BITMAP
int compute_nb_lines(int w, struct font* font) int compute_nb_lines(int w, struct font* font)
{ {
int i, nb_lines; int i, nb_lines;
int cur_x, delta_x; int cur_x, delta_x;
if(logfindex == 0 && !logfwrap) if(logfindex == 0 && !logfwrap)
return 0; return 0;
if(logfwrap) if(logfwrap)
i = logfindex; i = logfindex;
else else
@ -209,7 +208,6 @@ bool logfdisplay(void)
return false; return false;
} }
#endif /* HAVE_LCD_BITMAP */
bool logfdump(void) bool logfdump(void)
{ {

View File

@ -167,9 +167,7 @@ int main(void)
screens[i].clear_display(); screens[i].clear_display();
screens[i].update(); screens[i].update();
} }
#ifdef HAVE_LCD_BITMAP
list_init(); list_init();
#endif
tree_gui_init(); tree_gui_init();
/* Keep the order of this 3 /* Keep the order of this 3
* Must be done before any code uses the multi-screen API */ * Must be done before any code uses the multi-screen API */
@ -280,7 +278,6 @@ static void init_tagcache(void)
talk_number(tagcache_get_max_commit_step(), true); talk_number(tagcache_get_max_commit_step(), true);
} }
#endif #endif
#ifdef HAVE_LCD_BITMAP
if (lang_is_rtl()) if (lang_is_rtl())
{ {
splashf(0, "[%d/%d] %s", ret, tagcache_get_max_commit_step(), splashf(0, "[%d/%d] %s", ret, tagcache_get_max_commit_step(),
@ -291,12 +288,6 @@ static void init_tagcache(void)
splashf(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), ret, splashf(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), ret,
tagcache_get_max_commit_step()); tagcache_get_max_commit_step());
} }
#else
lcd_double_height(false);
lcd_putsf(0, 1, " DB [%d/%d]", ret,
tagcache_get_max_commit_step());
lcd_update();
#endif
clear = true; clear = true;
} }
sleep(HZ/4); sleep(HZ/4);
@ -326,11 +317,9 @@ static void init(void)
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
lcd_remote_init(); lcd_remote_init();
#endif #endif
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
global_status.font_id[i] = FONT_SYSFIXED; global_status.font_id[i] = FONT_SYSFIXED;
font_init(); font_init();
#endif
show_logo(); show_logo();
#ifndef USB_NONE #ifndef USB_NONE
usb_init(); usb_init();
@ -428,11 +417,9 @@ static void init(void)
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
lcd_remote_init(); lcd_remote_init();
#endif #endif
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
global_status.font_id[i] = FONT_SYSFIXED; global_status.font_id[i] = FONT_SYSFIXED;
font_init(); font_init();
#endif
settings_reset(); settings_reset();
@ -507,14 +494,12 @@ static void init(void)
CHART("<storage_init"); CHART("<storage_init");
if(rc) if(rc)
{ {
#ifdef HAVE_LCD_BITMAP
lcd_clear_display(); lcd_clear_display();
lcd_putsf(0, 1, "ATA error: %d", rc); lcd_putsf(0, 1, "ATA error: %d", rc);
lcd_puts(0, 3, "Press ON to debug"); lcd_puts(0, 3, "Press ON to debug");
lcd_update(); lcd_update();
while(!(button_get(true) & BUTTON_REL)); /* DO NOT CHANGE TO ACTION SYSTEM */ while(!(button_get(true) & BUTTON_REL)); /* DO NOT CHANGE TO ACTION SYSTEM */
dbg_ports(); dbg_ports();
#endif
panicf("ata: %d", rc); panicf("ata: %d", rc);
} }
@ -565,10 +550,8 @@ static void init(void)
lcd_clear_display(); lcd_clear_display();
lcd_puts(0, 0, "No partition"); lcd_puts(0, 0, "No partition");
lcd_puts(0, 1, "found."); lcd_puts(0, 1, "found.");
#ifdef HAVE_LCD_BITMAP
lcd_puts(0, 2, "Insert USB cable"); lcd_puts(0, 2, "Insert USB cable");
lcd_puts(0, 3, "and fix it."); lcd_puts(0, 3, "and fix it.");
#endif
lcd_update(); lcd_update();
while(button_get(true) != SYS_USB_CONNECTED) {}; while(button_get(true) != SYS_USB_CONNECTED) {};

View File

@ -54,9 +54,7 @@
#include "quickscreen.h" #include "quickscreen.h"
#include "shortcuts.h" #include "shortcuts.h"
#ifdef HAVE_LCD_BITMAP
#include "icons.h" #include "icons.h"
#endif
/* gui api */ /* gui api */
#include "list.h" #include "list.h"
@ -129,7 +127,7 @@ static const char* get_menu_item_name(int selected_item,
} }
return P2STR(menu->callback_and_desc->desc); return P2STR(menu->callback_and_desc->desc);
} }
#ifdef HAVE_LCD_BITMAP
static enum themable_icons menu_get_icon(int selected_item, void * data) static enum themable_icons menu_get_icon(int selected_item, void * data)
{ {
const struct menu_item_ex *menu = (const struct menu_item_ex *)data; const struct menu_item_ex *menu = (const struct menu_item_ex *)data;
@ -168,7 +166,6 @@ static enum themable_icons menu_get_icon(int selected_item, void * data)
} }
return menu_icon; return menu_icon;
} }
#endif
static void init_menu_lists(const struct menu_item_ex *menu, static void init_menu_lists(const struct menu_item_ex *menu,
struct gui_synclist *lists, int selected, bool callback, struct gui_synclist *lists, int selected, bool callback,
@ -207,7 +204,6 @@ static void init_menu_lists(const struct menu_item_ex *menu,
current_submenus_menu = (struct menu_item_ex *)menu; current_submenus_menu = (struct menu_item_ex *)menu;
gui_synclist_init(lists,get_menu_item_name,(void*)menu,false,1, parent); gui_synclist_init(lists,get_menu_item_name,(void*)menu,false,1, parent);
#ifdef HAVE_LCD_BITMAP
if (menu->flags&MENU_HAS_DESC) if (menu->flags&MENU_HAS_DESC)
{ {
@ -232,11 +228,6 @@ static void init_menu_lists(const struct menu_item_ex *menu,
icon = Icon_Submenu_Entered; icon = Icon_Submenu_Entered;
gui_synclist_set_title(lists, title, icon); gui_synclist_set_title(lists, title, icon);
gui_synclist_set_icon_callback(lists, global_settings.show_icons?menu_get_icon:NULL); gui_synclist_set_icon_callback(lists, global_settings.show_icons?menu_get_icon:NULL);
#else
(void)icon;
(void)title;
gui_synclist_set_icon_callback(lists, NULL);
#endif
if(global_settings.talk_menu) if(global_settings.talk_menu)
gui_synclist_set_voice_callback(lists, talk_menu_item); gui_synclist_set_voice_callback(lists, talk_menu_item);
gui_synclist_set_nb_items(lists,current_subitems_count); gui_synclist_set_nb_items(lists,current_subitems_count);

View File

@ -30,9 +30,7 @@
#include "menu.h" #include "menu.h"
#include "tree.h" #include "tree.h"
#include "list.h" #include "list.h"
#ifdef HAVE_LCD_BITMAP
#include "peakmeter.h" #include "peakmeter.h"
#endif
#include "talk.h" #include "talk.h"
#include "lcd.h" #include "lcd.h"
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
@ -187,16 +185,12 @@ MENUITEM_SETTING(brightness_item, &global_settings.brightness, NULL);
#ifdef HAVE_LCD_CONTRAST #ifdef HAVE_LCD_CONTRAST
MENUITEM_SETTING(contrast, &global_settings.contrast, NULL); MENUITEM_SETTING(contrast, &global_settings.contrast, NULL);
#endif #endif
#ifdef HAVE_LCD_BITMAP
#ifdef HAVE_LCD_INVERT #ifdef HAVE_LCD_INVERT
MENUITEM_SETTING(invert, &global_settings.invert, NULL); MENUITEM_SETTING(invert, &global_settings.invert, NULL);
#endif #endif
#ifdef HAVE_LCD_FLIP #ifdef HAVE_LCD_FLIP
MENUITEM_SETTING(flip_display, &global_settings.flip_display, flipdisplay_callback); MENUITEM_SETTING(flip_display, &global_settings.flip_display, flipdisplay_callback);
#endif #endif
#endif /* HAVE_LCD_BITMAP */
/* now the actual menu */ /* now the actual menu */
MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
@ -226,14 +220,12 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
#ifdef HAVE_LCD_CONTRAST #ifdef HAVE_LCD_CONTRAST
,&contrast ,&contrast
#endif #endif
#ifdef HAVE_LCD_BITMAP
# ifdef HAVE_LCD_INVERT # ifdef HAVE_LCD_INVERT
,&invert ,&invert
# endif # endif
# ifdef HAVE_LCD_FLIP # ifdef HAVE_LCD_FLIP
,&flip_display ,&flip_display
# endif # endif
#endif /* HAVE_LCD_BITMAP */
); );
/* LCD MENU */ /* LCD MENU */
/***********************************/ /***********************************/
@ -318,10 +310,8 @@ MAKE_MENU(lcd_remote_settings, ID2P(LANG_LCD_REMOTE_MENU),
MENUITEM_SETTING_W_TEXT(scroll_speed, &global_settings.scroll_speed, MENUITEM_SETTING_W_TEXT(scroll_speed, &global_settings.scroll_speed,
ID2P(LANG_SCROLL), NULL); ID2P(LANG_SCROLL), NULL);
MENUITEM_SETTING(scroll_delay, &global_settings.scroll_delay, NULL); MENUITEM_SETTING(scroll_delay, &global_settings.scroll_delay, NULL);
#ifdef HAVE_LCD_BITMAP
MENUITEM_SETTING_W_TEXT(scroll_step, &global_settings.scroll_step, MENUITEM_SETTING_W_TEXT(scroll_step, &global_settings.scroll_step,
ID2P(LANG_SCROLL_STEP_EXAMPLE), NULL); ID2P(LANG_SCROLL_STEP_EXAMPLE), NULL);
#endif
MENUITEM_SETTING(bidir_limit, &global_settings.bidir_limit, NULL); MENUITEM_SETTING(bidir_limit, &global_settings.bidir_limit, NULL);
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
MENUITEM_SETTING_W_TEXT(remote_scroll_speed, &global_settings.remote_scroll_speed, MENUITEM_SETTING_W_TEXT(remote_scroll_speed, &global_settings.remote_scroll_speed,
@ -342,7 +332,6 @@ MENUITEM_SETTING(list_accel_start_delay,
&global_settings.list_accel_start_delay, NULL); &global_settings.list_accel_start_delay, NULL);
MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL);
#endif /* HAVE_WHEEL_ACCELERATION */ #endif /* HAVE_WHEEL_ACCELERATION */
#ifdef HAVE_LCD_BITMAP
static int screenscroll_callback(int action, static int screenscroll_callback(int action,
const struct menu_item_ex *this_item, const struct menu_item_ex *this_item,
struct gui_synclist *this_list) struct gui_synclist *this_list)
@ -360,21 +349,16 @@ static int screenscroll_callback(int action,
MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view,
screenscroll_callback); screenscroll_callback);
MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL); MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL);
#endif
MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL); MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL);
MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON, MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
&scroll_speed, &scroll_delay, &scroll_speed, &scroll_delay,
#ifdef HAVE_LCD_BITMAP
&scroll_step, &scroll_step,
#endif
&bidir_limit, &bidir_limit,
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
&remote_scroll_sets, &remote_scroll_sets,
#endif #endif
#ifdef HAVE_LCD_BITMAP
&offset_out_of_view, &screen_scroll_step, &offset_out_of_view, &screen_scroll_step,
#endif
&scroll_paginated, &scroll_paginated,
#ifndef HAVE_WHEEL_ACCELERATION #ifndef HAVE_WHEEL_ACCELERATION
&list_accel_start_delay, &list_accel_wait &list_accel_start_delay, &list_accel_wait
@ -386,7 +370,6 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
/***********************************/ /***********************************/
/* PEAK METER MENU */ /* PEAK METER MENU */
#ifdef HAVE_LCD_BITMAP
static int peakmeter_callback(int action, static int peakmeter_callback(int action,
const struct menu_item_ex *this_item, const struct menu_item_ex *this_item,
struct gui_synclist *this_list) struct gui_synclist *this_list)
@ -570,7 +553,6 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON,
&histogram, &histogram,
#endif #endif
&peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item); &peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item);
#endif /* HAVE_LCD_BITMAP */
/* PEAK METER MENU */ /* PEAK METER MENU */
/***********************************/ /***********************************/
@ -645,9 +627,7 @@ MAKE_MENU(display_menu, ID2P(LANG_DISPLAY),
&lcd_remote_settings, &lcd_remote_settings,
#endif #endif
&scroll_settings_menu, &scroll_settings_menu,
#ifdef HAVE_LCD_BITMAP
&peak_meter_menu, &peak_meter_menu,
#endif
&codepage_setting, &codepage_setting,
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
&touchscreen_menu, &touchscreen_menu,

View File

@ -31,9 +31,7 @@ extern const struct menu_item_ex
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
recording_settings, /* recording_menu.c */ recording_settings, /* recording_menu.c */
recording_settings_menu, recording_settings_menu,
#ifdef HAVE_LCD_BITMAP
peak_meter_menu, /* also used from within recording_menu */ peak_meter_menu, /* also used from within recording_menu */
#endif
#endif #endif
sound_settings, /* sound_menu.c */ sound_settings, /* sound_menu.c */
settings_menu_item, /* settings_menu.c */ settings_menu_item, /* settings_menu.c */

View File

@ -32,10 +32,8 @@
#include "settings.h" #include "settings.h"
#include "screens.h" #include "screens.h"
#include "icons.h" #include "icons.h"
#ifdef HAVE_LCD_BITMAP
#include "font.h" #include "font.h"
#include "scrollbar.h" #include "scrollbar.h"
#endif
#include "lang.h" #include "lang.h"
#include "talk.h" #include "talk.h"
#include "misc.h" #include "misc.h"
@ -601,9 +599,7 @@ MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS),
#ifdef HAVE_AGC #ifdef HAVE_AGC
&agc_preset, &agc_cliptime, &agc_preset, &agc_cliptime,
#endif #endif
#ifdef HAVE_LCD_BITMAP
&peak_meter_menu, &peak_meter_menu,
#endif
&browse_recconfigs, &save_recpresets_item &browse_recconfigs, &save_recpresets_item
); );

View File

@ -187,9 +187,7 @@ MENUITEM_SETTING(interpret_numbers, &global_settings.interpret_numbers, fileview
MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL); MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL);
MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL); MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL);
MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL); MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL);
#ifdef HAVE_LCD_BITMAP
MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL); MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL);
#endif
static int clear_start_directory(void) static int clear_start_directory(void)
{ {
strcpy(global_settings.start_directory, "/"); strcpy(global_settings.start_directory, "/");
@ -222,9 +220,7 @@ static int fileview_callback(int action,
MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu, MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu,
&sort_case, &sort_dir, &sort_file, &interpret_numbers, &sort_case, &sort_dir, &sort_file, &interpret_numbers,
&dirfilter, &show_filename_ext, &browse_current, &dirfilter, &show_filename_ext, &browse_current,
#ifdef HAVE_LCD_BITMAP
&show_path_in_browser, &show_path_in_browser,
#endif
&clear_start_directory_item &clear_start_directory_item
); );
/* FILE VIEW MENU */ /* FILE VIEW MENU */
@ -312,14 +308,10 @@ MAKE_MENU(disk_menu, ID2P(LANG_DISK_MENU), 0, Icon_NOICON,
/* Limits menu */ /* Limits menu */
MENUITEM_SETTING(max_files_in_dir, &global_settings.max_files_in_dir, NULL); MENUITEM_SETTING(max_files_in_dir, &global_settings.max_files_in_dir, NULL);
MENUITEM_SETTING(max_files_in_playlist, &global_settings.max_files_in_playlist, NULL); MENUITEM_SETTING(max_files_in_playlist, &global_settings.max_files_in_playlist, NULL);
#ifdef HAVE_LCD_BITMAP
MENUITEM_SETTING(default_glyphs, &global_settings.glyphs_to_cache, NULL); MENUITEM_SETTING(default_glyphs, &global_settings.glyphs_to_cache, NULL);
#endif
MAKE_MENU(limits_menu, ID2P(LANG_LIMITS_MENU), 0, Icon_NOICON, MAKE_MENU(limits_menu, ID2P(LANG_LIMITS_MENU), 0, Icon_NOICON,
&max_files_in_dir, &max_files_in_playlist &max_files_in_dir, &max_files_in_playlist
#ifdef HAVE_LCD_BITMAP
,&default_glyphs ,&default_glyphs
#endif
); );

View File

@ -159,7 +159,6 @@ MAKE_MENU(colors_settings, ID2P(LANG_COLORS_MENU),
/* */ /* */
#ifdef HAVE_LCD_BITMAP
static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item, static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item,
enum screen_type screen) enum screen_type screen)
{ {
@ -218,19 +217,16 @@ MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
, &battery_display , &battery_display
#endif #endif
); );
#endif /* HAVE_LCD_BITMAP */
/* */ /* */
/* BARS MENU */ /* BARS MENU */
/************************************/ /************************************/
#ifdef HAVE_LCD_BITMAP
static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT}; static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT};
static struct browse_folder_info sbs = {SBS_DIR, SHOW_SBS}; static struct browse_folder_info sbs = {SBS_DIR, SHOW_SBS};
#if CONFIG_TUNER #if CONFIG_TUNER
static struct browse_folder_info fms = {WPS_DIR, SHOW_FMS}; static struct browse_folder_info fms = {WPS_DIR, SHOW_FMS};
#endif #endif
#endif
static struct browse_folder_info wps = {WPS_DIR, SHOW_WPS}; static struct browse_folder_info wps = {WPS_DIR, SHOW_WPS};
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
static struct browse_folder_info rwps = {WPS_DIR, SHOW_RWPS}; static struct browse_folder_info rwps = {WPS_DIR, SHOW_RWPS};
@ -268,7 +264,6 @@ int browse_folder(void *param)
setting = global_settings.wps_file; setting = global_settings.wps_file;
lang_id = LANG_WHILE_PLAYING; lang_id = LANG_WHILE_PLAYING;
break; break;
#ifdef HAVE_LCD_BITMAP
case SHOW_FONT: case SHOW_FONT:
ext = "fnt"; ext = "fnt";
setting = global_settings.font_file; setting = global_settings.font_file;
@ -286,7 +281,6 @@ int browse_folder(void *param)
lang_id = LANG_RADIOSCREEN; lang_id = LANG_RADIOSCREEN;
break; break;
#endif /* CONFIG_TUNER */ #endif /* CONFIG_TUNER */
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
case SHOW_RWPS: case SHOW_RWPS:
ext = "rwps"; ext = "rwps";
@ -324,7 +318,6 @@ int browse_folder(void *param)
return rockbox_browse(&browse); return rockbox_browse(&browse);
} }
#ifdef HAVE_LCD_BITMAP
MENUITEM_FUNCTION(browse_fonts, MENU_FUNC_USEPARAM, MENUITEM_FUNCTION(browse_fonts, MENU_FUNC_USEPARAM,
ID2P(LANG_CUSTOM_FONT), ID2P(LANG_CUSTOM_FONT),
browse_folder, (void*)&fonts, NULL, Icon_Font); browse_folder, (void*)&fonts, NULL, Icon_Font);
@ -337,7 +330,6 @@ MENUITEM_FUNCTION(browse_fms, MENU_FUNC_USEPARAM,
ID2P(LANG_RADIOSCREEN), ID2P(LANG_RADIOSCREEN),
browse_folder, (void*)&fms, NULL, Icon_Wps); browse_folder, (void*)&fms, NULL, Icon_Wps);
#endif #endif
#endif
MENUITEM_FUNCTION(browse_wps, MENU_FUNC_USEPARAM, MENUITEM_FUNCTION(browse_wps, MENU_FUNC_USEPARAM,
ID2P(LANG_WHILE_PLAYING), ID2P(LANG_WHILE_PLAYING),
browse_folder, (void*)&wps, NULL, Icon_Wps); browse_folder, (void*)&wps, NULL, Icon_Wps);
@ -380,9 +372,7 @@ MENUITEM_SETTING(show_icons, &global_settings.show_icons, showicons_callback);
MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM,
ID2P(LANG_CUSTOM_THEME), ID2P(LANG_CUSTOM_THEME),
browse_folder, (void*)&themes, NULL, Icon_Config); browse_folder, (void*)&themes, NULL, Icon_Config);
#ifdef HAVE_LCD_BITMAP
MENUITEM_SETTING(cursor_style, &global_settings.cursor_style, NULL); MENUITEM_SETTING(cursor_style, &global_settings.cursor_style, NULL);
#endif
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL); MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL);
#endif #endif
@ -390,9 +380,7 @@ MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL);
MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
NULL, Icon_Wps, NULL, Icon_Wps,
&browse_themes, &browse_themes,
#ifdef HAVE_LCD_BITMAP
&browse_fonts, &browse_fonts,
#endif
&browse_wps, &browse_wps,
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
&browse_rwps, &browse_rwps,
@ -403,9 +391,7 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
&browse_rfms, &browse_rfms,
#endif #endif
#endif #endif
#ifdef HAVE_LCD_BITMAP
&browse_sbs, &browse_sbs,
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
&browse_rsbs, &browse_rsbs,
#endif #endif
@ -413,7 +399,6 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
#ifdef HAVE_BACKDROP_IMAGE #ifdef HAVE_BACKDROP_IMAGE
&clear_main_bd, &clear_main_bd,
#endif #endif
#ifdef HAVE_LCD_BITMAP
&bars_menu, &bars_menu,
&cursor_style, &cursor_style,
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
@ -422,5 +407,4 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
&colors_settings, &colors_settings,
#endif #endif
#endif /* HAVE_LCD_BITMAP */
); );

View File

@ -84,10 +84,10 @@
#if defined(HAVE_RECORDING) && !defined(__PCTOOL__) #if defined(HAVE_RECORDING) && !defined(__PCTOOL__)
#include "recording.h" #include "recording.h"
#endif #endif
#if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) #if !defined(__PCTOOL__)
#include "bmp.h" #include "bmp.h"
#include "icons.h" #include "icons.h"
#endif /* End HAVE_LCD_BITMAP */ #endif /* !__PCTOOL__ */
#include "bookmark.h" #include "bookmark.h"
#include "wps.h" #include "wps.h"
#include "playback.h" #include "playback.h"
@ -712,7 +712,6 @@ long default_event_handler(long event)
int show_logo( void ) int show_logo( void )
{ {
#ifdef HAVE_LCD_BITMAP
char version[32]; char version[32];
int font_h, font_w; int font_h, font_w;
@ -735,14 +734,6 @@ int show_logo( void )
#endif #endif
lcd_setfont(FONT_UI); lcd_setfont(FONT_UI);
#else
char *rockbox = " ROCKbox!";
lcd_clear_display();
lcd_double_height(true);
lcd_puts(0, 0, rockbox);
lcd_puts_scroll(0, 1, rbversion);
#endif
lcd_update(); lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
@ -1439,7 +1430,6 @@ int hex_to_rgb(const char* hex, int* color)
} }
#endif /* HAVE_LCD_COLOR */ #endif /* HAVE_LCD_COLOR */
#ifdef HAVE_LCD_BITMAP
/* '0'-'3' are ASCII 0x30 to 0x33 */ /* '0'-'3' are ASCII 0x30 to 0x33 */
#define is0123(x) (((x) & 0xfc) == 0x30) #define is0123(x) (((x) & 0xfc) == 0x30)
#if !defined(__PCTOOL__) || defined(CHECKWPS) #if !defined(__PCTOOL__) || defined(CHECKWPS)
@ -1482,7 +1472,6 @@ int clamp_value_wrap(int value, int max, int min)
return value; return value;
} }
#endif #endif
#endif
#ifndef __PCTOOL__ #ifndef __PCTOOL__
@ -1494,25 +1483,21 @@ static int current_activity_top = 0;
void push_current_activity(enum current_activity screen) void push_current_activity(enum current_activity screen)
{ {
current_activity[current_activity_top++] = screen; current_activity[current_activity_top++] = screen;
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
skinlist_set_cfg(i, NULL); skinlist_set_cfg(i, NULL);
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL);
} }
#endif
} }
void pop_current_activity(void) void pop_current_activity(void)
{ {
current_activity_top--; current_activity_top--;
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
skinlist_set_cfg(i, NULL); skinlist_set_cfg(i, NULL);
skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL);
} }
#endif
} }
enum current_activity get_current_activity(void) enum current_activity get_current_activity(void)
{ {

View File

@ -147,14 +147,12 @@ char* skip_whitespace(char* const str);
*/ */
char *strip_extension(char* buffer, int buffer_size, const char *filename); char *strip_extension(char* buffer, int buffer_size, const char *filename);
#ifdef HAVE_LCD_BITMAP
bool parse_color(enum screen_type screen, char *text, int *value); bool parse_color(enum screen_type screen, char *text, int *value);
/* only used in USB HID and set_time screen */ /* only used in USB HID and set_time screen */
#if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0) #if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0)
int clamp_value_wrap(int value, int max, int min); int clamp_value_wrap(int value, int max, int min);
#endif #endif
#endif
enum current_activity { enum current_activity {
ACTIVITY_UNKNOWN = 0, ACTIVITY_UNKNOWN = 0,

View File

@ -49,9 +49,7 @@
#include "splash.h" #include "splash.h"
#include "yesno.h" #include "yesno.h"
#include "menus/exported_menus.h" #include "menus/exported_menus.h"
#ifdef HAVE_LCD_BITMAP
#include "icons.h" #include "icons.h"
#endif
#include "sound_menu.h" #include "sound_menu.h"
#include "playlist_menu.h" #include "playlist_menu.h"
#include "playlist_catalog.h" #include "playlist_catalog.h"
@ -794,7 +792,6 @@ static int cat_playlist_callback(int action,
return action; return action;
} }
#ifdef HAVE_LCD_BITMAP
static void draw_slider(void) static void draw_slider(void)
{ {
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
@ -809,9 +806,6 @@ static void draw_slider(void)
screens[i].set_viewport(NULL); screens[i].set_viewport(NULL);
} }
} }
#else
#define draw_slider()
#endif
static void clear_display(bool update) static void clear_display(bool update)
{ {

View File

@ -46,11 +46,9 @@
#include "tagcache.h" #include "tagcache.h"
#endif #endif
#ifdef HAVE_LCD_BITMAP
#ifdef HAVE_ALBUMART #ifdef HAVE_ALBUMART
#include "albumart.h" #include "albumart.h"
#endif #endif
#endif
#ifdef HAVE_PLAY_FREQ #ifdef HAVE_PLAY_FREQ
#include "pcm_mixer.h" #include "pcm_mixer.h"

View File

@ -93,9 +93,7 @@
#include "thread.h" #include "thread.h"
#include "usb.h" #include "usb.h"
#include "filetypes.h" #include "filetypes.h"
#ifdef HAVE_LCD_BITMAP
#include "icons.h" #include "icons.h"
#endif
#include "system.h" #include "system.h"
#include "lang.h" #include "lang.h"

View File

@ -50,12 +50,10 @@
#include "power.h" #include "power.h"
#endif #endif
#ifdef HAVE_LCD_BITMAP
#include "scrollbar.h" #include "scrollbar.h"
#include "peakmeter.h" #include "peakmeter.h"
#include "bmp.h" #include "bmp.h"
#include "bidi.h" #include "bidi.h"
#endif
#ifdef USB_ENABLE_HID #ifdef USB_ENABLE_HID
#include "usbstack/usb_hid.h" #include "usbstack/usb_hid.h"
@ -301,11 +299,9 @@ static const struct plugin_api rockbox_api = {
#endif #endif
viewport_set_defaults, viewport_set_defaults,
#ifdef HAVE_LCD_BITMAP
viewportmanager_theme_enable, viewportmanager_theme_enable,
viewportmanager_theme_undo, viewportmanager_theme_undo,
viewport_set_fullscreen, viewport_set_fullscreen,
#endif
#ifdef HAVE_BACKLIGHT #ifdef HAVE_BACKLIGHT
/* lcd backlight */ /* lcd backlight */
@ -533,7 +529,7 @@ static const struct plugin_api rockbox_api = {
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) #if (CONFIG_PLATFORM & PLATFORM_HOSTED)
/* special simulator hooks */ /* special simulator hooks */
#if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 #if LCD_DEPTH < 8
sim_lcd_ex_init, sim_lcd_ex_init,
sim_lcd_ex_update_rect, sim_lcd_ex_update_rect,
#endif #endif
@ -780,7 +776,6 @@ static const struct plugin_api rockbox_api = {
remove_array_ptr, remove_array_ptr,
round_value_to_list32, round_value_to_list32,
#ifdef HAVE_LCD_BITMAP
read_bmp_file, read_bmp_file,
read_bmp_fd, read_bmp_fd,
#ifdef HAVE_JPEG #ifdef HAVE_JPEG
@ -788,7 +783,6 @@ static const struct plugin_api rockbox_api = {
read_jpeg_fd, read_jpeg_fd,
#endif #endif
screen_dump_set_hook, screen_dump_set_hook,
#endif
show_logo, show_logo,
#ifdef HAVE_WHEEL_POSITION #ifdef HAVE_WHEEL_POSITION
@ -927,7 +921,6 @@ int plugin_load(const char* plugin, const void* parameter)
touchscreen_set_mode(global_settings.touch_mode); touchscreen_set_mode(global_settings.touch_mode);
#endif #endif
#ifdef HAVE_LCD_BITMAP
screen_helper_setfont(FONT_UI); screen_helper_setfont(FONT_UI);
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
@ -939,8 +932,6 @@ int plugin_load(const char* plugin, const void* parameter)
#else /* LCD_DEPTH == 1 */ #else /* LCD_DEPTH == 1 */
lcd_set_drawmode(DRMODE_SOLID); lcd_set_drawmode(DRMODE_SOLID);
#endif /* LCD_DEPTH */ #endif /* LCD_DEPTH */
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
#if LCD_REMOTE_DEPTH > 1 #if LCD_REMOTE_DEPTH > 1

View File

@ -89,12 +89,10 @@ void* plugin_get_buffer(size_t *buffer_size);
#include "settings.h" #include "settings.h"
#include "timer.h" #include "timer.h"
#include "playlist.h" #include "playlist.h"
#ifdef HAVE_LCD_BITMAP
#include "screendump.h" #include "screendump.h"
#include "scrollbar.h" #include "scrollbar.h"
#include "jpeg_load.h" #include "jpeg_load.h"
#include "../recorder/bmp.h" #include "../recorder/bmp.h"
#endif
#include "statusbar.h" #include "statusbar.h"
#include "menu.h" #include "menu.h"
#include "rbunicode.h" #include "rbunicode.h"
@ -156,12 +154,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */ #define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */ /* increase this every time the api struct changes */
#define PLUGIN_API_VERSION 238 #define PLUGIN_API_VERSION 239
/* update this to latest version if a change to the api struct breaks /* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */ new function which are "waiting" at the end of the function table) */
#define PLUGIN_MIN_API_VERSION 238 #define PLUGIN_MIN_API_VERSION 239
/* plugin return codes */ /* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */ /* internal returns start at 0x100 to make exit(1..255) work */
@ -331,13 +329,11 @@ struct plugin_api {
void (*viewport_set_defaults)(struct viewport *vp, void (*viewport_set_defaults)(struct viewport *vp,
const enum screen_type screen); const enum screen_type screen);
#ifdef HAVE_LCD_BITMAP
void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable, void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable,
struct viewport *viewport); struct viewport *viewport);
void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw); void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw);
void (*viewport_set_fullscreen)(struct viewport *vp, void (*viewport_set_fullscreen)(struct viewport *vp,
const enum screen_type screen); const enum screen_type screen);
#endif
#ifdef HAVE_BACKLIGHT #ifdef HAVE_BACKLIGHT
/* lcd backlight */ /* lcd backlight */
@ -597,7 +593,7 @@ struct plugin_api {
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) #if (CONFIG_PLATFORM & PLATFORM_HOSTED)
/* special simulator hooks */ /* special simulator hooks */
#if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 #if LCD_DEPTH < 8
void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int)); void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int));
void (*sim_lcd_ex_update_rect)(int x, int y, int width, int height); void (*sim_lcd_ex_update_rect)(int x, int y, int width, int height);
#endif #endif
@ -900,7 +896,6 @@ struct plugin_api {
int count, int count,
bool signd); bool signd);
#ifdef HAVE_LCD_BITMAP
int (*read_bmp_file)(const char* filename, struct bitmap *bm, int maxsize, int (*read_bmp_file)(const char* filename, struct bitmap *bm, int maxsize,
int format, const struct custom_format *cformat); int format, const struct custom_format *cformat);
int (*read_bmp_fd)(int fd, struct bitmap *bm, int maxsize, int (*read_bmp_fd)(int fd, struct bitmap *bm, int maxsize,
@ -912,7 +907,6 @@ struct plugin_api {
int format, const struct custom_format *cformat); int format, const struct custom_format *cformat);
#endif #endif
void (*screen_dump_set_hook)(void (*hook)(int fh)); void (*screen_dump_set_hook)(void (*hook)(int fh));
#endif
int (*show_logo)(void); int (*show_logo)(void);
#ifdef HAVE_WHEEL_POSITION #ifdef HAVE_WHEEL_POSITION

View File

@ -41,10 +41,8 @@
#include "lib/pluginlib_actions.h" #include "lib/pluginlib_actions.h"
#include "lib/pluginlib_exit.h" #include "lib/pluginlib_exit.h"
#ifdef HAVE_LCD_BITMAP
#include "pluginbitmaps/_2048_background.h" #include "pluginbitmaps/_2048_background.h"
#include "pluginbitmaps/_2048_tiles.h" #include "pluginbitmaps/_2048_tiles.h"
#endif
/* some constants */ /* some constants */

View File

@ -79,7 +79,7 @@ wolf3d.c
#endif #endif
#endif #endif
#if PLUGIN_BUFFER_SIZE <= 0x20000 && defined(HAVE_LCD_BITMAP) #if PLUGIN_BUFFER_SIZE <= 0x20000
#if CONFIG_KEYPAD != SANSA_M200_PAD \ #if CONFIG_KEYPAD != SANSA_M200_PAD \
&& CONFIG_KEYPAD != HM60X_PAD && CONFIG_KEYPAD != HM60X_PAD
@ -92,7 +92,7 @@ chessbox.c
goban.c goban.c
pictureflow.c pictureflow.c
#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */ #endif /* PLUGIN_BUFFER_SIZE <= 0x20000 */
#if defined(IRIVER_H100_SERIES) #if defined(IRIVER_H100_SERIES)
iriver_flash.c iriver_flash.c
@ -106,8 +106,6 @@ crypt_firmware.c
metronome.c metronome.c
#ifdef HAVE_LCD_BITMAP /* Not for the Archos Player */
2048.c 2048.c
/* Lua needs at least 160 KB to work in */ /* Lua needs at least 160 KB to work in */
@ -173,8 +171,6 @@ rockpaint.c
rocklife.c rocklife.c
#endif /* HAVE_LCD_BITMAP */
#if LCD_DEPTH > 1 /* non-mono bitmap targets */ #if LCD_DEPTH > 1 /* non-mono bitmap targets */
matrix.c matrix.c
@ -198,7 +194,6 @@ test_codec.c
test_core_jpeg.c test_core_jpeg.c
#endif #endif
test_disk.c test_disk.c
#ifdef HAVE_LCD_BITMAP
test_fps.c test_fps.c
test_gfx.c test_gfx.c
#if LCD_DEPTH < 4 && !defined(SIMULATOR) #if LCD_DEPTH < 4 && !defined(SIMULATOR)
@ -208,11 +203,8 @@ test_scanrate.c
test_grey.c test_grey.c
test_greylib_bitmap_scale.c test_greylib_bitmap_scale.c
#endif #endif
#endif
test_mem.c test_mem.c
#ifdef HAVE_LCD_BITMAP
test_mem_jpeg.c test_mem_jpeg.c
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
test_resize.c test_resize.c
#endif #endif

View File

@ -28,7 +28,6 @@ test_codec.c
test_core_jpeg.c test_core_jpeg.c
#endif #endif
test_disk.c test_disk.c
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH < 4 && !defined(SIMULATOR) #if LCD_DEPTH < 4 && !defined(SIMULATOR)
test_scanrate.c test_scanrate.c
#endif #endif
@ -36,11 +35,8 @@ test_scanrate.c
test_grey.c test_grey.c
test_greylib_bitmap_scale.c test_greylib_bitmap_scale.c
#endif #endif
#endif
test_mem.c test_mem.c
#ifdef HAVE_LCD_BITMAP
test_mem_jpeg.c test_mem_jpeg.c
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
test_resize.c test_resize.c
#endif #endif

View File

@ -8,9 +8,6 @@ text_viewer
clock clock
#endif #endif
/* For all targets with a bitmap display */
#ifdef HAVE_LCD_BITMAP
/* color horizontal-stride LCDs */ /* color horizontal-stride LCDs */
#if defined(HAVE_LCD_COLOR) && \ #if defined(HAVE_LCD_COLOR) && \
(!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE))
@ -55,8 +52,6 @@ zxbox
#endif #endif
#endif #endif
#endif /* HAVE_LCD_BITMAP */
/* For all big enough colour screens, iriver H1x0 and iAudio M5 */ /* For all big enough colour screens, iriver H1x0 and iAudio M5 */
#if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ #if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \
|| (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \ || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \

View File

@ -8,7 +8,6 @@
*/ */
lua lua
lua_scripts lua_scripts
#ifdef HAVE_LCD_BITMAP
#if PLUGIN_BUFFER_SIZE > 0x20000 #if PLUGIN_BUFFER_SIZE > 0x20000
fft fft
@ -20,8 +19,6 @@ reversi
pictureflow pictureflow
#endif #endif
#endif /* HAVE_LCD_BITMAP */
/* For all the swcodec targets */ /* For all the swcodec targets */
#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ #if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */
mikmod mikmod

View File

@ -329,9 +329,7 @@ static bool exit_tsr(bool reenter)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running.");
rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test");
#ifdef HAVE_LCD_BITMAP
rb->lcd_puts_scroll(0, 2, "Anything else will resume"); rb->lcd_puts_scroll(0, 2, "Anything else will resume");
#endif
if(rb->global_settings->talk_menu) if(rb->global_settings->talk_menu)
rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true);
rb->lcd_update(); rb->lcd_update();
@ -488,11 +486,7 @@ static void thread(void)
exit = true; exit = true;
break; break;
case EV_EXIT: case EV_EXIT:
#ifdef HAVE_LCD_BITMAP
rb->splash(HZ, "Exiting battery_bench..."); rb->splash(HZ, "Exiting battery_bench...");
#else
rb->splash(HZ, "bench exit");
#endif
exit_reason = "plugin exit"; exit_reason = "plugin exit";
exit = true; exit = true;
break; break;
@ -516,7 +510,6 @@ static void thread(void)
} }
#ifdef HAVE_LCD_BITMAP
typedef void (*plcdfunc)(int x, int y, const unsigned char *str); typedef void (*plcdfunc)(int x, int y, const unsigned char *str);
static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line) static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line)
@ -525,7 +518,6 @@ static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, in
rb->lcd_getstringsize(str, &strwdt, &strhgt); rb->lcd_getstringsize(str, &strwdt, &strhgt);
putsxy((lcd_width - strwdt)/2, line*(strhgt), str); putsxy((lcd_width - strwdt)/2, line*(strhgt), str);
} }
#endif
enum plugin_status plugin_start(const void* parameter) enum plugin_status plugin_start(const void* parameter)
{ {
@ -533,27 +525,20 @@ enum plugin_status plugin_start(const void* parameter)
int button, fd; int button, fd;
bool on = false; bool on = false;
start_tick = *rb->current_tick; start_tick = *rb->current_tick;
#ifdef HAVE_LCD_BITMAP
int i; int i;
const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG,
"for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" };
#endif
rb->lcd_clear_display(); rb->lcd_clear_display();
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++)
put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1);
#else
rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
#endif
if(rb->global_settings->talk_menu) if(rb->global_settings->talk_menu)
rb->talk_id(VOICE_BAT_BENCH_KEYS, true); rb->talk_id(VOICE_BAT_BENCH_KEYS, true);
rb->lcd_update(); rb->lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0);

View File

@ -1,5 +1,3 @@
#ifdef HAVE_LCD_BITMAP
/* Bubbles */ /* Bubbles */
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
bubbles_bubble.112x64x1.bmp bubbles_bubble.112x64x1.bmp
@ -59,7 +57,6 @@ mpegplayer_status_icons_16x16x1.bmp
superdom_boarditems.160x128x1.bmp superdom_boarditems.160x128x1.bmp
#endif #endif
#endif /* HAVE_LCD_BITMAP */
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
osx.dummy.bmp osx.dummy.bmp
#endif #endif

View File

@ -1,5 +1,3 @@
#ifdef HAVE_LCD_BITMAP
/* 2048 */ /* 2048 */
#define MIN(x,y) ((x<y)?x:y) #define MIN(x,y) ((x<y)?x:y)
@ -1004,5 +1002,3 @@ resistor.128x128x16.bmp
#else #else
resistor.68x20x16.bmp resistor.68x20x16.bmp
#endif #endif
#endif /* HAVE_LCD_BITMAP */

View File

@ -448,11 +448,7 @@
/* leave first line blank on bitmap display, for pause icon */ /* leave first line blank on bitmap display, for pause icon */
#ifdef HAVE_LCD_BITMAP
#define FIRST_LINE 1 #define FIRST_LINE 1
#else
#define FIRST_LINE 0
#endif
#define MAX_PLAYERS 10 #define MAX_PLAYERS 10
@ -597,7 +593,6 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK; return PLUGIN_OK;
} }
#ifdef HAVE_LCD_BITMAP
static void show_pause_mode(bool enabled) static void show_pause_mode(bool enabled)
{ {
static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00};
@ -611,9 +606,6 @@ static void show_pause_mode(bool enabled)
rb->lcd_set_drawmode(DRMODE_SOLID); rb->lcd_set_drawmode(DRMODE_SOLID);
} }
} }
#else
#define show_pause_mode(enabled) rb->lcd_icon(ICON_PAUSE, enabled)
#endif
static int run_timer(int nr) static int run_timer(int nr)
{ {

View File

@ -451,9 +451,6 @@
#endif #endif
#endif #endif
#ifdef HAVE_LCD_BITMAP
#define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16) #define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16)
static int x_off = LCD_WIDTH/2; static int x_off = LCD_WIDTH/2;
static int y_off = LCD_HEIGHT/2; static int y_off = LCD_HEIGHT/2;
@ -486,16 +483,6 @@ static struct my_lcd *mylcd = &greyfuncs;
#define ASPECT 256 /* = 1.00 */ #define ASPECT 256 /* = 1.00 */
#endif #endif
#else /* !LCD_BITMAP */
#define MYLCD(fn) pgfx_ ## fn
#define DIST 9
static int x_off = 10;
static int y_off = 7;
#define ASPECT 300 /* = 1.175 */
#endif /* !LCD_BITMAP */
struct point_3D { struct point_3D {
long x, y, z; long x, y, z;
}; };
@ -771,7 +758,6 @@ enum plugin_status plugin_start(const void* parameter)
(void)(parameter); (void)(parameter);
#ifdef HAVE_LCD_BITMAP
#if defined(USEGSLIB) #if defined(USEGSLIB)
gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size);
if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED,
@ -794,7 +780,6 @@ enum plugin_status plugin_start(const void* parameter)
grey_setfont(FONT_SYSFIXED); grey_setfont(FONT_SYSFIXED);
#endif #endif
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
#endif
atexit(cleanup); atexit(cleanup);
while(!quit) while(!quit)
@ -808,7 +793,6 @@ enum plugin_status plugin_start(const void* parameter)
redraw = false; redraw = false;
} }
#ifdef HAVE_LCD_BITMAP
if (t_disp > 0) if (t_disp > 0)
{ {
char buffer[30]; char buffer[30];
@ -821,24 +805,6 @@ enum plugin_status plugin_start(const void* parameter)
if (t_disp == 0) if (t_disp == 0)
redraw = true; redraw = true;
} }
#else
if (t_disp > 0)
{
if (t_disp == DISP_TIME)
{
rb->lcd_puts(5, 0, axes[curr].label);
rb->lcd_putsf(5, 1, "%d %c",
paused ? axes[curr].angle : axes[curr].speed,
highspeed ? 'H' : ' ');
}
t_disp--;
if (t_disp == 0)
{
rb->lcd_clear_display();
pgfx_display(0, 0);
}
}
#endif
#ifdef USEGSLIB #ifdef USEGSLIB
if (mode_switch) if (mode_switch)
{ {

View File

@ -343,10 +343,8 @@ static void tidy_lcd_status(const char *name)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts(0, 0, "Working ..."); rb->lcd_puts(0, 0, "Working ...");
rb->lcd_puts(0, 1, name); rb->lcd_puts(0, 1, name);
#ifdef HAVE_LCD_BITMAP
rb->lcd_putsf(0, 2, "Cleaned up %d items", rb->lcd_putsf(0, 2, "Cleaned up %d items",
run_stats.files_removed + run_stats.dirs_removed); run_stats.files_removed + run_stats.dirs_removed);
#endif
rb->lcd_update(); rb->lcd_update();
} }

View File

@ -534,8 +534,6 @@ static int spots[20];
static int toggle[20]; static int toggle[20];
static int cursor_pos, moves; static int cursor_pos, moves;
#ifdef HAVE_LCD_BITMAP
#include "pluginbitmaps/flipit_cursor.h" #include "pluginbitmaps/flipit_cursor.h"
#include "pluginbitmaps/flipit_tokens.h" #include "pluginbitmaps/flipit_tokens.h"
@ -595,8 +593,6 @@ static void draw_info_panel(void)
GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s );
} }
#endif /* LCD */
/* clear the cursor where it is */ /* clear the cursor where it is */
static inline void clear_cursor(void) static inline void clear_cursor(void)
{ {
@ -829,7 +825,6 @@ enum plugin_status plugin_start(const void* parameter)
rb->splash(HZ, "FlipIt!"); rb->splash(HZ, "FlipIt!");
#ifdef HAVE_LCD_BITMAP
/* print instructions */ /* print instructions */
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
@ -909,7 +904,7 @@ enum plugin_status plugin_start(const void* parameter)
#endif #endif
rb->lcd_update(); rb->lcd_update();
#endif
rb->button_get_w_tmo(HZ*3); rb->button_get_w_tmo(HZ*3);
rb->lcd_clear_display(); rb->lcd_clear_display();

View File

@ -24,7 +24,7 @@
#include "plugin.h" #include "plugin.h"
#include "lib/helper.h" #include "lib/helper.h"
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if (LCD_DEPTH < 4)
#include "lib/grey.h" #include "lib/grey.h"
@ -372,5 +372,5 @@ enum plugin_status plugin_start(const void* parameter)
return main(); return main();
} }
#endif /* #ifdef HAVE_LCD_BITMAP */ #endif /* #if LCD_DEPTH < 4 */

View File

@ -30,7 +30,6 @@ const struct button_mapping* plugin_contexts[]={pla_main_ctx};
#define NB_PICTURES 9 #define NB_PICTURES 9
#define NB_SLOTS 3 #define NB_SLOTS 3
#ifdef HAVE_LCD_BITMAP
#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1))
#if NB_SCREENS==1 #if NB_SCREENS==1
#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT
@ -55,7 +54,6 @@ const struct picture jackpot_pictures[]={
}; };
#define SLEEP_TIME (HZ/200) #define SLEEP_TIME (HZ/200)
#endif /* HAVE_LCD_BITMAP */
struct jackpot struct jackpot
{ {

View File

@ -13,7 +13,7 @@ display_text.c
strncpy.c strncpy.c
stdio_compat.c stdio_compat.c
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if (LCD_DEPTH < 4)
grey_core.c grey_core.c
grey_draw.c grey_draw.c
grey_parm.c grey_parm.c
@ -23,7 +23,7 @@ grey_scroll.c
grey_coldfire.S grey_coldfire.S
#endif #endif
#endif /* HAVE_LCD_BITMAP && LCD_DEPTH < 4 */ #endif /* LCD_DEPTH < 4 */
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
overlay.c overlay.c
@ -33,8 +33,6 @@ overlay.c
profile_plugin.c profile_plugin.c
#endif #endif
#ifdef HAVE_LCD_BITMAP
#ifdef CPU_ARM #ifdef CPU_ARM
pluginlib_jpeg_idct_arm.S pluginlib_jpeg_idct_arm.S
#endif #endif
@ -65,8 +63,6 @@ pluginlib_albumart.c
kbd_helper.c kbd_helper.c
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
pluginlib_touchscreen.c pluginlib_touchscreen.c
#endif #endif

View File

@ -21,11 +21,7 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP
/* /*
* Print a checkbox * Print a checkbox
*/ */
void checkbox(int x, int y, int width, int height, bool checked); void checkbox(int x, int y, int width, int height, bool checked);
#endif

View File

@ -39,9 +39,7 @@ static bool wait_key_press(void)
bool display_text(unsigned short words, char** text, struct style_text* style, bool display_text(unsigned short words, char** text, struct style_text* style,
struct viewport* vp_text, bool wait_key) struct viewport* vp_text, bool wait_key)
{ {
#ifdef HAVE_LCD_BITMAP
int prev_drawmode; int prev_drawmode;
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
int standard_fgcolor; int standard_fgcolor;
#endif #endif
@ -55,10 +53,8 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
vp_height = vp_text->height; vp_height = vp_text->height;
} }
rb->screens[SCREEN_MAIN]->set_viewport(vp_text); rb->screens[SCREEN_MAIN]->set_viewport(vp_text);
#ifdef HAVE_LCD_BITMAP
prev_drawmode = rb->lcd_get_drawmode(); prev_drawmode = rb->lcd_get_drawmode();
rb->lcd_set_drawmode(DRMODE_SOLID); rb->lcd_set_drawmode(DRMODE_SOLID);
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
standard_fgcolor = rb->lcd_get_foreground(); standard_fgcolor = rb->lcd_get_foreground();
#endif #endif
@ -121,11 +117,9 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
#endif #endif
rb->lcd_putsxy(x, y, text[i]); rb->lcd_putsxy(x, y, text[i]);
/* underline the word */ /* underline the word */
#ifdef HAVE_LCD_BITMAP
if (style[style_index].flags&TEXT_UNDERLINE) { if (style[style_index].flags&TEXT_UNDERLINE) {
rb->lcd_hline(x, x+width, y+height-1); rb->lcd_hline(x, x+width, y+height-1);
} }
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(standard_fgcolor); rb->lcd_set_foreground(standard_fgcolor);
#endif #endif
@ -134,9 +128,7 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
x += width + space_w; x += width + space_w;
} }
rb->screens[SCREEN_MAIN]->update_viewport(); rb->screens[SCREEN_MAIN]->update_viewport();
#ifdef HAVE_LCD_BITMAP
rb->lcd_set_drawmode(prev_drawmode); rb->lcd_set_drawmode(prev_drawmode);
#endif
if (wait_key) if (wait_key)
{ {
if (wait_key_press()) if (wait_key_press())

View File

@ -29,7 +29,7 @@
#include "plugin.h" #include "plugin.h"
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if (LCD_DEPTH < 4)
/* The greyscale lib uses 8 bit brightness values natively on input. */ /* The greyscale lib uses 8 bit brightness values natively on input. */
#define GREY_BRIGHTNESS(y) (y) #define GREY_BRIGHTNESS(y) (y)
@ -201,5 +201,5 @@ struct _grey_info
/* Global variable, defined in the plugin */ /* Global variable, defined in the plugin */
extern struct _grey_info _grey_info; extern struct _grey_info _grey_info;
#endif /* HAVE_LCD_BITMAP && (LCD_DEPTH < 4) */ #endif /* (LCD_DEPTH < 4) */
#endif /* __GREY_H__ */ #endif /* __GREY_H__ */

View File

@ -119,7 +119,6 @@ bool highscore_would_update(int score, struct highscore *scores,
return (num_scores > 0) && (score > scores[num_scores-1].score); return (num_scores > 0) && (score > scores[num_scores-1].score);
} }
#ifdef HAVE_LCD_BITMAP
#define MARGIN 5 #define MARGIN 5
void highscore_show(int position, struct highscore *scores, int num_scores, void highscore_show(int position, struct highscore *scores, int num_scores,
bool show_level) bool show_level)
@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores,
rb->lcd_set_foreground(fgcolor); rb->lcd_set_foreground(fgcolor);
#endif #endif
} }
#else
struct scoreinfo {
struct highscore *scores;
int position;
bool show_level;
};
static const char* get_score(int selected, void * data,
char * buffer, size_t buffer_len)
{
struct scoreinfo *scoreinfo = (struct scoreinfo *) data;
int len;
len = rb->snprintf(buffer, buffer_len, "%c%d) %4d",
(scoreinfo->position == selected?'*':' '),
selected+1, scoreinfo->scores[selected].score);
if (scoreinfo->show_level)
rb->snprintf(buffer + len, buffer_len - len, " %d",
scoreinfo->scores[selected].level);
return buffer;
}
void highscore_show(int position, struct highscore *scores, int num_scores,
bool show_level)
{
struct simplelist_info info;
struct scoreinfo scoreinfo = {scores, position, show_level};
rb->simplelist_info_init(&info, "High Scores", num_scores, &scoreinfo);
if (position >= 0)
info.selection = position;
info.hide_selection = true;
info.get_name = get_score;
rb->simplelist_show_list(&info);
}
#endif /* HAVE_LCD_BITMAP */

View File

@ -35,7 +35,7 @@
* lib/grey.h should be included before including this * lib/grey.h should be included before including this
* header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise. * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise.
*/ */
#if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__) #if (LCD_DEPTH < 4) && defined(__GREY_H__)
#define MYLCD_CFG_GREYLIB /* using greylib */ #define MYLCD_CFG_GREYLIB /* using greylib */
#define mylcd_(fn) grey_##fn #define mylcd_(fn) grey_##fn
#define myxlcd_(fn) grey_##fn #define myxlcd_(fn) grey_##fn
@ -51,7 +51,8 @@
#define MYLCD_DEFAULT_FG GREY_BLACK #define MYLCD_DEFAULT_FG GREY_BLACK
#define MYLCD_DEFAULT_BG GREY_WHITE #define MYLCD_DEFAULT_BG GREY_WHITE
#elif defined (HAVE_LCD_BITMAP) #else
#define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */ #define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */
#define mylcd_(fn) rb->lcd_##fn #define mylcd_(fn) rb->lcd_##fn
#define myxlcd_(fn) xlcd_##fn #define myxlcd_(fn) xlcd_##fn
@ -67,18 +68,11 @@
#define MYLCD_DEFAULT_FG LCD_DEFAULT_FG #define MYLCD_DEFAULT_FG LCD_DEFAULT_FG
#define MYLCD_DEFAULT_BG LCD_DEFAULT_BG #define MYLCD_DEFAULT_BG LCD_DEFAULT_BG
#else
#error Configuration not supported! Did you forget to include the correct lib header?
#endif /* end LCD type selection */ #endif /* end LCD type selection */
/* Update functions */ /* Update functions */
#define mylcd_update mylcd_(update) #define mylcd_update mylcd_(update)
#ifdef HAVE_LCD_BITMAP
#define mylcd_update_rect mylcd_(update_rect) #define mylcd_update_rect mylcd_(update_rect)
#else
static inline void mylcd_update_rect(int x, int y, int w, int h)
{ (void)x; (void)y; (void)w; (void)h; pgfx_update(); }
#endif /* HAVE_LCD_BITMAP */
/* Update functions - unbuffered : special handling for these /* Update functions - unbuffered : special handling for these
* It is desirable to still evaluate arguments even if there will * It is desirable to still evaluate arguments even if there will
@ -104,7 +98,6 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
#define mylcd_set_drawmode mylcd_(set_drawmode) #define mylcd_set_drawmode mylcd_(set_drawmode)
#define mylcd_get_drawmode mylcd_(get_drawmode) #define mylcd_get_drawmode mylcd_(get_drawmode)
#ifdef HAVE_LCD_BITMAP
#define mylcd_set_foreground mylcd_(set_foreground) #define mylcd_set_foreground mylcd_(set_foreground)
#define mylcd_get_foreground mylcd_(get_foreground) #define mylcd_get_foreground mylcd_(get_foreground)
#define mylcd_set_background mylcd_(set_background) #define mylcd_set_background mylcd_(set_background)
@ -112,7 +105,6 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
#define mylcd_set_drawinfo mylcd_(set_drawinfo) #define mylcd_set_drawinfo mylcd_(set_drawinfo)
#define mylcd_setfont mylcd_(setfont) #define mylcd_setfont mylcd_(setfont)
#define mylcd_getstringsize mylcd_(getstringsize) #define mylcd_getstringsize mylcd_(getstringsize)
#endif /* HAVE_LCD_BITMAP */
/* Whole display */ /* Whole display */
#define mylcd_clear_display mylcd_(clear_display) #define mylcd_clear_display mylcd_(clear_display)
@ -131,57 +123,43 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
/* Filled Primitives */ /* Filled Primitives */
#define mylcd_fillrect mylcd_(fillrect) #define mylcd_fillrect mylcd_(fillrect)
#ifdef HAVE_LCD_BITMAP
#define mylcd_filltriangle myxlcd_(filltriangle) #define mylcd_filltriangle myxlcd_(filltriangle)
#endif /* HAVE_LCD_BITMAP */
/* Bitmaps */ /* Bitmaps */
#define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part) #define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part)
#define mylcd_mono_bitmap mylcd_(mono_bitmap) #define mylcd_mono_bitmap mylcd_(mono_bitmap)
#ifdef HAVE_LCD_BITMAP
#define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part) #define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part)
#define mylcd_gray_bitmap myxlcd_(gray_bitmap) #define mylcd_gray_bitmap myxlcd_(gray_bitmap)
#if 0 /* possible, but not implemented in greylib */ #if 0 /* possible, but not implemented in greylib */
#define mylcd_color_bitmap_part myxlcd_(color_bitmap_part) #define mylcd_color_bitmap_part myxlcd_(color_bitmap_part)
#define mylcd_color_bitmap myxlcd_(color_bitmap) #define mylcd_color_bitmap myxlcd_(color_bitmap)
#endif #endif
#endif /* HAVE_LCD_BITMAP */
/* Bitmaps - unbuffered */ /* Bitmaps - unbuffered */
#ifdef HAVE_LCD_BITMAP
#define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part) #define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part)
#define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap) #define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap)
#endif /* HAVE_LCD_BITMAP */
/* Text */ /* Text */
/* lcd_putsxyofs is static'ed in the core for now on color */ /* lcd_putsxyofs is static'ed in the core for now on color */
#ifdef HAVE_LCD_BITMAP
#define mylcd_putsxyofs mylcd_(putsxyofs) #define mylcd_putsxyofs mylcd_(putsxyofs)
#define mylcd_putsxy mylcd_(putsxy) #define mylcd_putsxy mylcd_(putsxy)
#endif /* HAVE_LCD_BITMAP */
/* Scrolling */ /* Scrolling */
#ifdef HAVE_LCD_BITMAP
#define mylcd_scroll_left myxlcd_(scroll_left) #define mylcd_scroll_left myxlcd_(scroll_left)
#define mylcd_scroll_right myxlcd_(scroll_right) #define mylcd_scroll_right myxlcd_(scroll_right)
#define mylcd_scroll_up myxlcd_(scroll_up) #define mylcd_scroll_up myxlcd_(scroll_up)
#define mylcd_scroll_down myxlcd_(scroll_down) #define mylcd_scroll_down myxlcd_(scroll_down)
#endif /* HAVE_LCD_BITMAP */
/* Scrolling - unbuffered */ /* Scrolling - unbuffered */
#ifdef HAVE_LCD_BITMAP
#define mylcd_ub_scroll_left myxlcd_ub_(scroll_left) #define mylcd_ub_scroll_left myxlcd_ub_(scroll_left)
#define mylcd_ub_scroll_right myxlcd_ub_(scroll_right) #define mylcd_ub_scroll_right myxlcd_ub_(scroll_right)
#define mylcd_ub_scroll_up myxlcd_ub_(scroll_up) #define mylcd_ub_scroll_up myxlcd_ub_(scroll_up)
#define mylcd_ub_scroll_down myxlcd_ub_(scroll_down) #define mylcd_ub_scroll_down myxlcd_ub_(scroll_down)
#endif /* HAVE_LCD_BITMAP */
/* Viewports */ /* Viewports */
#ifdef HAVE_LCD_BITMAP
#define mylcd_clear_viewport mylcd_(clear_viewport) #define mylcd_clear_viewport mylcd_(clear_viewport)
#define mylcd_set_viewport mylcd_(set_viewport) #define mylcd_set_viewport mylcd_(set_viewport)
#define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen) #define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen)
#endif /* HAVE_LCD_BITMAP */
#endif /* MYLCD_H */ #endif /* MYLCD_H */

View File

@ -37,7 +37,7 @@ int save_bmp_file( char* filename, struct bitmap *bm );
*/ */
void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst); void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst);
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if (LCD_DEPTH < 4)
/** /**
Same as simple_resize_bitmap except this is for use with greylib. Same as simple_resize_bitmap except this is for use with greylib.
*/ */

View File

@ -27,10 +27,8 @@
struct view_info { struct view_info {
#ifdef HAVE_LCD_BITMAP
struct font* pf; struct font* pf;
struct viewport scrollbar_vp; /* viewport for scrollbar */ struct viewport scrollbar_vp; /* viewport for scrollbar */
#endif
struct viewport vp; struct viewport vp;
const char *title; const char *title;
const char *text; /* displayed text */ const char *text; /* displayed text */
@ -89,15 +87,12 @@ static void calc_line_count(struct view_info *info)
{ {
const char *ptr = info->text; const char *ptr = info->text;
int i = 0; int i = 0;
#ifdef HAVE_LCD_BITMAP
bool scrollbar = false; bool scrollbar = false;
#endif
while (*ptr) while (*ptr)
{ {
ptr = get_next_line(ptr, info); ptr = get_next_line(ptr, info);
i++; i++;
#ifdef HAVE_LCD_BITMAP
if (!scrollbar && i > info->display_lines) if (!scrollbar && i > info->display_lines)
{ {
ptr = info->text; ptr = info->text;
@ -111,7 +106,6 @@ static void calc_line_count(struct view_info *info)
info->scrollbar_vp.x = info->vp.width; info->scrollbar_vp.x = info->vp.width;
scrollbar = true; scrollbar = true;
} }
#endif
} }
info->line_count = i; info->line_count = i;
} }
@ -144,12 +138,8 @@ static int init_view(struct view_info *info,
const char *title, const char *text) const char *title, const char *text)
{ {
rb->viewport_set_defaults(&info->vp, SCREEN_MAIN); rb->viewport_set_defaults(&info->vp, SCREEN_MAIN);
#ifdef HAVE_LCD_BITMAP
info->pf = rb->font_get(FONT_UI); info->pf = rb->font_get(FONT_UI);
info->display_lines = info->vp.height / info->pf->height; info->display_lines = info->vp.height / info->pf->height;
#else
info->display_lines = info->vp.height;
#endif
info->title = title; info->title = title;
info->text = text; info->text = text;
@ -157,7 +147,6 @@ static int init_view(struct view_info *info,
info->line = 0; info->line = 0;
info->start = 0; info->start = 0;
#ifdef HAVE_LCD_BITMAP
/* no title for small screens. */ /* no title for small screens. */
if (info->display_lines < 4) if (info->display_lines < 4)
{ {
@ -169,7 +158,6 @@ static int init_view(struct view_info *info,
info->vp.y += info->pf->height; info->vp.y += info->pf->height;
info->vp.height -= info->pf->height; info->vp.height -= info->pf->height;
} }
#endif
calc_line_count(info); calc_line_count(info);
return 0; return 0;
@ -177,11 +165,7 @@ static int init_view(struct view_info *info,
static void draw_text(struct view_info *info) static void draw_text(struct view_info *info)
{ {
#ifdef HAVE_LCD_BITMAP
#define OUTPUT_SIZE LCD_WIDTH+1 #define OUTPUT_SIZE LCD_WIDTH+1
#else
#define OUTPUT_SIZE LCD_WIDTH*3+1
#endif
static char output[OUTPUT_SIZE]; static char output[OUTPUT_SIZE];
const char *text, *ptr; const char *text, *ptr;
int max_show, line; int max_show, line;
@ -190,14 +174,12 @@ static void draw_text(struct view_info *info)
/* clear screen */ /* clear screen */
display->clear_display(); display->clear_display();
#ifdef HAVE_LCD_BITMAP
/* display title. */ /* display title. */
if(info->title) if(info->title)
{ {
display->set_viewport(NULL); display->set_viewport(NULL);
display->puts(0, 0, info->title); display->puts(0, 0, info->title);
} }
#endif
max_show = MIN(info->line_count - info->line, info->display_lines); max_show = MIN(info->line_count - info->line, info->display_lines);
text = info->text + info->start; text = info->text + info->start;
@ -215,7 +197,6 @@ static void draw_text(struct view_info *info)
display->puts(0, line, output); display->puts(0, line, output);
text = ptr; text = ptr;
} }
#ifdef HAVE_LCD_BITMAP
if (info->line_count > info->display_lines) if (info->line_count > info->display_lines)
{ {
display->set_viewport(&info->scrollbar_vp); display->set_viewport(&info->scrollbar_vp);
@ -224,7 +205,6 @@ static void draw_text(struct view_info *info)
info->line_count, info->line, info->line + max_show, info->line_count, info->line, info->line + max_show,
VERTICAL); VERTICAL);
} }
#endif
display->set_viewport(NULL); display->set_viewport(NULL);
display->update(); display->update();

View File

@ -26,8 +26,6 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP
void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3);
void xlcd_filltriangle_screen(struct screen* display, void xlcd_filltriangle_screen(struct screen* display,
int x1, int y1, int x2, int y2, int x3, int y3); int x1, int y1, int x2, int y2, int x3, int y3);
@ -54,6 +52,5 @@ void xlcd_scroll_right(int count);
void xlcd_scroll_up(int count); void xlcd_scroll_up(int count);
void xlcd_scroll_down(int count); void xlcd_scroll_down(int count);
#endif /* HAVE_LCD_BITMAP */
#endif /* __XLCD_H__ */ #endif /* __XLCD_H__ */

View File

@ -24,8 +24,5 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP
#include "xlcd.h" #include "xlcd.h"
#endif /* HAVE_LCD_BITMAP */

View File

@ -24,7 +24,6 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP
#include "xlcd.h" #include "xlcd.h"
/* sort the given coordinates by increasing x value */ /* sort the given coordinates by increasing x value */
@ -486,5 +485,3 @@ void xlcd_color_bitmap(const unsigned char *src, int x, int y, int width,
#endif /* HAVE_LCD_COLOR */ #endif /* HAVE_LCD_COLOR */
#endif /* LCD_DEPTH >= 8 */ #endif /* LCD_DEPTH >= 8 */
#endif /* HAVE_LCD_BITMAP */

View File

@ -29,7 +29,6 @@ static const struct button_mapping *plugin_contexts[]
#endif #endif
}; };
#ifdef HAVE_LCD_BITMAP
#define DISPLAY_WIDTH LCD_WIDTH #define DISPLAY_WIDTH LCD_WIDTH
#define DISPLAY_HEIGHT LCD_HEIGHT #define DISPLAY_HEIGHT LCD_HEIGHT
#define RAND_SCALE 5 #define RAND_SCALE 5
@ -48,19 +47,6 @@ static const struct button_mapping *plugin_contexts[]
#define LOGO_WIDTH BMPWIDTH_rockboxlogo #define LOGO_WIDTH BMPWIDTH_rockboxlogo
#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo #define LOGO_HEIGHT BMPHEIGHT_rockboxlogo
#else /* !LCD_BITMAP */
#define DISPLAY_WIDTH 55
#define DISPLAY_HEIGHT 14
#define RAND_SCALE 2
#define LOGO_WIDTH 16
#define LOGO_HEIGHT 7
#define LOGO rockbox16x7
const unsigned char rockbox16x7[] = {
0x47, 0x18, 0xa6, 0xd8, 0x66, 0xde, 0xb7, 0x9b,
0x76, 0xdb, 0x26, 0xdb, 0x66, 0xde,
};
#endif /* !LCD_BITMAP */
/* We use PLA */ /* We use PLA */
#define LP_QUIT PLA_EXIT #define LP_QUIT PLA_EXIT
#define LP_QUIT2 PLA_CANCEL #define LP_QUIT2 PLA_CANCEL
@ -88,7 +74,6 @@ enum plugin_status plugin_start(const void* parameter) {
dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
while (1) { while (1) {
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
#ifdef REMOTE_LOGO #ifdef REMOTE_LOGO
@ -98,12 +83,6 @@ enum plugin_status plugin_start(const void* parameter) {
(y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT);
#endif #endif
#else
pgfx_clear_display();
pgfx_mono_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT);
cpos = x / 5;
#endif
x += dx; x += dx;
if (x < 0) { if (x < 0) {
dx = -dx; dx = -dx;
@ -124,18 +103,9 @@ enum plugin_status plugin_start(const void* parameter) {
y = DISPLAY_HEIGHT - LOGO_HEIGHT; y = DISPLAY_HEIGHT - LOGO_HEIGHT;
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#ifdef REMOTE_LOGO #ifdef REMOTE_LOGO
rb->lcd_remote_update(); rb->lcd_remote_update();
#endif
#else
if (cpos != old_cpos) {
rb->lcd_clear_display();
pgfx_display(cpos, 0);
old_cpos = cpos;
}
pgfx_update();
#endif #endif
rb->sleep(HZ/timer); rb->sleep(HZ/timer);

View File

@ -71,14 +71,12 @@ struct preferences {
unsigned active_color; unsigned active_color;
unsigned inactive_color; unsigned inactive_color;
#endif #endif
#ifdef HAVE_LCD_BITMAP
bool wrap; bool wrap;
bool wipe; bool wipe;
bool active_one_line; bool active_one_line;
int align; /* 0: left, 1: center, 2: right */ int align; /* 0: left, 1: center, 2: right */
bool statusbar_on; bool statusbar_on;
bool display_title; bool display_title;
#endif
bool display_time; bool display_time;
bool backlight_on; bool backlight_on;
@ -118,16 +116,12 @@ static struct lrc_info {
bool loaded_lrc; bool loaded_lrc;
bool changed_lrc; bool changed_lrc;
bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */
#ifdef HAVE_LCD_BITMAP
bool wipe; /* false if lyrics is unsynched */ bool wipe; /* false if lyrics is unsynched */
#endif
} current; } current;
static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)];
#ifdef HAVE_LCD_BITMAP
static int uifont = -1; static int uifont = -1;
static int font_ui_height = 1; static int font_ui_height = 1;
static struct viewport vp_info[NB_SCREENS]; static struct viewport vp_info[NB_SCREENS];
#endif
static struct viewport vp_lyrics[NB_SCREENS]; static struct viewport vp_lyrics[NB_SCREENS];
#define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE) #define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE)
@ -221,11 +215,9 @@ static int lrc_set_time(const char *title, const char *unit, long *pval,
{ {
/* draw cursor */ /* draw cursor */
buffer[p_end-1] = 0; buffer[p_end-1] = 0;
#ifdef HAVE_LCD_BITMAP
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]);
rb->lcd_set_drawmode(DRMODE_SOLID); rb->lcd_set_drawmode(DRMODE_SOLID);
#endif
} }
rb->lcd_update(); rb->lcd_update();
int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts));
@ -394,19 +386,16 @@ static int format_time_tag(char *buf, long t)
/* find start of next line */ /* find start of next line */
static const char *lrc_skip_space(const char *str) static const char *lrc_skip_space(const char *str)
{ {
#ifdef HAVE_LCD_BITMAP
if (prefs.wrap) if (prefs.wrap)
{ {
while (*str && *str != '\n' && isspace(*str)) while (*str && *str != '\n' && isspace(*str))
str++; str++;
} }
#endif
if (*str == '\n') if (*str == '\n')
str++; str++;
return str; return str;
} }
#ifdef HAVE_LCD_BITMAP
static bool isbrchr(const unsigned char *str, int len) static bool isbrchr(const unsigned char *str, int len)
{ {
const unsigned char *p = "!,-.:;? 、。!,.:;?―"; const unsigned char *p = "!,-.:;? 、。!,.:;?―";
@ -422,7 +411,6 @@ static bool isbrchr(const unsigned char *str, int len)
} }
return false; return false;
} }
#endif
/* calculate how many lines is needed to display and store it. /* calculate how many lines is needed to display and store it.
* create cache if there is enough space in lrc_buffer. */ * create cache if there is enough space in lrc_buffer. */
@ -431,11 +419,9 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
struct lrc_brpos *lrc_brpos; struct lrc_brpos *lrc_brpos;
struct lrc_word *lrc_word; struct lrc_word *lrc_word;
int nlrcbrpos = 0, max_lrcbrpos; int nlrcbrpos = 0, max_lrcbrpos;
#ifdef HAVE_LCD_BITMAP
uifont = rb->screens[0]->getuifont(); uifont = rb->screens[0]->getuifont();
struct font* pf = rb->font_get(uifont); struct font* pf = rb->font_get(uifont);
unsigned short ch; unsigned short ch;
#endif
struct snap { struct snap {
int count, width; int count, width;
int nword; int nword;
@ -1559,7 +1545,6 @@ static void display_state(void)
str = "No lyrics"; str = "No lyrics";
} }
#ifdef HAVE_LCD_BITMAP
const char *info = NULL; const char *info = NULL;
if (AUDIO_PLAY && prefs.display_title) if (AUDIO_PLAY && prefs.display_title)
@ -1605,13 +1590,6 @@ static void display_state(void)
display->update_viewport(); display->update_viewport();
display->set_viewport(NULL); display->set_viewport(NULL);
} }
#else
/* there is no place to display title or artist. */
rb->lcd_clear_display();
if (str)
rb->lcd_puts_scroll(0, 0, str);
rb->lcd_update();
#endif /* HAVE_LCD_BITMAP */
} }
static void display_time(void) static void display_time(void)
@ -1619,7 +1597,6 @@ static void display_time(void)
rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld",
current.elapsed/60000, (current.elapsed/1000)%60, current.elapsed/60000, (current.elapsed/1000)%60,
current.length/60000, (current.length)/1000%60); current.length/60000, (current.length)/1000%60);
#ifdef HAVE_LCD_BITMAP
int y = (prefs.display_title? font_ui_height:0); int y = (prefs.display_title? font_ui_height:0);
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
@ -1634,16 +1611,11 @@ static void display_time(void)
display->setfont(uifont); display->setfont(uifont);
display->set_viewport(NULL); display->set_viewport(NULL);
} }
#else
rb->lcd_puts(0, 0, temp_buf);
rb->lcd_update();
#endif /* HAVE_LCD_BITMAP */
} }
/******************************* /*******************************
* Display lyrics * Display lyrics
*******************************/ *******************************/
#ifdef HAVE_LCD_BITMAP
static inline void set_to_default(struct screen *display) static inline void set_to_default(struct screen *display)
{ {
#if (LCD_DEPTH > 1) #if (LCD_DEPTH > 1)
@ -1817,7 +1789,6 @@ static int display_lrc_line(struct lrc_line *lrc_line, int ypos, int i)
set_to_default(display); set_to_default(display);
return ypos; return ypos;
} }
#endif /* HAVE_LCD_BITMAP */
static void display_lrcs(void) static void display_lrcs(void)
{ {
@ -1848,7 +1819,7 @@ static void display_lrcs(void)
/* display current line at the center of the viewport */ /* display current line at the center of the viewport */
display->set_viewport(&vp_lyrics[i]); display->set_viewport(&vp_lyrics[i]);
display->clear_viewport(); display->clear_viewport();
#ifdef HAVE_LCD_BITMAP
struct lrc_line *lrc_line; struct lrc_line *lrc_line;
int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height;
y = (nblines-1)/2; y = (nblines-1)/2;
@ -1895,7 +1866,7 @@ static void display_lrcs(void)
} }
if (!lrc_line && ypos < vp_lyrics[i].height) if (!lrc_line && ypos < vp_lyrics[i].height)
display->putsxy(0, ypos, "[end]"); display->putsxy(0, ypos, "[end]");
#endif /* HAVE_LCD_BITMAP */
display->update_viewport(); display->update_viewport();
display->set_viewport(NULL); display->set_viewport(NULL);
} }
@ -2191,7 +2162,6 @@ static void load_or_save_settings(bool save)
{ TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color },
"inactive color", NULL }, "inactive color", NULL },
#endif #endif
#ifdef HAVE_LCD_BITMAP
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line },
@ -2201,7 +2171,6 @@ static void load_or_save_settings(bool save)
"statusbar on", NULL }, "statusbar on", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title },
"display title", NULL }, "display title", NULL },
#endif
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time },
"display time", NULL }, "display time", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on },
@ -2223,14 +2192,12 @@ static void load_or_save_settings(bool save)
prefs.active_color = rb->lcd_get_foreground(); prefs.active_color = rb->lcd_get_foreground();
prefs.inactive_color = LCD_LIGHTGRAY; prefs.inactive_color = LCD_LIGHTGRAY;
#endif #endif
#ifdef HAVE_LCD_BITMAP
prefs.wrap = true; prefs.wrap = true;
prefs.wipe = true; prefs.wipe = true;
prefs.active_one_line = false; prefs.active_one_line = false;
prefs.align = 1; /* center */ prefs.align = 1; /* center */
prefs.statusbar_on = false; prefs.statusbar_on = false;
prefs.display_title = true; prefs.display_title = true;
#endif
prefs.display_time = true; prefs.display_time = true;
prefs.backlight_on = false; prefs.backlight_on = false;
#ifdef LRC_SUPPORT_ID3 #ifdef LRC_SUPPORT_ID3
@ -2252,10 +2219,8 @@ static void load_or_save_settings(bool save)
static bool lrc_theme_menu(void) static bool lrc_theme_menu(void)
{ {
enum { enum {
#ifdef HAVE_LCD_BITMAP
LRC_MENU_STATUSBAR, LRC_MENU_STATUSBAR,
LRC_MENU_DISP_TITLE, LRC_MENU_DISP_TITLE,
#endif
LRC_MENU_DISP_TIME, LRC_MENU_DISP_TIME,
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
LRC_MENU_INACTIVE_COLOR, LRC_MENU_INACTIVE_COLOR,
@ -2267,9 +2232,7 @@ static bool lrc_theme_menu(void)
bool exit = false, usb = false; bool exit = false, usb = false;
MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, MENUITEM_STRINGLIST(menu, "Theme Settings", NULL,
#ifdef HAVE_LCD_BITMAP
"Show Statusbar", "Display Title", "Show Statusbar", "Display Title",
#endif
"Display Time", "Display Time",
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
"Inactive Colour", "Inactive Colour",
@ -2280,14 +2243,12 @@ static bool lrc_theme_menu(void)
{ {
switch (rb->do_menu(&menu, &selected, NULL, false)) switch (rb->do_menu(&menu, &selected, NULL, false))
{ {
#ifdef HAVE_LCD_BITMAP
case LRC_MENU_STATUSBAR: case LRC_MENU_STATUSBAR:
usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on);
break; break;
case LRC_MENU_DISP_TITLE: case LRC_MENU_DISP_TITLE:
usb = rb->set_bool("Display Title", &prefs.display_title); usb = rb->set_bool("Display Title", &prefs.display_title);
break; break;
#endif
case LRC_MENU_DISP_TIME: case LRC_MENU_DISP_TIME:
usb = rb->set_bool("Display Time", &prefs.display_time); usb = rb->set_bool("Display Time", &prefs.display_time);
break; break;
@ -2312,7 +2273,6 @@ static bool lrc_theme_menu(void)
return usb; return usb;
} }
#ifdef HAVE_LCD_BITMAP
static bool lrc_display_menu(void) static bool lrc_display_menu(void)
{ {
enum { enum {
@ -2362,7 +2322,6 @@ static bool lrc_display_menu(void)
return usb; return usb;
} }
#endif /* HAVE_LCD_BITMAP */
static bool lrc_lyrics_menu(void) static bool lrc_lyrics_menu(void)
{ {
@ -2489,9 +2448,7 @@ static int lrc_menu(void)
{ {
enum { enum {
LRC_MENU_THEME, LRC_MENU_THEME,
#ifdef HAVE_LCD_BITMAP
LRC_MENU_DISPLAY, LRC_MENU_DISPLAY,
#endif
LRC_MENU_LYRICS, LRC_MENU_LYRICS,
LRC_MENU_PLAYBACK, LRC_MENU_PLAYBACK,
#ifdef LRC_DEBUG #ifdef LRC_DEBUG
@ -2504,9 +2461,7 @@ static int lrc_menu(void)
MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL,
"Theme Settings", "Theme Settings",
#ifdef HAVE_LCD_BITMAP
"Display Settings", "Display Settings",
#endif
"Lyrics Settings", "Lyrics Settings",
"Playback Control", "Playback Control",
#ifdef LRC_DEBUG #ifdef LRC_DEBUG
@ -2524,11 +2479,9 @@ static int lrc_menu(void)
case LRC_MENU_THEME: case LRC_MENU_THEME:
usb = lrc_theme_menu(); usb = lrc_theme_menu();
break; break;
#ifdef HAVE_LCD_BITMAP
case LRC_MENU_DISPLAY: case LRC_MENU_DISPLAY:
usb = lrc_display_menu(); usb = lrc_display_menu();
break; break;
#endif
case LRC_MENU_LYRICS: case LRC_MENU_LYRICS:
usb = lrc_lyrics_menu(); usb = lrc_lyrics_menu();
break; break;
@ -2720,40 +2673,27 @@ static int lrc_main(void)
long id3_timeout = 0; long id3_timeout = 0;
bool update_display_state = true; bool update_display_state = true;
#ifdef HAVE_LCD_BITMAP
/* y offset of vp_lyrics */ /* y offset of vp_lyrics */
int h = (prefs.display_title?font_ui_height:0)+ int h = (prefs.display_title?font_ui_height:0)+
(prefs.display_time?SYSFONT_HEIGHT*2:0); (prefs.display_time?SYSFONT_HEIGHT*2:0);
#endif
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
#ifdef HAVE_LCD_BITMAP
rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]);
vp_lyrics[i] = vp_info[i]; vp_lyrics[i] = vp_info[i];
vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK;
vp_lyrics[i].y += h; vp_lyrics[i].y += h;
vp_lyrics[i].height -= h; vp_lyrics[i].height -= h;
#else
rb->viewport_set_defaults(&vp_lyrics[i], i);
if (prefs.display_time)
{
vp_lyrics[i].y += 1; /* time */
vp_lyrics[i].height -= 1;
}
#endif
} }
if (prefs.backlight_on) if (prefs.backlight_on)
backlight_ignore_timeout(); backlight_ignore_timeout();
#ifdef HAVE_LCD_BITMAP /* in case settings that may affect break position
/* in case settings that may affect break position
* are changed (statusbar_on and wrap). */ * are changed (statusbar_on and wrap). */
if (!current.too_many_lines) if (!current.too_many_lines)
calc_brpos(NULL, 0); calc_brpos(NULL, 0);
#endif
while (ret == LRC_GOTO_MAIN) while (ret == LRC_GOTO_MAIN)
{ {
@ -2819,12 +2759,10 @@ static int lrc_main(void)
} }
if (update_display_state) if (update_display_state)
{ {
#ifdef HAVE_LCD_BITMAP
if (current.type == TXT || current.type == ID3_USLT) if (current.type == TXT || current.type == ID3_USLT)
current.wipe = false; current.wipe = false;
else else
current.wipe = prefs.wipe; current.wipe = prefs.wipe;
#endif
display_state(); display_state();
update_display_state = false; update_display_state = false;
} }
@ -2839,10 +2777,9 @@ static int lrc_main(void)
ret = handle_button(); ret = handle_button();
} }
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
rb->viewportmanager_theme_undo(i, false); rb->viewportmanager_theme_undo(i, false);
#endif
if (prefs.backlight_on) if (prefs.backlight_on)
backlight_use_settings(); backlight_use_settings();
@ -2857,10 +2794,8 @@ enum plugin_status plugin_start(const void* parameter)
/* initialize settings. */ /* initialize settings. */
load_or_save_settings(false); load_or_save_settings(false);
#ifdef HAVE_LCD_BITMAP
uifont = rb->screens[0]->getuifont(); uifont = rb->screens[0]->getuifont();
font_ui_height = rb->font_get(uifont)->height; font_ui_height = rb->font_get(uifont)->height;
#endif
lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size);
lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */

View File

@ -1331,10 +1331,8 @@ static inline struct viewport* opt_viewport(lua_State *L,
vp->y = check_tablevalue(L, "y", narg); vp->y = check_tablevalue(L, "y", narg);
vp->width = check_tablevalue(L, "width", narg); vp->width = check_tablevalue(L, "width", narg);
vp->height = check_tablevalue(L, "height", narg); vp->height = check_tablevalue(L, "height", narg);
#ifdef HAVE_LCD_BITMAP
vp->font = check_tablevalue(L, "font", narg); vp->font = check_tablevalue(L, "font", narg);
vp->drawmode = check_tablevalue(L, "drawmode", narg); vp->drawmode = check_tablevalue(L, "drawmode", narg);
#endif
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg); vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg);
vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg); vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg);
@ -1379,7 +1377,6 @@ RB_WRAP(font_getstringsize)
return 3; return 3;
} }
#ifdef HAVE_LCD_BITMAP
RB_WRAP(lcd_framebuffer) RB_WRAP(lcd_framebuffer)
{ {
rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT);
@ -1620,8 +1617,6 @@ RB_WRAP(lcd_drawpixel)
return 0; return 0;
} }
#endif /* defined(LCD_BITMAP) */
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
RB_WRAP(lcd_rgbpack) RB_WRAP(lcd_rgbpack)
{ {
@ -1690,7 +1685,6 @@ static const luaL_Reg rocklib_img[] =
R(set_viewport), R(set_viewport),
R(clear_viewport), R(clear_viewport),
R(font_getstringsize), R(font_getstringsize),
#ifdef HAVE_LCD_BITMAP
R(lcd_framebuffer), R(lcd_framebuffer),
R(lcd_setfont), R(lcd_setfont),
R(gui_scrollbar_draw), R(gui_scrollbar_draw),
@ -1721,7 +1715,6 @@ static const luaL_Reg rocklib_img[] =
R(lcd_vline), R(lcd_vline),
R(lcd_drawpixel), R(lcd_drawpixel),
#endif /*HAVE_LCD_BITMAP*/
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
R(lcd_rgbpack), R(lcd_rgbpack),
R(lcd_rgbunpack), R(lcd_rgbunpack),

View File

@ -22,9 +22,7 @@
#ifndef _ROCKLIB_IMG_H_ #ifndef _ROCKLIB_IMG_H_
#define _ROCKLIB_IMG_H_ #define _ROCKLIB_IMG_H_
#ifdef HAVE_LCD_BITMAP
#define RLI_EXTENDED #define RLI_EXTENDED
#endif
LUALIB_API int (luaopen_rock_img) (lua_State *L); LUALIB_API int (luaopen_rock_img) (lua_State *L);

View File

@ -840,12 +840,9 @@ static void metronome_draw(struct screen* display, int state)
int textlen = display->lcdwidth / display->getcharwidth(); int textlen = display->lcdwidth / display->getcharwidth();
ps = part; ps = part;
display->clear_display(); display->clear_display();
#ifdef HAVE_LCD_BITMAP
display->setfont(FONT_SYSFIXED); display->setfont(FONT_SYSFIXED);
#endif
switch(state) switch(state)
{ {
#ifdef HAVE_LCD_BITMAP
case 0: case 0:
if(sound_paused) if(sound_paused)
{ {
@ -876,49 +873,17 @@ static void metronome_draw(struct screen* display, int state)
case 3: case 3:
display->puts((textlen-3)/2,0, "o.O"); display->puts((textlen-3)/2,0, "o.O");
break; break;
#else /* Much simpler on 2-line text display, but same thing. */
case 1:
if((beat+1) % 2 == 0)
beat1 = '/';
else
beat1 = '\\';
break;
case 2:
if((beat+1) % 2 == 0)
beat2 = '/';
else
beat2 = '\\';
break;
case 3:
beat1 = '.';
break;
#endif
} }
if(track_mode) if(track_mode)
{ {
#ifdef HAVE_LCD_BITMAP
/* One line in several. */ /* One line in several. */
rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d" rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d"
, ps->beats_per_bar, ps->base_beat , ps->beats_per_bar, ps->base_beat
, bpm, rb->global_settings->volume ); , bpm, rb->global_settings->volume );
display->puts(0,4, buffer); display->puts(0,4, buffer);
#else
/* Just two short lines with integrated beat indicator. */
rb->snprintf( buffer, sizeof(buffer), "%c %u/%u@%u"
, beat1
, ps->beats_per_bar, ps->base_beat
, bpm );
display->puts(0,0, buffer);
/* Simulator prints format %+02d ... real Rockbox doesn't. */
rb->snprintf( buffer, sizeof(buffer), "%c V%d"
, beat2
, rb->global_settings->volume );
display->puts(0,1, buffer);
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_BITMAP
/* Would it hurt to draw a 3rd line to 2-line display? /* Would it hurt to draw a 3rd line to 2-line display?
I guess there are 3-line displays out there. */ I guess there are 3-line displays out there. */
if(ps->label && rb->strlen(ps->label)) if(ps->label && rb->strlen(ps->label))
@ -935,13 +900,11 @@ static void metronome_draw(struct screen* display, int state)
rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u" rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u"
, part->id+1, parts, bar+1, beat+1 ); , part->id+1, parts, bar+1, beat+1 );
display->puts(0, 5, buffer); display->puts(0, 5, buffer);
#endif /* HAVE_LCD_BITMAP */
} }
else /* track mode */ else /* track mode */
{ {
#ifdef HAVE_LCD_BITMAP
if(display->screen_type==SCREEN_MAIN) if(display->screen_type==SCREEN_MAIN)
{ {
#ifdef MET_SYNC #ifdef MET_SYNC
@ -960,32 +923,18 @@ static void metronome_draw(struct screen* display, int state)
#endif #endif
} }
#endif #endif
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_BITMAP
rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d" rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d"
, bpm, rb->global_settings->volume ); , bpm, rb->global_settings->volume );
display->puts(0,3, buffer); display->puts(0,3, buffer);
#else
rb->snprintf( buffer, sizeof(buffer), "%c BPM: %d "
, beat1, bpm );
display->puts(0,0, buffer);
rb->snprintf( buffer, sizeof(buffer), "%c Vol: %d"
, beat2, rb->global_settings->volume );
display->puts(0,1, buffer);
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_BITMAP
display->hline(0, 111, 12); display->hline(0, 111, 12);
if(sound_paused) display->puts(0,2,"start: hold select"); if(sound_paused) display->puts(0,2,"start: hold select");
else display->puts(0,2,"stop : cancel"); else display->puts(0,2,"stop : cancel");
#endif /* HAVE_LCD_BITMAP */
} /* !track_mode */ } /* !track_mode */
#ifdef HAVE_LCD_BITMAP
display->setfont(FONT_UI); display->setfont(FONT_UI);
#endif /* HAVE_LCD_BITMAP */
display->update(); display->update();
} }

View File

@ -23,7 +23,6 @@
#include "lib/pluginlib_actions.h" #include "lib/pluginlib_actions.h"
#ifdef HAVE_LCD_BITMAP
#define GFX_X (LCD_WIDTH/2-1) #define GFX_X (LCD_WIDTH/2-1)
#define GFX_Y (LCD_HEIGHT/2-1) #define GFX_Y (LCD_HEIGHT/2-1)
#if LCD_WIDTH != LCD_HEIGHT #if LCD_WIDTH != LCD_HEIGHT
@ -33,12 +32,6 @@
#define GFX_WIDTH GFX_X #define GFX_WIDTH GFX_X
#define GFX_HEIGHT (4*GFX_Y/5) #define GFX_HEIGHT (4*GFX_Y/5)
#endif #endif
#else
#define GFX_X 9
#define GFX_Y 6
#define GFX_WIDTH 9
#define GFX_HEIGHT 6
#endif
/* this set the context to use with PLA */ /* this set the context to use with PLA */
static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };

View File

@ -1007,9 +1007,7 @@ static void show_help(void)
rb->lcd_set_background(LCD_BLACK); rb->lcd_set_background(LCD_BLACK);
#endif #endif
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont(FONT_UI); rb->lcd_setfont(FONT_UI);
#endif
static char *help_text[] = { "One-Time Password Manager", "", static char *help_text[] = { "One-Time Password Manager", "",
"Introduction", "", "Introduction", "",

View File

@ -1462,7 +1462,6 @@ static int pegbox_main(struct game_context* pb)
enum plugin_status plugin_start(const void* parameter) enum plugin_status plugin_start(const void* parameter)
{ {
(void)parameter; (void)parameter;
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
@ -1484,7 +1483,6 @@ enum plugin_status plugin_start(const void* parameter)
pegbox_main(&pb); pegbox_main(&pb);
configfile_save(CONFIG_FILE_NAME,config,2,0); configfile_save(CONFIG_FILE_NAME,config,2,0);
rb->lcd_setfont(FONT_UI); rb->lcd_setfont(FONT_UI);
#endif /* HAVE_LCD_BITMAP */
return PLUGIN_OK; return PLUGIN_OK;
} }

View File

@ -411,10 +411,8 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK; return PLUGIN_OK;
} }
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
rb->viewportmanager_theme_enable(i, true, NULL); rb->viewportmanager_theme_enable(i, true, NULL);
#endif
rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL); rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL);
rb->gui_synclist_set_title(&properties_lists, rb->str(its_a_dir ? LANG_PROPERTIES_DIRECTORY_PROPERTIES : LANG_PROPERTIES_FILE_PROPERTIES), NOICON); rb->gui_synclist_set_title(&properties_lists, rb->str(its_a_dir ? LANG_PROPERTIES_DIRECTORY_PROPERTIES : LANG_PROPERTIES_FILE_PROPERTIES), NOICON);
@ -448,10 +446,8 @@ enum plugin_status plugin_start(const void* parameter)
} }
} }
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
rb->viewportmanager_theme_undo(i, false); rb->viewportmanager_theme_undo(i, false);
#endif
return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK; return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK;
} }

View File

@ -532,8 +532,6 @@
#define BOARD_WIDTH 10 #define BOARD_WIDTH 10
#ifdef HAVE_LCD_BITMAP
#define BOARD_HEIGHT 20 #define BOARD_HEIGHT 20
#if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480)
@ -757,6 +755,9 @@
#define LEVEL_X 58 #define LEVEL_X 58
#define LINES_Y 62 #define LINES_Y 62
#define LINES_X 58 #define LINES_X 58
#else
#error "lcd screen size not defined!"
#endif #endif
#ifndef LEVEL_X #ifndef LEVEL_X
@ -769,10 +770,6 @@
extern const fb_data rockblox_background[]; extern const fb_data rockblox_background[];
#else
#error "lcd screen size not defined!"
#endif
#ifndef HIGHSCORE_SPACE #ifndef HIGHSCORE_SPACE
#define HIGHSCORE_SPACE " " #define HIGHSCORE_SPACE " "
#endif #endif
@ -974,7 +971,6 @@ static void init_board (void)
/* show the score, level and lines */ /* show the score, level and lines */
static void show_details (void) static void show_details (void)
{ {
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
rb->lcd_set_foreground (LCD_BLACK); rb->lcd_set_foreground (LCD_BLACK);
rb->lcd_set_background (LCD_WHITE); rb->lcd_set_background (LCD_WHITE);
@ -982,7 +978,6 @@ static void show_details (void)
rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score);
rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level);
rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines);
#endif
} }
#ifdef HIGH_SCORE_Y #ifdef HIGH_SCORE_Y
@ -1050,9 +1045,7 @@ static void init_rockblox (bool resume)
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec); tm->tm_hour, tm->tm_min, tm->tm_sec);
#ifdef HAVE_LCD_BITMAP
rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
#endif
if (!resume) if (!resume)
{ {
rockblox_status.level = 1; rockblox_status.level = 1;
@ -1149,7 +1142,6 @@ static void refresh_board (void)
for (j = 0; j < BOARD_HEIGHT; j++) { for (j = 0; j < BOARD_HEIGHT; j++) {
block = rockblox_status.board[j][i]; block = rockblox_status.board[j][i];
if (block != EMPTY_BLOCK) { if (block != EMPTY_BLOCK) {
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
/* middle drawing */ /* middle drawing */
rb->lcd_set_foreground (figures[block].color[1]); rb->lcd_set_foreground (figures[block].color[1]);
@ -1177,7 +1169,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1,
BOARD_X + (i + 1) * BLOCK_WIDTH - 1, BOARD_X + (i + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1);
#endif
} }
} }
@ -1194,7 +1185,6 @@ static void refresh_board (void)
+ rockblox_status.cx; + rockblox_status.cx;
y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) y = getRelativeY (rockblox_status.cf, i, rockblox_status.co)
+ ghost_y; + ghost_y;
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
/* middle drawing */ /* middle drawing */
rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]); rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]);
@ -1221,7 +1211,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
BOARD_X + (x + 1) * BLOCK_WIDTH - 1, BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
#endif
} }
/* draw current piece */ /* draw current piece */
@ -1231,7 +1220,6 @@ static void refresh_board (void)
+ rockblox_status.cx; + rockblox_status.cx;
y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) y = getRelativeY (rockblox_status.cf, i, rockblox_status.co)
+ rockblox_status.cy; + rockblox_status.cy;
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
/* middle drawing */ /* middle drawing */
rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]); rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]);
@ -1258,7 +1246,6 @@ static void refresh_board (void)
rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
BOARD_X + (x + 1) * BLOCK_WIDTH - 1, BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
#endif
} }
mylcd_update (); mylcd_update ();
@ -1301,7 +1288,6 @@ static void draw_next_block (void)
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
rx = getRelativeX (rockblox_status.nf, i, 0) + 2; rx = getRelativeX (rockblox_status.nf, i, 0) + 2;
ry = getRelativeY (rockblox_status.nf, i, 0) + 2; ry = getRelativeY (rockblox_status.nf, i, 0) + 2;
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */ rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */
#endif #endif
@ -1326,7 +1312,6 @@ static void draw_next_block (void)
rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1,
PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1,
PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1);
#endif
} }
} }
@ -1428,18 +1413,14 @@ static bool rockblox_help(void)
LAST_STYLE_ITEM LAST_STYLE_ITEM
}; };
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont(FONT_UI); rb->lcd_setfont(FONT_UI);
#endif
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
rb->lcd_set_background(LCD_BLACK); rb->lcd_set_background(LCD_BLACK);
rb->lcd_set_foreground(LCD_WHITE); rb->lcd_set_foreground(LCD_WHITE);
#endif #endif
if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true)) if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true))
return true; return true;
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
#endif
return false; return false;
} }
@ -1699,15 +1680,7 @@ enum plugin_status plugin_start (const void *parameter)
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
#endif #endif
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont (FONT_SYSFIXED); rb->lcd_setfont (FONT_SYSFIXED);
#else
if (!pgfx_init(4, 2))
{
rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK;
}
#endif
/* Turn off backlight timeout */ /* Turn off backlight timeout */
backlight_ignore_timeout(); backlight_ignore_timeout();

View File

@ -125,11 +125,7 @@ static bool search_init(const char* file){
fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666); fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666);
if (fdw < 0) { if (fdw < 0) {
#ifdef HAVE_LCD_BITMAP
rb->splash(HZ, "Failed to create result file!"); rb->splash(HZ, "Failed to create result file!");
#else
rb->splash(HZ, "File creation failed");
#endif
rb->close(fd); rb->close(fd);
return false; return false;
} }

View File

@ -25,20 +25,12 @@
#include <autoconf.h> #include <autoconf.h>
extern int w, h, y; extern int w, h, y;
#ifdef HAVE_LCD_BITMAP
#define PUTS(str) do { \ #define PUTS(str) do { \
rb->lcd_putsxy(1, y, str); \ rb->lcd_putsxy(1, y, str); \
rb->lcd_getstringsize(str, &w, &h); \ rb->lcd_getstringsize(str, &w, &h); \
y += h + 1; \ y += h + 1; \
} while (0); \ } while (0); \
rb->lcd_update() rb->lcd_update()
#else
#define PUTS(str) do { \
rb->lcd_puts(0, y, str); \
y = (y + 1) % 2; \
} while (0); \
rb->lcd_update()
#endif
void *my_malloc(size_t size); void *my_malloc(size_t size);
void setmallocpos(void *pointer); void setmallocpos(void *pointer);

View File

@ -223,20 +223,16 @@ enum plugin_status plugin_start(const void* void_parameter)
return PLUGIN_OK; return PLUGIN_OK;
} }
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
rb->viewportmanager_theme_enable(i, true, NULL); rb->viewportmanager_theme_enable(i, true, NULL);
#endif
do { do {
/* Display a menu to choose between the entries */ /* Display a menu to choose between the entries */
leave_loop = list_sc(); leave_loop = list_sc();
} while (!leave_loop); } while (!leave_loop);
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
rb->viewportmanager_theme_undo(i, false); rb->viewportmanager_theme_undo(i, false);
#endif
return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK; return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
} }

View File

@ -22,15 +22,9 @@
#include "lib/mylcd.h" #include "lib/mylcd.h"
#include "lib/pluginlib_actions.h" #include "lib/pluginlib_actions.h"
#ifdef HAVE_LCD_BITMAP
#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) #define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
#define SNOW_HEIGHT LCD_HEIGHT #define SNOW_HEIGHT LCD_HEIGHT
#define SNOW_WIDTH LCD_WIDTH #define SNOW_WIDTH LCD_WIDTH
#else
#define NUM_PARTICLES 10
#define SNOW_HEIGHT 14
#define SNOW_WIDTH 20
#endif
static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
@ -40,7 +34,6 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
static short particles[NUM_PARTICLES][2]; static short particles[NUM_PARTICLES][2];
#ifdef HAVE_LCD_BITMAP
#if LCD_WIDTH >= 160 #if LCD_WIDTH >= 160
#define FLAKE_WIDTH 5 #define FLAKE_WIDTH 5
static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
@ -48,7 +41,6 @@ static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
#define FLAKE_WIDTH 3 #define FLAKE_WIDTH 3
static const unsigned char flake[] = {0x02,0x07,0x02}; static const unsigned char flake[] = {0x02,0x07,0x02};
#endif #endif
#endif
static bool particle_exists(int particle) static bool particle_exists(int particle)
{ {
@ -83,12 +75,8 @@ static void snow_move(void)
for (i=0; i<NUM_PARTICLES; i++) { for (i=0; i<NUM_PARTICLES; i++) {
if (particle_exists(i)) { if (particle_exists(i)) {
mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
#ifdef HAVE_LCD_BITMAP
rb->lcd_fillrect(particles[i][0],particles[i][1], rb->lcd_fillrect(particles[i][0],particles[i][1],
FLAKE_WIDTH,FLAKE_WIDTH); FLAKE_WIDTH,FLAKE_WIDTH);
#else
pgfx_drawpixel(particles[i][0],particles[i][1]);
#endif
mylcd_set_drawmode(DRMODE_SOLID); mylcd_set_drawmode(DRMODE_SOLID);
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
if (particles[i][0] <= LCD_REMOTE_WIDTH if (particles[i][0] <= LCD_REMOTE_WIDTH
@ -116,12 +104,8 @@ static void snow_move(void)
break; break;
} }
if (particle_exists(i)) if (particle_exists(i))
#ifdef HAVE_LCD_BITMAP
rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1],
FLAKE_WIDTH,FLAKE_WIDTH); FLAKE_WIDTH,FLAKE_WIDTH);
#else
pgfx_drawpixel(particles[i][0],particles[i][1]);
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
if (particles[i][0] <= LCD_REMOTE_WIDTH if (particles[i][0] <= LCD_REMOTE_WIDTH
&& particles[i][1] <= LCD_REMOTE_HEIGHT) { && particles[i][1] <= LCD_REMOTE_HEIGHT) {

View File

@ -56,7 +56,6 @@ static void update_screen(void)
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
#endif #endif
#ifdef HAVE_LCD_BITMAP
rb->snprintf(buf, sizeof(buf), "Total Files: %d", files); rb->snprintf(buf, sizeof(buf), "Total Files: %d", files);
prn(buf,0); prn(buf,0);
rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles); rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles);
@ -71,12 +70,6 @@ static void update_screen(void)
prn(buf,5); prn(buf,5);
rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir); rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir);
prn(buf,6); prn(buf,6);
#else
rb->snprintf(buf, sizeof(buf), "Files:%5d", files);
prn(buf,0);
rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs);
prn(buf,1);
#endif
rb->lcd_update(); rb->lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD

View File

@ -23,11 +23,7 @@
#ifdef HAVE_LCD_BITMAP
#define TIMER_Y 1 #define TIMER_Y 1
#else
#define TIMER_Y 0
#endif
#define LAP_Y TIMER_Y+1 #define LAP_Y TIMER_Y+1
#define MAX_LAPS 64 #define MAX_LAPS 64
@ -481,14 +477,10 @@ enum plugin_status plugin_start(const void* parameter)
(void)parameter; (void)parameter;
#ifdef HAVE_LCD_BITMAP
int h; int h;
rb->lcd_setfont(FONT_UI); rb->lcd_setfont(FONT_UI);
rb->lcd_getstringsize("M", NULL, &h); rb->lcd_getstringsize("M", NULL, &h);
lines = (LCD_HEIGHT / h) - (LAP_Y); lines = (LCD_HEIGHT / h) - (LAP_Y);
#else
lines = 1;
#endif
load_stopwatch(); load_stopwatch();

View File

@ -206,10 +206,8 @@ enum plugin_status plugin_start(const void* parameter)
#endif #endif
int count = 0; int count = 0;
#ifdef HAVE_LCD_BITMAP
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
#endif
rb->screens[0]->clear_display(); rb->screens[0]->clear_display();
TEST_MEM_PRINTF("patience, may take some seconds..."); TEST_MEM_PRINTF("patience, may take some seconds...");
rb->screens[0]->update(); rb->screens[0]->update();

View File

@ -21,10 +21,6 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
#define BGCOLOR_1 LCD_RGBPACK(255,255,0) #define BGCOLOR_1 LCD_RGBPACK(255,255,0)
#define BGCOLOR_2 LCD_RGBPACK(0,255,0) #define BGCOLOR_2 LCD_RGBPACK(0,255,0)
@ -207,61 +203,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK; return PLUGIN_OK;
} }
#else
/* Charcell version of plugin */
static struct viewport vp0 =
{
.x = 0,
.y = 0,
.width = 5,
.height = 1,
};
static struct viewport vp1 =
{
.x = 6,
.y = 0,
.width = 5,
.height = 1,
};
static struct viewport vp2 =
{
.x = 0,
.y = 1,
.width = LCD_WIDTH,
.height = 1,
};
enum plugin_status plugin_start(const void* parameter)
{
(void)parameter;
rb->screens[SCREEN_MAIN]->set_viewport(&vp0);
rb->screens[SCREEN_MAIN]->clear_viewport();
rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Rockbox");
rb->screens[SCREEN_MAIN]->set_viewport(&vp1);
rb->screens[SCREEN_MAIN]->clear_viewport();
rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Viewports");
rb->screens[SCREEN_MAIN]->set_viewport(&vp2);
rb->screens[SCREEN_MAIN]->clear_viewport();
rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Demonstration");
rb->screens[SCREEN_MAIN]->update();
rb->button_get(true);
/* Restore the default viewport */
rb->screens[SCREEN_MAIN]->set_viewport(NULL);
return PLUGIN_OK;
}
#endif /* !HAVE_LCD_BITMAP */

View File

@ -61,10 +61,8 @@ enum plugin_status plugin_start(const void* file)
atexit(tv_exit); atexit(tv_exit);
while (!done) { while (!done) {
#ifdef HAVE_LCD_BITMAP
if (preferences->statusbar) if (preferences->statusbar)
rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL); rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL);
#endif
if (display_update) if (display_update)
tv_draw(); tv_draw();

View File

@ -100,9 +100,7 @@ void tv_scroll_up(unsigned mode)
(mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE))
{ {
offset_page--; offset_page--;
#ifdef HAVE_LCD_BITMAP
offset_line = (preferences->overlap_page_mode)? 1:0; offset_line = (preferences->overlap_page_mode)? 1:0;
#endif
} }
tv_move_screen(offset_page, offset_line, SEEK_CUR); tv_move_screen(offset_page, offset_line, SEEK_CUR);
scrolled = true; scrolled = true;
@ -117,9 +115,7 @@ void tv_scroll_down(unsigned mode)
(mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE))
{ {
offset_page++; offset_page++;
#ifdef HAVE_LCD_BITMAP
offset_line = (preferences->overlap_page_mode)? -1:0; offset_line = (preferences->overlap_page_mode)? -1:0;
#endif
} }
tv_move_screen(offset_page, offset_line, SEEK_CUR); tv_move_screen(offset_page, offset_line, SEEK_CUR);
scrolled = true; scrolled = true;

View File

@ -182,11 +182,7 @@ static const char* get_bookmark_name(int selected, void * data,
(void)data; (void)data;
struct tv_bookmark_info *bookmark = &bookmarks[selected]; struct tv_bookmark_info *bookmark = &bookmarks[selected];
rb->snprintf(buffer, buffer_len, rb->snprintf(buffer, buffer_len,
#ifdef HAVE_LCD_BITMAP
"%cPage: %d Line: %d", "%cPage: %d Line: %d",
#else
"%cP:%d L:%d",
#endif
(bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ', (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ',
bookmark->pos.page + 1, bookmark->pos.line + 1); bookmark->pos.page + 1, bookmark->pos.line + 1);
return buffer; return buffer;

Some files were not shown because too many files have changed in this diff Show More