diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 10:31:31 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 658026e6267277b27d297c481728f74d160a8481 (patch) | |
tree | 915a9d2bb48469bdd5b9127dc19a61f230721a6c /apps/plugins | |
parent | 8cb555460ff79e636a7907fb2589e16db98c8600 (diff) | |
download | rockbox-658026e6267277b27d297c481728f74d160a8481.tar.gz rockbox-658026e6267277b27d297c481728f74d160a8481.zip |
[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
Diffstat (limited to 'apps/plugins')
54 files changed, 27 insertions, 702 deletions
diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c index 5dd5a7e99f..08be294d88 100644 --- a/apps/plugins/2048.c +++ b/apps/plugins/2048.c @@ -41,10 +41,8 @@ #include "lib/pluginlib_actions.h" #include "lib/pluginlib_exit.h" -#ifdef HAVE_LCD_BITMAP #include "pluginbitmaps/_2048_background.h" #include "pluginbitmaps/_2048_tiles.h" -#endif /* some constants */ diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 96ad535863..5d24bee8f6 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -79,7 +79,7 @@ wolf3d.c #endif #endif -#if PLUGIN_BUFFER_SIZE <= 0x20000 && defined(HAVE_LCD_BITMAP) +#if PLUGIN_BUFFER_SIZE <= 0x20000 #if CONFIG_KEYPAD != SANSA_M200_PAD \ && CONFIG_KEYPAD != HM60X_PAD @@ -92,7 +92,7 @@ chessbox.c goban.c pictureflow.c -#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */ +#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 */ #if defined(IRIVER_H100_SERIES) iriver_flash.c @@ -106,8 +106,6 @@ crypt_firmware.c metronome.c -#ifdef HAVE_LCD_BITMAP /* Not for the Archos Player */ - 2048.c /* Lua needs at least 160 KB to work in */ @@ -173,8 +171,6 @@ rockpaint.c rocklife.c -#endif /* HAVE_LCD_BITMAP */ - #if LCD_DEPTH > 1 /* non-mono bitmap targets */ matrix.c @@ -198,7 +194,6 @@ test_codec.c test_core_jpeg.c #endif test_disk.c -#ifdef HAVE_LCD_BITMAP test_fps.c test_gfx.c #if LCD_DEPTH < 4 && !defined(SIMULATOR) @@ -208,11 +203,8 @@ test_scanrate.c test_grey.c test_greylib_bitmap_scale.c #endif -#endif test_mem.c -#ifdef HAVE_LCD_BITMAP test_mem_jpeg.c -#endif #ifdef HAVE_LCD_COLOR test_resize.c #endif diff --git a/apps/plugins/SOURCES.app_build b/apps/plugins/SOURCES.app_build index 8cfc5881b2..ac9f01a896 100644 --- a/apps/plugins/SOURCES.app_build +++ b/apps/plugins/SOURCES.app_build @@ -28,7 +28,6 @@ test_codec.c test_core_jpeg.c #endif test_disk.c -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH < 4 && !defined(SIMULATOR) test_scanrate.c #endif @@ -36,11 +35,8 @@ test_scanrate.c test_grey.c test_greylib_bitmap_scale.c #endif -#endif test_mem.c -#ifdef HAVE_LCD_BITMAP test_mem_jpeg.c -#endif #ifdef HAVE_LCD_COLOR test_resize.c #endif diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 2c8e43c837..8479e4b3dd 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -8,9 +8,6 @@ text_viewer clock #endif -/* For all targets with a bitmap display */ -#ifdef HAVE_LCD_BITMAP - /* color horizontal-stride LCDs */ #if defined(HAVE_LCD_COLOR) && \ (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) @@ -55,8 +52,6 @@ zxbox #endif #endif -#endif /* HAVE_LCD_BITMAP */ - /* For all big enough colour screens, iriver H1x0 and iAudio M5 */ #if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \ diff --git a/apps/plugins/SUBDIRS.app_build b/apps/plugins/SUBDIRS.app_build index 95b5e64639..1fc283d6c4 100644 --- a/apps/plugins/SUBDIRS.app_build +++ b/apps/plugins/SUBDIRS.app_build @@ -8,7 +8,6 @@ */ lua lua_scripts -#ifdef HAVE_LCD_BITMAP #if PLUGIN_BUFFER_SIZE > 0x20000 fft @@ -20,8 +19,6 @@ reversi pictureflow #endif -#endif /* HAVE_LCD_BITMAP */ - /* For all the swcodec targets */ #if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ mikmod diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 37046af05b..3f9ecbc2b4 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -329,9 +329,7 @@ static bool exit_tsr(bool reenter) rb->lcd_clear_display(); 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"); -#ifdef HAVE_LCD_BITMAP rb->lcd_puts_scroll(0, 2, "Anything else will resume"); -#endif if(rb->global_settings->talk_menu) rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); rb->lcd_update(); @@ -488,11 +486,7 @@ static void thread(void) exit = true; break; case EV_EXIT: -#ifdef HAVE_LCD_BITMAP rb->splash(HZ, "Exiting battery_bench..."); -#else - rb->splash(HZ, "bench exit"); -#endif exit_reason = "plugin exit"; exit = true; break; @@ -516,7 +510,6 @@ static void thread(void) } -#ifdef HAVE_LCD_BITMAP 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) @@ -525,7 +518,6 @@ static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, in rb->lcd_getstringsize(str, &strwdt, &strhgt); putsxy((lcd_width - strwdt)/2, line*(strhgt), str); } -#endif enum plugin_status plugin_start(const void* parameter) { @@ -533,27 +525,20 @@ enum plugin_status plugin_start(const void* parameter) int button, fd; bool on = false; start_tick = *rb->current_tick; -#ifdef HAVE_LCD_BITMAP int i; const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; -#endif rb->lcd_clear_display(); -#ifdef HAVE_LCD_BITMAP rb->lcd_clear_display(); rb->lcd_setfont(FONT_SYSFIXED); for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) 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) rb->talk_id(VOICE_BAT_BENCH_KEYS, true); rb->lcd_update(); - + #ifdef HAVE_REMOTE_LCD rb->lcd_remote_clear_display(); put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES index ad8b951e45..e6a24b2bc5 100644 --- a/apps/plugins/bitmaps/mono/SOURCES +++ b/apps/plugins/bitmaps/mono/SOURCES @@ -1,5 +1,3 @@ -#ifdef HAVE_LCD_BITMAP - /* Bubbles */ #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) bubbles_bubble.112x64x1.bmp @@ -59,7 +57,6 @@ mpegplayer_status_icons_16x16x1.bmp superdom_boarditems.160x128x1.bmp #endif -#endif /* HAVE_LCD_BITMAP */ #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) osx.dummy.bmp #endif diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 22f82800a7..48eb18dfa4 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -1,5 +1,3 @@ -#ifdef HAVE_LCD_BITMAP - /* 2048 */ #define MIN(x,y) ((x<y)?x:y) @@ -1004,5 +1002,3 @@ resistor.128x128x16.bmp #else resistor.68x20x16.bmp #endif - -#endif /* HAVE_LCD_BITMAP */ diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 6b2d436679..fea966213d 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -448,11 +448,7 @@ /* leave first line blank on bitmap display, for pause icon */ -#ifdef HAVE_LCD_BITMAP #define FIRST_LINE 1 -#else -#define FIRST_LINE 0 -#endif #define MAX_PLAYERS 10 @@ -597,7 +593,6 @@ enum plugin_status plugin_start(const void* parameter) return PLUGIN_OK; } -#ifdef HAVE_LCD_BITMAP static void show_pause_mode(bool enabled) { 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); } } -#else -#define show_pause_mode(enabled) rb->lcd_icon(ICON_PAUSE, enabled) -#endif static int run_timer(int nr) { diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 29d2ba2fc1..d2d831f81b 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -451,9 +451,6 @@ #endif #endif - -#ifdef HAVE_LCD_BITMAP - #define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16) static int x_off = LCD_WIDTH/2; static int y_off = LCD_HEIGHT/2; @@ -486,16 +483,6 @@ static struct my_lcd *mylcd = &greyfuncs; #define ASPECT 256 /* = 1.00 */ #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 { long x, y, z; }; @@ -771,7 +758,6 @@ enum plugin_status plugin_start(const void* parameter) (void)(parameter); -#ifdef HAVE_LCD_BITMAP #if defined(USEGSLIB) gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, @@ -794,7 +780,6 @@ enum plugin_status plugin_start(const void* parameter) grey_setfont(FONT_SYSFIXED); #endif rb->lcd_setfont(FONT_SYSFIXED); -#endif atexit(cleanup); while(!quit) @@ -808,7 +793,6 @@ enum plugin_status plugin_start(const void* parameter) redraw = false; } -#ifdef HAVE_LCD_BITMAP if (t_disp > 0) { char buffer[30]; @@ -821,24 +805,6 @@ enum plugin_status plugin_start(const void* parameter) if (t_disp == 0) 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 if (mode_switch) { diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index 013e7a37bd..4f2bf6e992 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c @@ -343,10 +343,8 @@ static void tidy_lcd_status(const char *name) rb->lcd_clear_display(); rb->lcd_puts(0, 0, "Working ..."); rb->lcd_puts(0, 1, name); -#ifdef HAVE_LCD_BITMAP rb->lcd_putsf(0, 2, "Cleaned up %d items", run_stats.files_removed + run_stats.dirs_removed); -#endif rb->lcd_update(); } diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 294bee8f5b..91d83e9291 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -534,8 +534,6 @@ static int spots[20]; static int toggle[20]; static int cursor_pos, moves; -#ifdef HAVE_LCD_BITMAP - #include "pluginbitmaps/flipit_cursor.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 ); } -#endif /* LCD */ - /* clear the cursor where it is */ static inline void clear_cursor(void) { @@ -829,7 +825,6 @@ enum plugin_status plugin_start(const void* parameter) rb->splash(HZ, "FlipIt!"); -#ifdef HAVE_LCD_BITMAP /* print instructions */ rb->lcd_clear_display(); rb->lcd_setfont(FONT_SYSFIXED); @@ -909,7 +904,7 @@ enum plugin_status plugin_start(const void* parameter) #endif rb->lcd_update(); -#endif + rb->button_get_w_tmo(HZ*3); rb->lcd_clear_display(); diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index 70507d989c..c44b1f77c0 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c @@ -24,7 +24,7 @@ #include "plugin.h" #include "lib/helper.h" -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) +#if (LCD_DEPTH < 4) #include "lib/grey.h" @@ -372,5 +372,5 @@ enum plugin_status plugin_start(const void* parameter) return main(); } -#endif /* #ifdef HAVE_LCD_BITMAP */ +#endif /* #if LCD_DEPTH < 4 */ diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 26f8f47e8f..78f74568ca 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -30,7 +30,6 @@ const struct button_mapping* plugin_contexts[]={pla_main_ctx}; #define NB_PICTURES 9 #define NB_SLOTS 3 -#ifdef HAVE_LCD_BITMAP #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) #if NB_SCREENS==1 #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT @@ -55,7 +54,6 @@ const struct picture jackpot_pictures[]={ }; #define SLEEP_TIME (HZ/200) -#endif /* HAVE_LCD_BITMAP */ struct jackpot { diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index effc076eb7..545a754500 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES @@ -13,7 +13,7 @@ display_text.c strncpy.c stdio_compat.c -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) +#if (LCD_DEPTH < 4) grey_core.c grey_draw.c grey_parm.c @@ -23,7 +23,7 @@ grey_scroll.c grey_coldfire.S #endif -#endif /* HAVE_LCD_BITMAP && LCD_DEPTH < 4 */ +#endif /* LCD_DEPTH < 4 */ #if (CONFIG_PLATFORM & PLATFORM_NATIVE) overlay.c @@ -33,8 +33,6 @@ overlay.c profile_plugin.c #endif -#ifdef HAVE_LCD_BITMAP - #ifdef CPU_ARM pluginlib_jpeg_idct_arm.S #endif @@ -65,8 +63,6 @@ pluginlib_albumart.c kbd_helper.c -#endif /* HAVE_LCD_BITMAP */ - #ifdef HAVE_TOUCHSCREEN pluginlib_touchscreen.c #endif diff --git a/apps/plugins/lib/checkbox.h b/apps/plugins/lib/checkbox.h index 81a26e15ba..d4318f2305 100644 --- a/apps/plugins/lib/checkbox.h +++ b/apps/plugins/lib/checkbox.h @@ -21,11 +21,7 @@ #include "plugin.h" -#ifdef HAVE_LCD_BITMAP - /* * Print a checkbox */ void checkbox(int x, int y, int width, int height, bool checked); - -#endif diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c index 90712a649f..5f37b736df 100644 --- a/apps/plugins/lib/display_text.c +++ b/apps/plugins/lib/display_text.c @@ -39,9 +39,7 @@ static bool wait_key_press(void) bool display_text(unsigned short words, char** text, struct style_text* style, struct viewport* vp_text, bool wait_key) { -#ifdef HAVE_LCD_BITMAP int prev_drawmode; -#endif #ifdef HAVE_LCD_COLOR int standard_fgcolor; #endif @@ -55,10 +53,8 @@ bool display_text(unsigned short words, char** text, struct style_text* style, vp_height = vp_text->height; } rb->screens[SCREEN_MAIN]->set_viewport(vp_text); -#ifdef HAVE_LCD_BITMAP prev_drawmode = rb->lcd_get_drawmode(); rb->lcd_set_drawmode(DRMODE_SOLID); -#endif #ifdef HAVE_LCD_COLOR standard_fgcolor = rb->lcd_get_foreground(); #endif @@ -121,11 +117,9 @@ bool display_text(unsigned short words, char** text, struct style_text* style, #endif rb->lcd_putsxy(x, y, text[i]); /* underline the word */ -#ifdef HAVE_LCD_BITMAP if (style[style_index].flags&TEXT_UNDERLINE) { rb->lcd_hline(x, x+width, y+height-1); } -#endif #ifdef HAVE_LCD_COLOR rb->lcd_set_foreground(standard_fgcolor); #endif @@ -134,9 +128,7 @@ bool display_text(unsigned short words, char** text, struct style_text* style, x += width + space_w; } rb->screens[SCREEN_MAIN]->update_viewport(); -#ifdef HAVE_LCD_BITMAP rb->lcd_set_drawmode(prev_drawmode); -#endif if (wait_key) { if (wait_key_press()) diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index 63e896bfb6..0e064f46b2 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h @@ -29,7 +29,7 @@ #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. */ #define GREY_BRIGHTNESS(y) (y) @@ -201,5 +201,5 @@ struct _grey_info /* Global variable, defined in the plugin */ extern struct _grey_info _grey_info; -#endif /* HAVE_LCD_BITMAP && (LCD_DEPTH < 4) */ +#endif /* (LCD_DEPTH < 4) */ #endif /* __GREY_H__ */ diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index ff7a166222..3aae955bfc 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c @@ -119,7 +119,6 @@ bool highscore_would_update(int score, struct highscore *scores, return (num_scores > 0) && (score > scores[num_scores-1].score); } -#ifdef HAVE_LCD_BITMAP #define MARGIN 5 void highscore_show(int position, struct highscore *scores, int num_scores, bool show_level) @@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores, rb->lcd_set_foreground(fgcolor); #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 */ diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h index a543d60890..47bdec9e2c 100644 --- a/apps/plugins/lib/mylcd.h +++ b/apps/plugins/lib/mylcd.h @@ -35,7 +35,7 @@ * lib/grey.h should be included before including this * 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_(fn) grey_##fn #define myxlcd_(fn) grey_##fn @@ -51,7 +51,8 @@ #define MYLCD_DEFAULT_FG GREY_BLACK #define MYLCD_DEFAULT_BG GREY_WHITE -#elif defined (HAVE_LCD_BITMAP) +#else + #define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */ #define mylcd_(fn) rb->lcd_##fn #define myxlcd_(fn) xlcd_##fn @@ -67,18 +68,11 @@ #define MYLCD_DEFAULT_FG LCD_DEFAULT_FG #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 */ /* Update functions */ #define mylcd_update mylcd_(update) -#ifdef HAVE_LCD_BITMAP #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 * 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_get_drawmode mylcd_(get_drawmode) -#ifdef HAVE_LCD_BITMAP #define mylcd_set_foreground mylcd_(set_foreground) #define mylcd_get_foreground mylcd_(get_foreground) #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_setfont mylcd_(setfont) #define mylcd_getstringsize mylcd_(getstringsize) -#endif /* HAVE_LCD_BITMAP */ /* Whole 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 */ #define mylcd_fillrect mylcd_(fillrect) -#ifdef HAVE_LCD_BITMAP #define mylcd_filltriangle myxlcd_(filltriangle) -#endif /* HAVE_LCD_BITMAP */ /* Bitmaps */ #define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part) #define mylcd_mono_bitmap mylcd_(mono_bitmap) -#ifdef HAVE_LCD_BITMAP #define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part) #define mylcd_gray_bitmap myxlcd_(gray_bitmap) #if 0 /* possible, but not implemented in greylib */ #define mylcd_color_bitmap_part myxlcd_(color_bitmap_part) #define mylcd_color_bitmap myxlcd_(color_bitmap) #endif -#endif /* HAVE_LCD_BITMAP */ /* Bitmaps - unbuffered */ -#ifdef HAVE_LCD_BITMAP #define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part) #define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap) -#endif /* HAVE_LCD_BITMAP */ /* Text */ /* lcd_putsxyofs is static'ed in the core for now on color */ -#ifdef HAVE_LCD_BITMAP #define mylcd_putsxyofs mylcd_(putsxyofs) #define mylcd_putsxy mylcd_(putsxy) -#endif /* HAVE_LCD_BITMAP */ /* Scrolling */ -#ifdef HAVE_LCD_BITMAP #define mylcd_scroll_left myxlcd_(scroll_left) #define mylcd_scroll_right myxlcd_(scroll_right) #define mylcd_scroll_up myxlcd_(scroll_up) #define mylcd_scroll_down myxlcd_(scroll_down) -#endif /* HAVE_LCD_BITMAP */ /* Scrolling - unbuffered */ -#ifdef HAVE_LCD_BITMAP #define mylcd_ub_scroll_left myxlcd_ub_(scroll_left) #define mylcd_ub_scroll_right myxlcd_ub_(scroll_right) #define mylcd_ub_scroll_up myxlcd_ub_(scroll_up) #define mylcd_ub_scroll_down myxlcd_ub_(scroll_down) -#endif /* HAVE_LCD_BITMAP */ /* Viewports */ -#ifdef HAVE_LCD_BITMAP #define mylcd_clear_viewport mylcd_(clear_viewport) #define mylcd_set_viewport mylcd_(set_viewport) #define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen) -#endif /* HAVE_LCD_BITMAP */ #endif /* MYLCD_H */ diff --git a/apps/plugins/lib/pluginlib_bmp.h b/apps/plugins/lib/pluginlib_bmp.h index be0cfd9091..f0540988de 100644 --- a/apps/plugins/lib/pluginlib_bmp.h +++ b/apps/plugins/lib/pluginlib_bmp.h @@ -37,7 +37,7 @@ int save_bmp_file( char* filename, struct bitmap *bm ); */ 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. */ diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c index 4c05ee68c5..0b554e054d 100644 --- a/apps/plugins/lib/simple_viewer.c +++ b/apps/plugins/lib/simple_viewer.c @@ -27,10 +27,8 @@ struct view_info { -#ifdef HAVE_LCD_BITMAP struct font* pf; struct viewport scrollbar_vp; /* viewport for scrollbar */ -#endif struct viewport vp; const char *title; const char *text; /* displayed text */ @@ -89,15 +87,12 @@ static void calc_line_count(struct view_info *info) { const char *ptr = info->text; int i = 0; -#ifdef HAVE_LCD_BITMAP bool scrollbar = false; -#endif while (*ptr) { ptr = get_next_line(ptr, info); i++; -#ifdef HAVE_LCD_BITMAP if (!scrollbar && i > info->display_lines) { ptr = info->text; @@ -111,7 +106,6 @@ static void calc_line_count(struct view_info *info) info->scrollbar_vp.x = info->vp.width; scrollbar = true; } -#endif } info->line_count = i; } @@ -144,12 +138,8 @@ static int init_view(struct view_info *info, const char *title, const char *text) { rb->viewport_set_defaults(&info->vp, SCREEN_MAIN); -#ifdef HAVE_LCD_BITMAP info->pf = rb->font_get(FONT_UI); info->display_lines = info->vp.height / info->pf->height; -#else - info->display_lines = info->vp.height; -#endif info->title = title; info->text = text; @@ -157,7 +147,6 @@ static int init_view(struct view_info *info, info->line = 0; info->start = 0; -#ifdef HAVE_LCD_BITMAP /* no title for small screens. */ 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.height -= info->pf->height; } -#endif calc_line_count(info); return 0; @@ -177,11 +165,7 @@ static int init_view(struct view_info *info, static void draw_text(struct view_info *info) { -#ifdef HAVE_LCD_BITMAP #define OUTPUT_SIZE LCD_WIDTH+1 -#else -#define OUTPUT_SIZE LCD_WIDTH*3+1 -#endif static char output[OUTPUT_SIZE]; const char *text, *ptr; int max_show, line; @@ -190,14 +174,12 @@ static void draw_text(struct view_info *info) /* clear screen */ display->clear_display(); -#ifdef HAVE_LCD_BITMAP /* display title. */ if(info->title) { display->set_viewport(NULL); display->puts(0, 0, info->title); } -#endif max_show = MIN(info->line_count - info->line, info->display_lines); text = info->text + info->start; @@ -215,7 +197,6 @@ static void draw_text(struct view_info *info) display->puts(0, line, output); text = ptr; } -#ifdef HAVE_LCD_BITMAP if (info->line_count > info->display_lines) { 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, VERTICAL); } -#endif display->set_viewport(NULL); display->update(); diff --git a/apps/plugins/lib/xlcd.h b/apps/plugins/lib/xlcd.h index abd5cff62b..963c7c4831 100644 --- a/apps/plugins/lib/xlcd.h +++ b/apps/plugins/lib/xlcd.h @@ -26,8 +26,6 @@ #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_screen(struct screen* display, 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_down(int count); -#endif /* HAVE_LCD_BITMAP */ #endif /* __XLCD_H__ */ diff --git a/apps/plugins/lib/xlcd_core.c b/apps/plugins/lib/xlcd_core.c index 87e73b5485..47875a51a9 100644 --- a/apps/plugins/lib/xlcd_core.c +++ b/apps/plugins/lib/xlcd_core.c @@ -24,8 +24,5 @@ #include "plugin.h" -#ifdef HAVE_LCD_BITMAP #include "xlcd.h" -#endif /* HAVE_LCD_BITMAP */ - diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c index 311782c21f..25ef7518a1 100644 --- a/apps/plugins/lib/xlcd_draw.c +++ b/apps/plugins/lib/xlcd_draw.c @@ -24,7 +24,6 @@ #include "plugin.h" -#ifdef HAVE_LCD_BITMAP #include "xlcd.h" /* 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 /* LCD_DEPTH >= 8 */ - -#endif /* HAVE_LCD_BITMAP */ diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 60bed3b826..984a65aa34 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -29,7 +29,6 @@ static const struct button_mapping *plugin_contexts[] #endif }; -#ifdef HAVE_LCD_BITMAP #define DISPLAY_WIDTH LCD_WIDTH #define DISPLAY_HEIGHT LCD_HEIGHT #define RAND_SCALE 5 @@ -48,19 +47,6 @@ static const struct button_mapping *plugin_contexts[] #define LOGO_WIDTH BMPWIDTH_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 */ #define LP_QUIT PLA_EXIT #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; while (1) { -#ifdef HAVE_LCD_BITMAP rb->lcd_clear_display(); rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); #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), REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); #endif -#else - pgfx_clear_display(); - pgfx_mono_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT); - cpos = x / 5; -#endif - x += dx; if (x < 0) { dx = -dx; @@ -124,19 +103,10 @@ enum plugin_status plugin_start(const void* parameter) { y = DISPLAY_HEIGHT - LOGO_HEIGHT; } -#ifdef HAVE_LCD_BITMAP rb->lcd_update(); #ifdef REMOTE_LOGO rb->lcd_remote_update(); #endif -#else - if (cpos != old_cpos) { - rb->lcd_clear_display(); - pgfx_display(cpos, 0); - old_cpos = cpos; - } - pgfx_update(); -#endif rb->sleep(HZ/timer); diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 1b017942a9..2c7742fd94 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -71,14 +71,12 @@ struct preferences { unsigned active_color; unsigned inactive_color; #endif -#ifdef HAVE_LCD_BITMAP bool wrap; bool wipe; bool active_one_line; int align; /* 0: left, 1: center, 2: right */ bool statusbar_on; bool display_title; -#endif bool display_time; bool backlight_on; @@ -118,16 +116,12 @@ static struct lrc_info { bool loaded_lrc; bool changed_lrc; bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ -#ifdef HAVE_LCD_BITMAP bool wipe; /* false if lyrics is unsynched */ -#endif } current; static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; -#ifdef HAVE_LCD_BITMAP static int uifont = -1; static int font_ui_height = 1; static struct viewport vp_info[NB_SCREENS]; -#endif static struct viewport vp_lyrics[NB_SCREENS]; #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 */ buffer[p_end-1] = 0; -#ifdef HAVE_LCD_BITMAP rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); rb->lcd_set_drawmode(DRMODE_SOLID); -#endif } rb->lcd_update(); 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 */ static const char *lrc_skip_space(const char *str) { -#ifdef HAVE_LCD_BITMAP if (prefs.wrap) { while (*str && *str != '\n' && isspace(*str)) str++; } -#endif if (*str == '\n') str++; return str; } -#ifdef HAVE_LCD_BITMAP static bool isbrchr(const unsigned char *str, int len) { const unsigned char *p = "!,-.:;? 、。!,.:;?―"; @@ -422,7 +411,6 @@ static bool isbrchr(const unsigned char *str, int len) } return false; } -#endif /* calculate how many lines is needed to display and store it. * 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_word *lrc_word; int nlrcbrpos = 0, max_lrcbrpos; -#ifdef HAVE_LCD_BITMAP uifont = rb->screens[0]->getuifont(); struct font* pf = rb->font_get(uifont); unsigned short ch; -#endif struct snap { int count, width; int nword; @@ -1559,7 +1545,6 @@ static void display_state(void) str = "No lyrics"; } -#ifdef HAVE_LCD_BITMAP const char *info = NULL; if (AUDIO_PLAY && prefs.display_title) @@ -1605,13 +1590,6 @@ static void display_state(void) display->update_viewport(); 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) @@ -1619,7 +1597,6 @@ static void display_time(void) rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", current.elapsed/60000, (current.elapsed/1000)%60, current.length/60000, (current.length)/1000%60); -#ifdef HAVE_LCD_BITMAP int y = (prefs.display_title? font_ui_height:0); FOR_NB_SCREENS(i) { @@ -1634,16 +1611,11 @@ static void display_time(void) display->setfont(uifont); display->set_viewport(NULL); } -#else - rb->lcd_puts(0, 0, temp_buf); - rb->lcd_update(); -#endif /* HAVE_LCD_BITMAP */ } /******************************* * Display lyrics *******************************/ -#ifdef HAVE_LCD_BITMAP static inline void set_to_default(struct screen *display) { #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); return ypos; } -#endif /* HAVE_LCD_BITMAP */ static void display_lrcs(void) { @@ -1848,7 +1819,7 @@ static void display_lrcs(void) /* display current line at the center of the viewport */ display->set_viewport(&vp_lyrics[i]); display->clear_viewport(); -#ifdef HAVE_LCD_BITMAP + struct lrc_line *lrc_line; int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; y = (nblines-1)/2; @@ -1895,7 +1866,7 @@ static void display_lrcs(void) } if (!lrc_line && ypos < vp_lyrics[i].height) display->putsxy(0, ypos, "[end]"); -#endif /* HAVE_LCD_BITMAP */ + display->update_viewport(); 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 }, "inactive color", NULL }, #endif -#ifdef HAVE_LCD_BITMAP { 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.active_one_line }, @@ -2201,7 +2171,6 @@ static void load_or_save_settings(bool save) "statusbar on", NULL }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, "display title", NULL }, -#endif { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, "display time", NULL }, { 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.inactive_color = LCD_LIGHTGRAY; #endif -#ifdef HAVE_LCD_BITMAP prefs.wrap = true; prefs.wipe = true; prefs.active_one_line = false; prefs.align = 1; /* center */ prefs.statusbar_on = false; prefs.display_title = true; -#endif prefs.display_time = true; prefs.backlight_on = false; #ifdef LRC_SUPPORT_ID3 @@ -2252,10 +2219,8 @@ static void load_or_save_settings(bool save) static bool lrc_theme_menu(void) { enum { -#ifdef HAVE_LCD_BITMAP LRC_MENU_STATUSBAR, LRC_MENU_DISP_TITLE, -#endif LRC_MENU_DISP_TIME, #ifdef HAVE_LCD_COLOR LRC_MENU_INACTIVE_COLOR, @@ -2267,9 +2232,7 @@ static bool lrc_theme_menu(void) bool exit = false, usb = false; MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, -#ifdef HAVE_LCD_BITMAP "Show Statusbar", "Display Title", -#endif "Display Time", #ifdef HAVE_LCD_COLOR "Inactive Colour", @@ -2280,14 +2243,12 @@ static bool lrc_theme_menu(void) { switch (rb->do_menu(&menu, &selected, NULL, false)) { -#ifdef HAVE_LCD_BITMAP case LRC_MENU_STATUSBAR: usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); break; case LRC_MENU_DISP_TITLE: usb = rb->set_bool("Display Title", &prefs.display_title); break; -#endif case LRC_MENU_DISP_TIME: usb = rb->set_bool("Display Time", &prefs.display_time); break; @@ -2312,7 +2273,6 @@ static bool lrc_theme_menu(void) return usb; } -#ifdef HAVE_LCD_BITMAP static bool lrc_display_menu(void) { enum { @@ -2362,7 +2322,6 @@ static bool lrc_display_menu(void) return usb; } -#endif /* HAVE_LCD_BITMAP */ static bool lrc_lyrics_menu(void) { @@ -2489,9 +2448,7 @@ static int lrc_menu(void) { enum { LRC_MENU_THEME, -#ifdef HAVE_LCD_BITMAP LRC_MENU_DISPLAY, -#endif LRC_MENU_LYRICS, LRC_MENU_PLAYBACK, #ifdef LRC_DEBUG @@ -2504,9 +2461,7 @@ static int lrc_menu(void) MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, "Theme Settings", -#ifdef HAVE_LCD_BITMAP "Display Settings", -#endif "Lyrics Settings", "Playback Control", #ifdef LRC_DEBUG @@ -2524,11 +2479,9 @@ static int lrc_menu(void) case LRC_MENU_THEME: usb = lrc_theme_menu(); break; -#ifdef HAVE_LCD_BITMAP case LRC_MENU_DISPLAY: usb = lrc_display_menu(); break; -#endif case LRC_MENU_LYRICS: usb = lrc_lyrics_menu(); break; @@ -2720,40 +2673,27 @@ static int lrc_main(void) long id3_timeout = 0; bool update_display_state = true; -#ifdef HAVE_LCD_BITMAP /* y offset of vp_lyrics */ int h = (prefs.display_title?font_ui_height:0)+ (prefs.display_time?SYSFONT_HEIGHT*2:0); -#endif FOR_NB_SCREENS(i) { -#ifdef HAVE_LCD_BITMAP rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); vp_lyrics[i] = vp_info[i]; vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; vp_lyrics[i].y += 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) 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). */ if (!current.too_many_lines) calc_brpos(NULL, 0); -#endif while (ret == LRC_GOTO_MAIN) { @@ -2819,12 +2759,10 @@ static int lrc_main(void) } if (update_display_state) { -#ifdef HAVE_LCD_BITMAP if (current.type == TXT || current.type == ID3_USLT) current.wipe = false; else current.wipe = prefs.wipe; -#endif display_state(); update_display_state = false; } @@ -2839,10 +2777,9 @@ static int lrc_main(void) ret = handle_button(); } -#ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) rb->viewportmanager_theme_undo(i, false); -#endif + if (prefs.backlight_on) backlight_use_settings(); @@ -2857,10 +2794,8 @@ enum plugin_status plugin_start(const void* parameter) /* initialize settings. */ load_or_save_settings(false); -#ifdef HAVE_LCD_BITMAP uifont = rb->screens[0]->getuifont(); font_ui_height = rb->font_get(uifont)->height; -#endif lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c index 7b3ed9d2d7..1266d60310 100644 --- a/apps/plugins/lua/rocklib_img.c +++ b/apps/plugins/lua/rocklib_img.c @@ -1331,10 +1331,8 @@ static inline struct viewport* opt_viewport(lua_State *L, vp->y = check_tablevalue(L, "y", narg); vp->width = check_tablevalue(L, "width", narg); vp->height = check_tablevalue(L, "height", narg); -#ifdef HAVE_LCD_BITMAP vp->font = check_tablevalue(L, "font", narg); vp->drawmode = check_tablevalue(L, "drawmode", narg); -#endif #if LCD_DEPTH > 1 vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg); vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg); @@ -1379,7 +1377,6 @@ RB_WRAP(font_getstringsize) return 3; } -#ifdef HAVE_LCD_BITMAP RB_WRAP(lcd_framebuffer) { rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); @@ -1620,8 +1617,6 @@ RB_WRAP(lcd_drawpixel) return 0; } -#endif /* defined(LCD_BITMAP) */ - #ifdef HAVE_LCD_COLOR RB_WRAP(lcd_rgbpack) { @@ -1690,7 +1685,6 @@ static const luaL_Reg rocklib_img[] = R(set_viewport), R(clear_viewport), R(font_getstringsize), -#ifdef HAVE_LCD_BITMAP R(lcd_framebuffer), R(lcd_setfont), R(gui_scrollbar_draw), @@ -1721,7 +1715,6 @@ static const luaL_Reg rocklib_img[] = R(lcd_vline), R(lcd_drawpixel), -#endif /*HAVE_LCD_BITMAP*/ #ifdef HAVE_LCD_COLOR R(lcd_rgbpack), R(lcd_rgbunpack), diff --git a/apps/plugins/lua/rocklib_img.h b/apps/plugins/lua/rocklib_img.h index 496bc8dd93..90b24f1ad1 100644 --- a/apps/plugins/lua/rocklib_img.h +++ b/apps/plugins/lua/rocklib_img.h @@ -22,9 +22,7 @@ #ifndef _ROCKLIB_IMG_H_ #define _ROCKLIB_IMG_H_ -#ifdef HAVE_LCD_BITMAP #define RLI_EXTENDED -#endif LUALIB_API int (luaopen_rock_img) (lua_State *L); diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index eec8a92e78..a6b4181df2 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c @@ -840,12 +840,9 @@ static void metronome_draw(struct screen* display, int state) int textlen = display->lcdwidth / display->getcharwidth(); ps = part; display->clear_display(); -#ifdef HAVE_LCD_BITMAP display->setfont(FONT_SYSFIXED); -#endif switch(state) { -#ifdef HAVE_LCD_BITMAP case 0: if(sound_paused) { @@ -876,49 +873,17 @@ static void metronome_draw(struct screen* display, int state) case 3: display->puts((textlen-3)/2,0, "o.O"); 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) { -#ifdef HAVE_LCD_BITMAP /* One line in several. */ rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d" , ps->beats_per_bar, ps->base_beat , bpm, rb->global_settings->volume ); 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? I guess there are 3-line displays out there. */ 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" , part->id+1, parts, bar+1, beat+1 ); display->puts(0, 5, buffer); -#endif /* HAVE_LCD_BITMAP */ } else /* track mode */ { -#ifdef HAVE_LCD_BITMAP if(display->screen_type==SCREEN_MAIN) { #ifdef MET_SYNC @@ -960,32 +923,18 @@ static void metronome_draw(struct screen* display, int state) #endif } #endif -#endif /* HAVE_LCD_BITMAP */ -#ifdef HAVE_LCD_BITMAP rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d" , bpm, rb->global_settings->volume ); 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); if(sound_paused) display->puts(0,2,"start: hold select"); else display->puts(0,2,"stop : cancel"); -#endif /* HAVE_LCD_BITMAP */ } /* !track_mode */ -#ifdef HAVE_LCD_BITMAP display->setfont(FONT_UI); -#endif /* HAVE_LCD_BITMAP */ display->update(); } diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index 28ea9efd93..caf5346dc5 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -23,7 +23,6 @@ #include "lib/pluginlib_actions.h" -#ifdef HAVE_LCD_BITMAP #define GFX_X (LCD_WIDTH/2-1) #define GFX_Y (LCD_HEIGHT/2-1) #if LCD_WIDTH != LCD_HEIGHT @@ -33,12 +32,6 @@ #define GFX_WIDTH GFX_X #define GFX_HEIGHT (4*GFX_Y/5) #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 */ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; diff --git a/apps/plugins/otp.c b/apps/plugins/otp.c index 2da1ef83f5..4d302563fb 100644 --- a/apps/plugins/otp.c +++ b/apps/plugins/otp.c @@ -1007,9 +1007,7 @@ static void show_help(void) rb->lcd_set_background(LCD_BLACK); #endif -#ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_UI); -#endif static char *help_text[] = { "One-Time Password Manager", "", "Introduction", "", diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index c3d38997eb..4622d2a10e 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -1462,7 +1462,6 @@ static int pegbox_main(struct game_context* pb) enum plugin_status plugin_start(const void* parameter) { (void)parameter; -#ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_SYSFIXED); #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); @@ -1484,7 +1483,6 @@ enum plugin_status plugin_start(const void* parameter) pegbox_main(&pb); configfile_save(CONFIG_FILE_NAME,config,2,0); rb->lcd_setfont(FONT_UI); -#endif /* HAVE_LCD_BITMAP */ return PLUGIN_OK; } diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 4c172ff108..9db9572d43 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -411,10 +411,8 @@ enum plugin_status plugin_start(const void* parameter) return PLUGIN_OK; } -#ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) rb->viewportmanager_theme_enable(i, true, NULL); -#endif 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); @@ -448,10 +446,8 @@ enum plugin_status plugin_start(const void* parameter) } } -#ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) rb->viewportmanager_theme_undo(i, false); -#endif return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK; } diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index c7968c3e20..31c626e267 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -532,8 +532,6 @@ #define BOARD_WIDTH 10 -#ifdef HAVE_LCD_BITMAP - #define BOARD_HEIGHT 20 #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) @@ -757,6 +755,9 @@ #define LEVEL_X 58 #define LINES_Y 62 #define LINES_X 58 + +#else +#error "lcd screen size not defined!" #endif #ifndef LEVEL_X @@ -769,10 +770,6 @@ extern const fb_data rockblox_background[]; -#else -#error "lcd screen size not defined!" -#endif - #ifndef HIGHSCORE_SPACE #define HIGHSCORE_SPACE " " #endif @@ -974,7 +971,6 @@ static void init_board (void) /* show the score, level and lines */ static void show_details (void) { -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH >= 2 rb->lcd_set_foreground (LCD_BLACK); 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 (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); -#endif } #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_hour, tm->tm_min, tm->tm_sec); -#ifdef HAVE_LCD_BITMAP rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); -#endif if (!resume) { rockblox_status.level = 1; @@ -1149,7 +1142,6 @@ static void refresh_board (void) for (j = 0; j < BOARD_HEIGHT; j++) { block = rockblox_status.board[j][i]; if (block != EMPTY_BLOCK) { -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH >= 2 /* middle drawing */ 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, BOARD_X + (i + 1) * BLOCK_WIDTH - 1, BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); -#endif } } @@ -1194,7 +1185,6 @@ static void refresh_board (void) + rockblox_status.cx; y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) + ghost_y; -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH >= 2 /* middle drawing */ 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, BOARD_X + (x + 1) * BLOCK_WIDTH - 1, BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); -#endif } /* draw current piece */ @@ -1231,7 +1220,6 @@ static void refresh_board (void) + rockblox_status.cx; y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) + rockblox_status.cy; -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH >= 2 /* middle drawing */ 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, BOARD_X + (x + 1) * BLOCK_WIDTH - 1, BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); -#endif } mylcd_update (); @@ -1301,7 +1288,6 @@ static void draw_next_block (void) for (i = 0; i < 4; i++) { rx = getRelativeX (rockblox_status.nf, i, 0) + 2; ry = getRelativeY (rockblox_status.nf, i, 0) + 2; -#ifdef HAVE_LCD_BITMAP #if LCD_DEPTH >= 2 rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */ #endif @@ -1326,7 +1312,6 @@ static void draw_next_block (void) rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); -#endif } } @@ -1428,18 +1413,14 @@ static bool rockblox_help(void) LAST_STYLE_ITEM }; -#ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_UI); -#endif #ifdef HAVE_LCD_COLOR rb->lcd_set_background(LCD_BLACK); rb->lcd_set_foreground(LCD_WHITE); #endif if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true)) return true; -#ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_SYSFIXED); -#endif return false; } @@ -1699,15 +1680,7 @@ enum plugin_status plugin_start (const void *parameter) rb->lcd_set_backdrop(NULL); #endif -#ifdef HAVE_LCD_BITMAP 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 */ backlight_ignore_timeout(); diff --git a/apps/plugins/search.c b/apps/plugins/search.c index ff7be343f6..f27d2045b1 100644 --- a/apps/plugins/search.c +++ b/apps/plugins/search.c @@ -125,11 +125,7 @@ static bool search_init(const char* file){ fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666); if (fdw < 0) { -#ifdef HAVE_LCD_BITMAP rb->splash(HZ, "Failed to create result file!"); -#else - rb->splash(HZ, "File creation failed"); -#endif rb->close(fd); return false; } diff --git a/apps/plugins/searchengine/searchengine.h b/apps/plugins/searchengine/searchengine.h index 090adb7051..00bedd816b 100644 --- a/apps/plugins/searchengine/searchengine.h +++ b/apps/plugins/searchengine/searchengine.h @@ -25,20 +25,12 @@ #include <autoconf.h> extern int w, h, y; -#ifdef HAVE_LCD_BITMAP #define PUTS(str) do { \ rb->lcd_putsxy(1, y, str); \ rb->lcd_getstringsize(str, &w, &h); \ y += h + 1; \ } while (0); \ 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 setmallocpos(void *pointer); diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c index c9a4655341..cfc9d8d746 100644 --- a/apps/plugins/shortcuts/shortcuts_view.c +++ b/apps/plugins/shortcuts/shortcuts_view.c @@ -223,20 +223,16 @@ enum plugin_status plugin_start(const void* void_parameter) return PLUGIN_OK; } -#ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) rb->viewportmanager_theme_enable(i, true, NULL); -#endif do { /* Display a menu to choose between the entries */ leave_loop = list_sc(); } while (!leave_loop); -#ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) rb->viewportmanager_theme_undo(i, false); -#endif return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK; } diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index f05d3c2a44..10b41c972b 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -22,15 +22,9 @@ #include "lib/mylcd.h" #include "lib/pluginlib_actions.h" -#ifdef HAVE_LCD_BITMAP #define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) #define SNOW_HEIGHT LCD_HEIGHT #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 }; @@ -40,7 +34,6 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; static short particles[NUM_PARTICLES][2]; -#ifdef HAVE_LCD_BITMAP #if LCD_WIDTH >= 160 #define FLAKE_WIDTH 5 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 static const unsigned char flake[] = {0x02,0x07,0x02}; #endif -#endif static bool particle_exists(int particle) { @@ -83,12 +75,8 @@ static void snow_move(void) for (i=0; i<NUM_PARTICLES; i++) { if (particle_exists(i)) { mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); -#ifdef HAVE_LCD_BITMAP rb->lcd_fillrect(particles[i][0],particles[i][1], FLAKE_WIDTH,FLAKE_WIDTH); -#else - pgfx_drawpixel(particles[i][0],particles[i][1]); -#endif mylcd_set_drawmode(DRMODE_SOLID); #ifdef HAVE_REMOTE_LCD if (particles[i][0] <= LCD_REMOTE_WIDTH @@ -116,12 +104,8 @@ static void snow_move(void) break; } if (particle_exists(i)) -#ifdef HAVE_LCD_BITMAP rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], FLAKE_WIDTH,FLAKE_WIDTH); -#else - pgfx_drawpixel(particles[i][0],particles[i][1]); -#endif #ifdef HAVE_REMOTE_LCD if (particles[i][0] <= LCD_REMOTE_WIDTH && particles[i][1] <= LCD_REMOTE_HEIGHT) { diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index ff23911336..0a29a7aa30 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -56,7 +56,6 @@ static void update_screen(void) rb->lcd_remote_clear_display(); #endif -#ifdef HAVE_LCD_BITMAP rb->snprintf(buf, sizeof(buf), "Total Files: %d", files); prn(buf,0); rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles); @@ -71,12 +70,6 @@ static void update_screen(void) prn(buf,5); rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir); 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(); #ifdef HAVE_REMOTE_LCD diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index c3fa3e15dd..6fca37d06f 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c @@ -23,11 +23,7 @@ -#ifdef HAVE_LCD_BITMAP #define TIMER_Y 1 -#else -#define TIMER_Y 0 -#endif #define LAP_Y TIMER_Y+1 #define MAX_LAPS 64 @@ -481,14 +477,10 @@ enum plugin_status plugin_start(const void* parameter) (void)parameter; -#ifdef HAVE_LCD_BITMAP int h; rb->lcd_setfont(FONT_UI); rb->lcd_getstringsize("M", NULL, &h); lines = (LCD_HEIGHT / h) - (LAP_Y); -#else - lines = 1; -#endif load_stopwatch(); diff --git a/apps/plugins/test_mem.c b/apps/plugins/test_mem.c index 66d6248dcc..f17ea7a05d 100644 --- a/apps/plugins/test_mem.c +++ b/apps/plugins/test_mem.c @@ -206,10 +206,8 @@ enum plugin_status plugin_start(const void* parameter) #endif int count = 0; -#ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_SYSFIXED); -#endif - + rb->screens[0]->clear_display(); TEST_MEM_PRINTF("patience, may take some seconds..."); rb->screens[0]->update(); diff --git a/apps/plugins/test_viewports.c b/apps/plugins/test_viewports.c index 9fc9caa451..465a832399 100644 --- a/apps/plugins/test_viewports.c +++ b/apps/plugins/test_viewports.c @@ -21,10 +21,6 @@ #include "plugin.h" - - -#ifdef HAVE_LCD_BITMAP - #ifdef HAVE_LCD_COLOR #define BGCOLOR_1 LCD_RGBPACK(255,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; } - - -#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 */ diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index c8102eb6d2..fea0977c0d 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c @@ -61,10 +61,8 @@ enum plugin_status plugin_start(const void* file) atexit(tv_exit); while (!done) { -#ifdef HAVE_LCD_BITMAP if (preferences->statusbar) rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL); -#endif if (display_update) tv_draw(); diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c index 798871c430..041dee5a50 100644 --- a/apps/plugins/text_viewer/tv_action.c +++ b/apps/plugins/text_viewer/tv_action.c @@ -100,9 +100,7 @@ void tv_scroll_up(unsigned mode) (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) { offset_page--; -#ifdef HAVE_LCD_BITMAP offset_line = (preferences->overlap_page_mode)? 1:0; -#endif } tv_move_screen(offset_page, offset_line, SEEK_CUR); scrolled = true; @@ -117,9 +115,7 @@ void tv_scroll_down(unsigned mode) (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) { offset_page++; -#ifdef HAVE_LCD_BITMAP offset_line = (preferences->overlap_page_mode)? -1:0; -#endif } tv_move_screen(offset_page, offset_line, SEEK_CUR); scrolled = true; diff --git a/apps/plugins/text_viewer/tv_bookmark.c b/apps/plugins/text_viewer/tv_bookmark.c index 0f5d58b24e..1edad093a9 100644 --- a/apps/plugins/text_viewer/tv_bookmark.c +++ b/apps/plugins/text_viewer/tv_bookmark.c @@ -182,11 +182,7 @@ static const char* get_bookmark_name(int selected, void * data, (void)data; struct tv_bookmark_info *bookmark = &bookmarks[selected]; rb->snprintf(buffer, buffer_len, -#ifdef HAVE_LCD_BITMAP "%cPage: %d Line: %d", -#else - "%cP:%d L:%d", -#endif (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ', bookmark->pos.page + 1, bookmark->pos.line + 1); return buffer; diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c index d6175b79cf..9ecfd8d709 100644 --- a/apps/plugins/text_viewer/tv_display.c +++ b/apps/plugins/text_viewer/tv_display.c @@ -25,7 +25,6 @@ /* * display layout * - * when is defined HAVE_LCD_BITMAP * +-------------------------+ * |statusbar (1) | * +-------------------------+ @@ -56,14 +55,6 @@ * (5) displays when preferences->footer_mode is FT_PAGE. * (6) displays when rb->global_settings->statusbar == STATUSBAR_BOTTOM. * - * - * when isn't defined HAVE_LCD_BITMAP - * +---+---------------------+ - * | | | - * |(7)| draw area | - * | | | - * +---+---------------------+ - * (7) bookmark */ #define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width @@ -83,14 +74,10 @@ static bool is_initialized_vp = false; static struct screen* display; /* layout */ -#ifdef HAVE_LCD_BITMAP static struct tv_rect header; static struct tv_rect footer; static struct tv_rect horizontal_scrollbar; static struct tv_rect vertical_scrollbar; -#else -static struct tv_rect bookmark; -#endif static bool show_horizontal_scrollbar; static bool show_vertical_scrollbar; @@ -103,8 +90,6 @@ static int row_height = 1; static int totalsize; -#ifdef HAVE_LCD_BITMAP - static void tv_show_header(void) { if (preferences->header_mode) @@ -156,8 +141,6 @@ static void tv_show_scrollbar(int window, int col, off_t cur_pos, int size) } } -#endif - void tv_init_scrollbar(off_t total, bool show_scrollbar) { totalsize = total; @@ -167,38 +150,23 @@ void tv_init_scrollbar(off_t total, bool show_scrollbar) void tv_show_bookmarks(const int *rows, int count) { -#ifdef HAVE_LCD_BITMAP display->set_viewport(&vp_text); display->set_drawmode(DRMODE_COMPLEMENT); -#endif while (count--) { -#ifdef HAVE_LCD_BITMAP display->fillrect(0, rows[count] * row_height, vp_text.width, row_height); -#else - display->putchar(bookmark.x, bookmark.y + rows[count], TV_BOOKMARK_ICON); -#endif } -#ifdef HAVE_LCD_BITMAP display->set_drawmode(DRMODE_SOLID); display->set_viewport(&vp_info); -#endif } void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size) { -#ifdef HAVE_LCD_BITMAP tv_show_scrollbar(window, col, pos->file_pos, size); tv_show_header(); tv_show_footer(pos); -#else - (void)window; - (void)col; - (void)pos; - (void)size; -#endif } void tv_draw_text(int row, const unsigned char *text, int offset) @@ -217,11 +185,7 @@ void tv_draw_text(int row, const unsigned char *text, int offset) display->set_viewport(&vp_text); tv_night_mode(); -#ifdef HAVE_LCD_BITMAP display->putsxy(xpos, row * row_height, text); -#else - display->puts(xpos, row, text); -#endif display->set_viewport(&vp_info); } @@ -229,9 +193,7 @@ void tv_start_display(void) { display->set_viewport(&vp_info); tv_night_mode(); -#ifdef HAVE_LCD_BITMAP display->set_drawmode(DRMODE_SOLID); -#endif #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); @@ -248,7 +210,6 @@ void tv_end_display(void) void tv_set_layout(bool show_scrollbar) { -#ifdef HAVE_LCD_BITMAP int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)? TV_SCROLLBAR_WIDTH + 1 : 0; int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)? @@ -282,20 +243,6 @@ void tv_set_layout(bool show_scrollbar) vp_text.y += vertical_scrollbar.y; vp_text.width = horizontal_scrollbar.w; vp_text.height = vertical_scrollbar.h; -#else - (void) show_scrollbar; - - row_height = 1; - - bookmark.x = 0; - bookmark.y = 0; - bookmark.w = 1; - bookmark.h = vp_info.height; - - vp_text = vp_info; - vp_text.x += 1; - vp_text.width -= 1; -#endif display_columns = vp_text.width / col_width; display_rows = vp_text.height / row_height; @@ -310,7 +257,6 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows) static void tv_change_viewport(void) { -#ifdef HAVE_LCD_BITMAP bool show_statusbar = preferences->statusbar; if (is_initialized_vp) @@ -321,16 +267,8 @@ static void tv_change_viewport(void) rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info); vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK; display->set_viewport(&vp_info); -#else - if (!is_initialized_vp) - { - rb->viewport_set_defaults(&vp_info, SCREEN_MAIN); - is_initialized_vp = true; - } -#endif } -#ifdef HAVE_LCD_BITMAP static bool tv_set_font(const unsigned char *font) { unsigned char path[MAX_PATH]; @@ -350,11 +288,9 @@ static bool tv_set_font(const unsigned char *font) vp_text.font = preferences->font_id; return true; } -#endif static int tv_change_preferences(const struct tv_preferences *oldp) { -#ifdef HAVE_LCD_BITMAP static bool font_changing = false; const unsigned char *font_str; struct tv_preferences new_prefs; @@ -382,9 +318,6 @@ static int tv_change_preferences(const struct tv_preferences *oldp) col_width = 2 * rb->font_get_width(rb->font_get(preferences->font_id), ' '); font_changing = false; } -#else - (void)oldp; -#endif tv_change_viewport(); return TV_CALLBACK_OK; } @@ -419,7 +352,6 @@ void tv_night_mode(void) void tv_finalize_display(void) { -#ifdef HAVE_LCD_BITMAP /* restore font */ if (preferences->font_id >= 0 && (preferences->font_id != rb->global_status->font_id[SCREEN_MAIN])) @@ -430,14 +362,9 @@ void tv_finalize_display(void) /* undo viewport */ if (is_initialized_vp) rb->viewportmanager_theme_undo(SCREEN_MAIN, false); -#endif } bool tv_exist_scrollbar(void) { -#ifdef HAVE_LCD_BITMAP return true; -#else - return false; -#endif } diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index 01fb052151..53e0adaf67 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c @@ -34,12 +34,10 @@ static struct tv_preferences new_prefs; /* horizontal scroll settings menu */ /* */ -#ifdef HAVE_LCD_BITMAP static bool tv_horizontal_scrollbar_setting(void) { return rb->set_bool("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar); } -#endif static bool tv_horizontal_scroll_mode_setting(void) { @@ -52,30 +50,24 @@ static bool tv_horizontal_scroll_mode_setting(void) names, 2, NULL); } -#ifdef HAVE_LCD_BITMAP MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Scrollbar", tv_horizontal_scrollbar_setting, NULL, NULL, Icon_NOICON); -#endif MENUITEM_FUNCTION(horizontal_scroll_mode_item, 0, "Scroll Mode", tv_horizontal_scroll_mode_setting, NULL, NULL, Icon_NOICON); MAKE_MENU(horizontal_scroll_menu, "Horizontal", NULL, Icon_NOICON, -#ifdef HAVE_LCD_BITMAP &horizontal_scrollbar_item, -#endif &horizontal_scroll_mode_item); /* */ /* vertical scroll settings menu */ /* */ -#ifdef HAVE_LCD_BITMAP static bool tv_vertical_scrollbar_setting(void) { return rb->set_bool("Vertical Scrollbar", &new_prefs.vertical_scrollbar); } -#endif static bool tv_vertical_scroll_mode_setting(void) { @@ -110,11 +102,9 @@ static bool tv_narrow_mode_setting(void) names, 2, NULL); } -#ifdef HAVE_LCD_BITMAP MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Scrollbar", tv_vertical_scrollbar_setting, NULL, NULL, Icon_NOICON); -#endif MENUITEM_FUNCTION(vertical_scroll_mode_item, 0, "Scroll Mode", tv_vertical_scroll_mode_setting, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(overlap_page_mode_item, 0, "Overlap Pages", tv_overlap_page_mode_setting, @@ -125,9 +115,7 @@ MENUITEM_FUNCTION(narrow_mode_item, 0, "Left/Right Key (Narrow mode)", tv_narrow_mode_setting, NULL, NULL, Icon_NOICON); MAKE_MENU(vertical_scroll_menu, "Vertical", NULL, Icon_NOICON, -#ifdef HAVE_LCD_BITMAP &vertical_scrollbar_item, -#endif &vertical_scroll_mode_item, &overlap_page_mode_item, &autoscroll_speed_item, &narrow_mode_item); @@ -198,7 +186,6 @@ static bool tv_alignment_setting(void) names , 2, NULL); } -#ifdef HAVE_LCD_BITMAP static bool tv_header_setting(void) { return rb->set_bool("Show Header", &new_prefs.header_mode); @@ -239,7 +226,6 @@ static bool tv_font_setting(void) return false; } -#endif static bool tv_indent_spaces_setting(void) { @@ -264,7 +250,6 @@ MENUITEM_FUNCTION(windows_item, 0, "Screens Per Page", tv_windows_setting, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, NULL, NULL, Icon_NOICON); -#ifdef HAVE_LCD_BITMAP MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, @@ -273,7 +258,6 @@ MENUITEM_FUNCTION(statusbar_item, 0, "Show Statusbar", tv_statusbar_setting, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, NULL, NULL, Icon_NOICON); -#endif MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting, NULL, NULL, Icon_NOICON); #ifdef HAVE_LCD_COLOR @@ -284,9 +268,7 @@ MENUITEM_FUNCTION(night_mode_item, 0, "Night Mode", tv_night_mode_setting, MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, &alignment_item, -#ifdef HAVE_LCD_BITMAP &header_item, &footer_item, &font_item, &statusbar_item, -#endif &scroll_menu, &indent_spaces_item #ifdef HAVE_LCD_COLOR , &night_mode_item diff --git a/apps/plugins/text_viewer/tv_preferences.c b/apps/plugins/text_viewer/tv_preferences.c index 54c21ba04d..fdfe068068 100644 --- a/apps/plugins/text_viewer/tv_preferences.c +++ b/apps/plugins/text_viewer/tv_preferences.c @@ -59,12 +59,10 @@ static bool tv_notify_change_preferences(const struct tv_preferences *oldp) (oldp->vertical_scrollbar != preferences->vertical_scrollbar) || (oldp->encoding != preferences->encoding) || (oldp->indent_spaces != preferences->indent_spaces) || -#ifdef HAVE_LCD_BITMAP (oldp->header_mode != preferences->header_mode) || (oldp->footer_mode != preferences->footer_mode) || (oldp->statusbar != preferences->statusbar) || (rb->strcmp(oldp->font_name, preferences->font_name)) || -#endif (rb->strcmp(oldp->file_name, preferences->file_name))) { /* callback functions are called as FILO */ @@ -110,17 +108,11 @@ void tv_set_default_preferences(struct tv_preferences *p) p->overlap_page_mode = false; p->horizontal_scrollbar = false; p->vertical_scrollbar = false; -#ifdef HAVE_LCD_BITMAP p->header_mode = true; p->footer_mode = true; p->statusbar = true; rb->strlcpy(p->font_name, rb->global_settings->font_file, MAX_PATH); p->font_id = rb->global_status->font_id[SCREEN_MAIN]; -#else - p->header_mode = false; - p->footer_mode = false; - p->statusbar = false; -#endif p->autoscroll_speed = 10; p->night_mode = false; p->narrow_mode = NM_PAGE; @@ -139,7 +131,5 @@ void tv_add_preferences_change_listner(int (*listner)(const struct tv_preference void tv_change_fontid(int id) { (void)id; -#ifdef HAVE_LCD_BITMAP prefs.font_id = id; -#endif } diff --git a/apps/plugins/text_viewer/tv_preferences.h b/apps/plugins/text_viewer/tv_preferences.h index 65d9521e15..4f36dc1fb6 100644 --- a/apps/plugins/text_viewer/tv_preferences.h +++ b/apps/plugins/text_viewer/tv_preferences.h @@ -95,10 +95,9 @@ struct tv_preferences { bool night_mode; -#ifdef HAVE_LCD_BITMAP unsigned char font_name[MAX_PATH]; int font_id; -#endif + unsigned char file_name[MAX_PATH]; }; diff --git a/apps/plugins/text_viewer/tv_settings.c b/apps/plugins/text_viewer/tv_settings.c index dfd47ec7a3..6f4e5f2ff8 100644 --- a/apps/plugins/text_viewer/tv_settings.c +++ b/apps/plugins/text_viewer/tv_settings.c @@ -219,11 +219,9 @@ static bool tv_read_preferences(int pfd, int version, struct tv_preferences *pre if (version > 6) prefs->night_mode = (*p++ != 0); -#ifdef HAVE_LCD_BITMAP rb->strlcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH); prefs->font_id = rb->global_status->font_id[SCREEN_MAIN]; -#endif return true; } @@ -253,9 +251,7 @@ static void tv_serialize_preferences(unsigned char *buf, const struct tv_prefere *p++ = prefs->statusbar; *p++ = prefs->night_mode; -#ifdef HAVE_LCD_BITMAP rb->strlcpy(buf + 28, prefs->font_name, MAX_PATH); -#endif } static bool tv_write_preferences(int pfd, const struct tv_preferences *prefs) diff --git a/apps/plugins/text_viewer/tv_text_processor.c b/apps/plugins/text_viewer/tv_text_processor.c index fa644d7725..db96d61409 100644 --- a/apps/plugins/text_viewer/tv_text_processor.c +++ b/apps/plugins/text_viewer/tv_text_processor.c @@ -33,11 +33,7 @@ enum{ }; /* the max characters of each blocks */ -#ifdef HAVE_LCD_BITMAP #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) -#else -#define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH + 1) -#endif #define TV_MAX_BLOCKS 5 @@ -90,15 +86,11 @@ static int tv_glyph_width(int ch) if (ch == 0) ch = ' '; -#ifdef HAVE_LCD_BITMAP /* the width of the diacritics charcter is 0 */ if (rb->is_diacritic(ch, NULL)) return 0; return rb->font_get_width(rb->font_get(preferences->font_id), ch); -#else - return 1; -#endif } static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) @@ -138,7 +130,6 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) if (preferences->encoding == UTF_8) return (unsigned char*)rb->utf8decode(str, ch); -#ifdef HAVE_LCD_BITMAP if ((*str >= 0x80) && ((preferences->encoding > SJIS) || (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) @@ -151,7 +142,7 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) } count = 2; } -#endif + rb->iso_decode(str, utf8_tmp, preferences->encoding, count); rb->utf8decode(utf8_tmp, ch); return (unsigned char *)str + count; diff --git a/apps/plugins/theme_remove.c b/apps/plugins/theme_remove.c index 674342a920..f39d224868 100644 --- a/apps/plugins/theme_remove.c +++ b/apps/plugins/theme_remove.c @@ -48,18 +48,12 @@ struct remove_setting { }; static int remove_wps(struct remove_setting *); -#ifdef HAVE_LCD_BITMAP static int remove_icons(struct remove_setting *setting); -#endif enum remove_settings { -#ifdef HAVE_LCD_BITMAP REMOVE_FONT, -#endif REMOVE_WPS, -#ifdef HAVE_LCD_BITMAP REMOVE_SBS, -#endif #ifdef HAVE_REMOTE_LCD REMOVE_RWPS, REMOVE_RSBS, @@ -67,10 +61,8 @@ enum remove_settings { #if LCD_DEPTH > 1 REMOVE_BACKDROP, #endif -#ifdef HAVE_LCD_BITMAP REMOVE_ICON, REMOVE_VICON, -#endif #ifdef HAVE_REMOTE_LCD REMOVE_RICON, REMOVE_RVICON, @@ -83,16 +75,12 @@ enum remove_settings { static bool create_log = true; static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { -#ifdef HAVE_LCD_BITMAP [REMOVE_FONT] = { "font", FONT_DIR "/", ".fnt", "", ASK_FOR_REMOVAL, NULL, false }, -#endif [REMOVE_WPS] = { "wps", WPS_DIR "/", ".wps", "", REMOVE_IF_NOT_USED, remove_wps, false }, -#ifdef HAVE_LCD_BITMAP [REMOVE_SBS] = { "sbs", SBS_DIR "/", ".sbs", "", REMOVE_IF_NOT_USED, remove_wps, false }, -#endif #ifdef HAVE_REMOTE_LCD [REMOVE_RWPS] = { "rwps", WPS_DIR "/", ".rwps", "", REMOVE_IF_NOT_USED, remove_wps, false }, @@ -103,12 +91,10 @@ static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { [REMOVE_BACKDROP] = { "backdrop", BACKDROP_DIR "/", ".bmp", "", REMOVE_IF_NOT_USED, NULL, false }, #endif -#ifdef HAVE_LCD_BITMAP [REMOVE_ICON] = { "iconset", ICON_DIR "/", ".bmp", "", ASK_FOR_REMOVAL, NULL, false }, [REMOVE_VICON] = { "viewers iconset", ICON_DIR "/", ".bmp", "", ASK_FOR_REMOVAL, remove_icons, false }, -#endif #ifdef HAVE_REMOTE_LCD [REMOVE_RICON] = { "remote iconset", ICON_DIR "/", ".bmp", "", ASK_FOR_REMOVAL, NULL, false }, @@ -124,19 +110,15 @@ static char *option_names[NUM_REMOVE_OPTION] = { "always", "never", "not used", "ask", }; static struct configdata config[] = { -#ifdef HAVE_LCD_BITMAP { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_FONT].option }, "remove font", option_names }, -#endif { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_WPS].option }, "remove wps", option_names }, -#ifdef HAVE_LCD_BITMAP { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_SBS].option }, "remove sbs", option_names }, -#endif #ifdef HAVE_REMOTE_LCD { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_RWPS].option }, @@ -150,14 +132,12 @@ static struct configdata config[] = { { .int_p = &remove_list[REMOVE_BACKDROP].option }, "remove backdrop", option_names }, #endif -#ifdef HAVE_LCD_BITMAP { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_ICON].option }, "remove iconset", option_names }, { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_VICON].option }, "remove viconset", option_names }, -#endif #ifdef HAVE_REMOTE_LCD { TYPE_INT, 0, NUM_REMOVE_OPTION, { .int_p = &remove_list[REMOVE_RICON].option }, @@ -285,7 +265,6 @@ static int remove_wps(struct remove_setting *setting) return remove_dir(bmpdir, MAX_PATH); } -#ifdef HAVE_LCD_BITMAP static int remove_icons(struct remove_setting *setting) { char path[MAX_PATH]; @@ -306,19 +285,15 @@ static int remove_icons(struct remove_setting *setting) show_mess("Removed", path); return 0; } -#endif -#ifdef HAVE_LCD_BITMAP static char font_file[MAX_PATH]; -#endif + static bool is_deny_file(const char *file) { const char *deny_files[] = { WPS_DEFAULTCFG, RWPS_DEFAULTCFG, -#ifdef HAVE_LCD_BITMAP font_file, -#endif NULL }; const char **p = deny_files; @@ -334,13 +309,9 @@ static bool is_deny_file(const char *file) static void check_whether_used_in_setting(void) { const char *setting_files[] = { -#ifdef HAVE_LCD_BITMAP rb->global_settings->font_file, -#endif rb->global_settings->wps_file, -#ifdef HAVE_LCD_BITMAP rb->global_settings->sbs_file, -#endif #ifdef HAVE_REMOTE_LCD rb->global_settings->rwps_file, rb->global_settings->rsbs_file, @@ -348,10 +319,8 @@ static void check_whether_used_in_setting(void) #if LCD_DEPTH > 1 rb->global_settings->backdrop_file, #endif -#ifdef HAVE_LCD_BITMAP rb->global_settings->icon_file, rb->global_settings->viewers_icon_file, -#endif #ifdef HAVE_REMOTE_LCD rb->global_settings->remote_icon_file, rb->global_settings->remote_viewers_icon_file, @@ -419,12 +388,10 @@ static void check_whether_used(void) DIR *dir; check_whether_used_in_setting(); -#ifdef HAVE_LCD_BITMAP /* mark font files come from rockbox-font.zip as used and don't remove * them automatically as themes may depend on those fonts. */ if (remove_list[REMOVE_FONT].option == REMOVE_IF_NOT_USED) check_whether_used_in_file(RB_FONTS_CONFIG); -#endif dir = rb->opendir(THEME_DIR); if (!dir) @@ -591,13 +558,9 @@ static bool option_menu(void) { MENUITEM_STRINGLIST(option_menu, "Remove Options", NULL, /* same order as remove_list */ -#ifdef HAVE_LCD_BITMAP "Font", -#endif "WPS", -#ifdef HAVE_LCD_BITMAP "Statusbar Skin", -#endif #ifdef HAVE_REMOTE_LCD "Remote WPS", "Remote Statusbar Skin", @@ -605,9 +568,7 @@ static bool option_menu(void) #if LCD_DEPTH > 1 "Backdrop", #endif -#ifdef HAVE_LCD_BITMAP "Iconset", "Viewers Iconset", -#endif #ifdef HAVE_REMOTE_LCD "Remote Iconset", "Remote Viewers Iconset", #endif @@ -669,10 +630,8 @@ enum plugin_status plugin_start(const void* parameter) if((p = rb->strrchr(title, '.'))) *p = 0; -#ifdef HAVE_LCD_BITMAP rb->snprintf(font_file, MAX_PATH, FONT_DIR "/%s.fnt", rb->global_settings->font_file); -#endif rb->strlcpy(themefile, parameter, MAX_PATH); if (!rb->file_exists(themefile)) { diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index cd27c92699..b7e9727230 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c @@ -77,9 +77,7 @@ static void wvupdate (int32_t start_tick, rb->lcd_putsf(0, 6, "realtime: %d%% ", realtime); rb->lcd_putsf(0, 8, "compression: %d%% ", compression); -#ifdef HAVE_LCD_BITMAP rb->lcd_update(); -#endif } #define TEMP_SAMPLES 4096 @@ -102,9 +100,7 @@ static int wav2wv(const char *infile) rb->lcd_clear_display(); rb->lcd_puts_scroll(0, 0, (unsigned char *)infile); -#ifdef HAVE_LCD_BITMAP rb->lcd_update(); -#endif last_buttons = rb->button_status (); start_tick = *rb->current_tick; |