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 | |
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')
117 files changed, 67 insertions, 1376 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index d7cec53506..5335258f70 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -71,15 +71,11 @@ iap/iap-lingo7.c | |||
71 | #endif | 71 | #endif |
72 | #endif | 72 | #endif |
73 | screen_access.c | 73 | screen_access.c |
74 | #ifdef HAVE_LCD_BITMAP | ||
75 | gui/icon.c | 74 | gui/icon.c |
76 | #endif | ||
77 | gui/list.c | 75 | gui/list.c |
78 | gui/line.c | 76 | gui/line.c |
79 | #ifdef HAVE_LCD_BITMAP | ||
80 | gui/bitmap/list.c | 77 | gui/bitmap/list.c |
81 | gui/bitmap/list-skinned.c | 78 | gui/bitmap/list-skinned.c |
82 | #endif | ||
83 | gui/option_select.c | 79 | gui/option_select.c |
84 | #ifdef HAVE_PITCHCONTROL | 80 | #ifdef HAVE_PITCHCONTROL |
85 | gui/pitchscreen.c | 81 | gui/pitchscreen.c |
@@ -96,9 +92,7 @@ gui/wps.c | |||
96 | gui/scrollbar.c | 92 | gui/scrollbar.c |
97 | gui/splash.c | 93 | gui/splash.c |
98 | gui/statusbar.c | 94 | gui/statusbar.c |
99 | #ifdef HAVE_LCD_BITMAP | ||
100 | gui/statusbar-skinned.c | 95 | gui/statusbar-skinned.c |
101 | #endif | ||
102 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) | 96 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
103 | hosted/android/yesno.c | 97 | hosted/android/yesno.c |
104 | hosted/android/notification.c | 98 | hosted/android/notification.c |
@@ -121,7 +115,6 @@ gui/skin_engine/skin_touchsupport.c | |||
121 | gui/backdrop.c | 115 | gui/backdrop.c |
122 | #endif | 116 | #endif |
123 | 117 | ||
124 | #ifdef HAVE_LCD_BITMAP | ||
125 | recorder/bmp.c | 118 | recorder/bmp.c |
126 | recorder/icons.c | 119 | recorder/icons.c |
127 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) | 120 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
@@ -145,7 +138,7 @@ recorder/albumart.c | |||
145 | #ifdef HAVE_LCD_COLOR | 138 | #ifdef HAVE_LCD_COLOR |
146 | gui/color_picker.c | 139 | gui/color_picker.c |
147 | #endif | 140 | #endif |
148 | #endif | 141 | |
149 | #ifdef HAVE_RECORDING | 142 | #ifdef HAVE_RECORDING |
150 | recorder/recording.c | 143 | recorder/recording.c |
151 | #endif | 144 | #endif |
diff --git a/apps/action.c b/apps/action.c index 2aee56ee04..0c55227aac 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "config.h" | 26 | #include "config.h" |
27 | #include "lang.h" | 27 | #include "lang.h" |
28 | 28 | ||
29 | #if defined(HAVE_LCD_BITMAP) && !defined(BOOTLOADER) | 29 | #if !defined(BOOTLOADER) |
30 | #include "language.h" | 30 | #include "language.h" |
31 | #endif | 31 | #endif |
32 | 32 | ||
@@ -421,7 +421,7 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur | |||
421 | static inline void button_flip_horizontally(int context, int *button) | 421 | static inline void button_flip_horizontally(int context, int *button) |
422 | { | 422 | { |
423 | 423 | ||
424 | #if !defined(HAVE_LCD_BITMAP) || defined(BOOTLOADER) | 424 | #if defined(BOOTLOADER) |
425 | (void) context; | 425 | (void) context; |
426 | (void) *button; | 426 | (void) *button; |
427 | return; | 427 | return; |
@@ -473,7 +473,7 @@ static inline void button_flip_horizontally(int context, int *button) | |||
473 | #endif /* !SIMULATOR */ | 473 | #endif /* !SIMULATOR */ |
474 | 474 | ||
475 | *button = newbutton; | 475 | *button = newbutton; |
476 | #endif /* !HAVE_LCD_BITMAP | BOOTLOADER */ | 476 | #endif /* !BOOTLOADER */ |
477 | } /* button_flip_horizontally */ | 477 | } /* button_flip_horizontally */ |
478 | 478 | ||
479 | /********************************************************************** | 479 | /********************************************************************** |
diff --git a/apps/bitmaps/mono/SOURCES b/apps/bitmaps/mono/SOURCES index c0f72c023a..571a5a23a5 100644 --- a/apps/bitmaps/mono/SOURCES +++ b/apps/bitmaps/mono/SOURCES | |||
@@ -1,6 +1,4 @@ | |||
1 | #ifdef HAVE_LCD_BITMAP | ||
2 | default_icons.bmp | 1 | default_icons.bmp |
3 | #endif | ||
4 | 2 | ||
5 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) | 3 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) |
6 | osx_dummy.bmp | 4 | osx_dummy.bmp |
diff --git a/apps/bitmaps/native/SOURCES b/apps/bitmaps/native/SOURCES index f74f289214..8f42607a0c 100644 --- a/apps/bitmaps/native/SOURCES +++ b/apps/bitmaps/native/SOURCES | |||
@@ -1,5 +1,3 @@ | |||
1 | #ifdef HAVE_LCD_BITMAP | ||
2 | |||
3 | /* Rockbox logo */ | 1 | /* Rockbox logo */ |
4 | #if (LCD_DEPTH == 1) | 2 | #if (LCD_DEPTH == 1) |
5 | #if (LCD_WIDTH == 160) | 3 | #if (LCD_WIDTH == 160) |
@@ -81,5 +79,3 @@ usblogo.104x27x1.bmp | |||
81 | #endif | 79 | #endif |
82 | 80 | ||
83 | #endif /* BOOTLOADER */ | 81 | #endif /* BOOTLOADER */ |
84 | |||
85 | #endif /* HAVE_LCD_BITMAP */ | ||
diff --git a/apps/bitmaps/remote_mono/SOURCES b/apps/bitmaps/remote_mono/SOURCES index 41d85fccff..1c46288170 100644 --- a/apps/bitmaps/remote_mono/SOURCES +++ b/apps/bitmaps/remote_mono/SOURCES | |||
@@ -1,6 +1,4 @@ | |||
1 | #ifdef HAVE_LCD_BITMAP | ||
2 | remote_default_icons.bmp | 1 | remote_default_icons.bmp |
3 | #endif | ||
4 | 2 | ||
5 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) | 3 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) |
6 | osx_remote_dummy.bmp | 4 | osx_remote_dummy.bmp |
diff --git a/apps/bookmark.c b/apps/bookmark.c index 22dfad6cce..07751c2d4c 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -198,14 +198,8 @@ bool bookmark_autobookmark(bool prompt_ok) | |||
198 | case BOOKMARK_RECENT_ONLY_YES: | 198 | case BOOKMARK_RECENT_ONLY_YES: |
199 | return write_bookmark(false, bookmark); | 199 | return write_bookmark(false, bookmark); |
200 | } | 200 | } |
201 | #ifdef HAVE_LCD_BITMAP | ||
202 | const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY)}; | 201 | const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY)}; |
203 | const struct text_message message={lines, 1}; | 202 | const struct text_message message={lines, 1}; |
204 | #else | ||
205 | const char *lines[]={ID2P(LANG_AUTO_BOOKMARK_QUERY), | ||
206 | str(LANG_CONFIRM_WITH_BUTTON)}; | ||
207 | const struct text_message message={lines, 2}; | ||
208 | #endif | ||
209 | 203 | ||
210 | if(prompt_ok && gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) | 204 | if(prompt_ok && gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) |
211 | { | 205 | { |
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 39152185e5..a9180a70d4 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c | |||
@@ -482,7 +482,6 @@ bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_ | |||
482 | 482 | ||
483 | } | 483 | } |
484 | 484 | ||
485 | #ifdef HAVE_LCD_BITMAP | ||
486 | static inline void draw_veritcal_line_mark(struct screen * screen, | 485 | static inline void draw_veritcal_line_mark(struct screen * screen, |
487 | int x, int y, int h) | 486 | int x, int y, int h) |
488 | { | 487 | { |
@@ -498,7 +497,7 @@ void cue_draw_markers(struct screen *screen, struct cuesheet *cue, | |||
498 | { | 497 | { |
499 | int i,xi; | 498 | int i,xi; |
500 | unsigned long tracklen_seconds = tracklen/1000; /* duration in seconds */ | 499 | unsigned long tracklen_seconds = tracklen/1000; /* duration in seconds */ |
501 | 500 | ||
502 | for (i=1; i < cue->track_count; i++) | 501 | for (i=1; i < cue->track_count; i++) |
503 | { | 502 | { |
504 | /* Convert seconds prior to multiplication to avoid overflow. */ | 503 | /* Convert seconds prior to multiplication to avoid overflow. */ |
@@ -506,7 +505,6 @@ void cue_draw_markers(struct screen *screen, struct cuesheet *cue, | |||
506 | draw_veritcal_line_mark(screen, xi, y, h); | 505 | draw_veritcal_line_mark(screen, xi, y, h); |
507 | } | 506 | } |
508 | } | 507 | } |
509 | #endif | ||
510 | 508 | ||
511 | bool cuesheet_subtrack_changed(struct mp3entry *id3) | 509 | bool cuesheet_subtrack_changed(struct mp3entry *id3) |
512 | { | 510 | { |
diff --git a/apps/cuesheet.h b/apps/cuesheet.h index 0b9503a9bb..6885d21ef0 100644 --- a/apps/cuesheet.h +++ b/apps/cuesheet.h | |||
@@ -79,12 +79,10 @@ int cue_find_current_track(struct cuesheet *cue, unsigned long curpos); | |||
79 | /* skip to next track in the cuesheet towards "direction" (which is 1 or -1) */ | 79 | /* skip to next track in the cuesheet towards "direction" (which is 1 or -1) */ |
80 | bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos); | 80 | bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos); |
81 | 81 | ||
82 | #ifdef HAVE_LCD_BITMAP | ||
83 | /* draw track markers on the progressbar */ | 82 | /* draw track markers on the progressbar */ |
84 | void cue_draw_markers(struct screen *screen, struct cuesheet *cue, | 83 | void cue_draw_markers(struct screen *screen, struct cuesheet *cue, |
85 | unsigned long tracklen, | 84 | unsigned long tracklen, |
86 | int x, int y, int w, int h); | 85 | int x, int y, int w, int h); |
87 | #endif | ||
88 | 86 | ||
89 | /* check if the subtrack has changed */ | 87 | /* check if the subtrack has changed */ |
90 | bool cuesheet_subtrack_changed(struct mp3entry *id3); | 88 | bool cuesheet_subtrack_changed(struct mp3entry *id3); |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 92451f284c..e75fce6d32 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -80,11 +80,9 @@ | |||
80 | #include "radio.h" | 80 | #include "radio.h" |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #ifdef HAVE_LCD_BITMAP | ||
84 | #include "scrollbar.h" | 83 | #include "scrollbar.h" |
85 | #include "peakmeter.h" | 84 | #include "peakmeter.h" |
86 | #include "skin_engine/skin_engine.h" | 85 | #include "skin_engine/skin_engine.h" |
87 | #endif | ||
88 | #include "logfdisp.h" | 86 | #include "logfdisp.h" |
89 | #include "core_alloc.h" | 87 | #include "core_alloc.h" |
90 | #include "pcmbuf.h" | 88 | #include "pcmbuf.h" |
@@ -300,7 +298,6 @@ static bool dbg_cpuinfo(void) | |||
300 | 298 | ||
301 | #endif | 299 | #endif |
302 | 300 | ||
303 | #ifdef HAVE_LCD_BITMAP | ||
304 | static unsigned int ticks, freq_sum; | 301 | static unsigned int ticks, freq_sum; |
305 | #ifndef CPU_MULTI_FREQUENCY | 302 | #ifndef CPU_MULTI_FREQUENCY |
306 | static unsigned int boost_ticks; | 303 | static unsigned int boost_ticks; |
@@ -442,7 +439,6 @@ static bool dbg_buffering_thread(void) | |||
442 | 439 | ||
443 | return false; | 440 | return false; |
444 | } | 441 | } |
445 | #endif /* HAVE_LCD_BITMAP */ | ||
446 | 442 | ||
447 | static const char* bf_getname(int selected_item, void *data, | 443 | static const char* bf_getname(int selected_item, void *data, |
448 | char *buffer, size_t buffer_len) | 444 | char *buffer, size_t buffer_len) |
@@ -688,9 +684,7 @@ static bool dbg_pcf(void) | |||
688 | { | 684 | { |
689 | int line; | 685 | int line; |
690 | 686 | ||
691 | #ifdef HAVE_LCD_BITMAP | ||
692 | lcd_setfont(FONT_SYSFIXED); | 687 | lcd_setfont(FONT_SYSFIXED); |
693 | #endif | ||
694 | lcd_clear_display(); | 688 | lcd_clear_display(); |
695 | 689 | ||
696 | while(1) | 690 | while(1) |
@@ -731,9 +725,7 @@ static bool dbg_cpufreq(void) | |||
731 | int x = 0; | 725 | int x = 0; |
732 | bool done = false; | 726 | bool done = false; |
733 | 727 | ||
734 | #ifdef HAVE_LCD_BITMAP | ||
735 | lcd_setfont(FONT_SYSFIXED); | 728 | lcd_setfont(FONT_SYSFIXED); |
736 | #endif | ||
737 | lcd_clear_display(); | 729 | lcd_clear_display(); |
738 | 730 | ||
739 | while(!done) | 731 | while(!done) |
@@ -838,7 +830,7 @@ static bool tsc2100_debug(void) | |||
838 | return simplelist_show_list(&info); | 830 | return simplelist_show_list(&info); |
839 | } | 831 | } |
840 | #endif | 832 | #endif |
841 | #if (CONFIG_BATTERY_MEASURE != 0) && defined(HAVE_LCD_BITMAP) && !defined(SIMULATOR) | 833 | #if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR) |
842 | /* | 834 | /* |
843 | * view_battery() shows a automatically scaled graph of the battery voltage | 835 | * view_battery() shows a automatically scaled graph of the battery voltage |
844 | * over time. Usable for estimating battery life / charging rate. | 836 | * over time. Usable for estimating battery life / charging rate. |
@@ -1165,7 +1157,7 @@ static bool view_battery(void) | |||
1165 | return false; | 1157 | return false; |
1166 | } | 1158 | } |
1167 | 1159 | ||
1168 | #endif /* (CONFIG_BATTERY_MEASURE != 0) && HAVE_LCD_BITMAP */ | 1160 | #endif /* (CONFIG_BATTERY_MEASURE != 0) */ |
1169 | 1161 | ||
1170 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 1162 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
1171 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) | 1163 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
@@ -2103,7 +2095,7 @@ static bool dbg_fm_radio(void) | |||
2103 | #endif /* CONFIG_TUNER */ | 2095 | #endif /* CONFIG_TUNER */ |
2104 | #endif /* !SIMULATOR */ | 2096 | #endif /* !SIMULATOR */ |
2105 | 2097 | ||
2106 | #if defined(HAVE_LCD_BITMAP) && !defined(APPLICATION) | 2098 | #if !defined(APPLICATION) |
2107 | extern bool do_screendump_instead_of_usb; | 2099 | extern bool do_screendump_instead_of_usb; |
2108 | 2100 | ||
2109 | static bool dbg_screendump(void) | 2101 | static bool dbg_screendump(void) |
@@ -2112,7 +2104,7 @@ static bool dbg_screendump(void) | |||
2112 | splashf(HZ, "Screendump %sabled", do_screendump_instead_of_usb?"en":"dis"); | 2104 | splashf(HZ, "Screendump %sabled", do_screendump_instead_of_usb?"en":"dis"); |
2113 | return false; | 2105 | return false; |
2114 | } | 2106 | } |
2115 | #endif /* HAVE_LCD_BITMAP */ | 2107 | #endif /* !APPLICATION */ |
2116 | 2108 | ||
2117 | extern bool write_metadata_log; | 2109 | extern bool write_metadata_log; |
2118 | 2110 | ||
@@ -2397,7 +2389,6 @@ static bool dbg_pic(void) | |||
2397 | } | 2389 | } |
2398 | #endif | 2390 | #endif |
2399 | 2391 | ||
2400 | #ifdef HAVE_LCD_BITMAP | ||
2401 | static bool dbg_skin_engine(void) | 2392 | static bool dbg_skin_engine(void) |
2402 | { | 2393 | { |
2403 | struct simplelist_info info; | 2394 | struct simplelist_info info; |
@@ -2451,7 +2442,6 @@ static bool dbg_skin_engine(void) | |||
2451 | #endif | 2442 | #endif |
2452 | return simplelist_show_list(&info); | 2443 | return simplelist_show_list(&info); |
2453 | } | 2444 | } |
2454 | #endif | ||
2455 | 2445 | ||
2456 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) | 2446 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) |
2457 | static bool dbg_boot_data(void) | 2447 | static bool dbg_boot_data(void) |
@@ -2528,7 +2518,6 @@ static const struct { | |||
2528 | #ifdef __linux__ | 2518 | #ifdef __linux__ |
2529 | { "View CPU stats", dbg_cpuinfo }, | 2519 | { "View CPU stats", dbg_cpuinfo }, |
2530 | #endif | 2520 | #endif |
2531 | #ifdef HAVE_LCD_BITMAP | ||
2532 | #if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR) | 2521 | #if (CONFIG_BATTERY_MEASURE != 0) && !defined(SIMULATOR) |
2533 | { "View battery", view_battery }, | 2522 | { "View battery", view_battery }, |
2534 | #endif | 2523 | #endif |
@@ -2536,7 +2525,6 @@ static const struct { | |||
2536 | { "Screendump", dbg_screendump }, | 2525 | { "Screendump", dbg_screendump }, |
2537 | #endif | 2526 | #endif |
2538 | { "Skin Engine RAM usage", dbg_skin_engine }, | 2527 | { "Skin Engine RAM usage", dbg_skin_engine }, |
2539 | #endif | ||
2540 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || (defined(SONY_NWZ_LINUX) && !defined(SIMULATOR)) | 2528 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || (defined(SONY_NWZ_LINUX) && !defined(SIMULATOR)) |
2541 | { "View HW info", dbg_hw_info }, | 2529 | { "View HW info", dbg_hw_info }, |
2542 | #endif | 2530 | #endif |
@@ -2559,12 +2547,10 @@ static const struct { | |||
2559 | #ifdef HAVE_TAGCACHE | 2547 | #ifdef HAVE_TAGCACHE |
2560 | { "View database info", dbg_tagcache_info }, | 2548 | { "View database info", dbg_tagcache_info }, |
2561 | #endif | 2549 | #endif |
2562 | #ifdef HAVE_LCD_BITMAP | ||
2563 | { "View buffering thread", dbg_buffering_thread }, | 2550 | { "View buffering thread", dbg_buffering_thread }, |
2564 | #ifdef PM_DEBUG | 2551 | #ifdef PM_DEBUG |
2565 | { "pm histogram", peak_meter_histogram}, | 2552 | { "pm histogram", peak_meter_histogram}, |
2566 | #endif /* PM_DEBUG */ | 2553 | #endif /* PM_DEBUG */ |
2567 | #endif /* HAVE_LCD_BITMAP */ | ||
2568 | { "View buflib allocs", dbg_buflib_allocs }, | 2554 | { "View buflib allocs", dbg_buflib_allocs }, |
2569 | #ifndef SIMULATOR | 2555 | #ifndef SIMULATOR |
2570 | #if CONFIG_TUNER | 2556 | #if CONFIG_TUNER |
diff --git a/apps/features.txt b/apps/features.txt index 657b799345..7d88cb88c3 100644 --- a/apps/features.txt +++ b/apps/features.txt | |||
@@ -60,9 +60,7 @@ hold_button | |||
60 | hotkey | 60 | hotkey |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #if defined(HAVE_LCD_BITMAP) | ||
64 | lcd_bitmap | 63 | lcd_bitmap |
65 | #endif | ||
66 | 64 | ||
67 | #if LCD_DEPTH > 1 | 65 | #if LCD_DEPTH > 1 |
68 | lcd_non-mono | 66 | lcd_non-mono |
diff --git a/apps/filetree.c b/apps/filetree.c index e45348dc18..d645b7225c 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -44,9 +44,7 @@ | |||
44 | #include "filetree.h" | 44 | #include "filetree.h" |
45 | #include "misc.h" | 45 | #include "misc.h" |
46 | #include "strnatcmp.h" | 46 | #include "strnatcmp.h" |
47 | #ifdef HAVE_LCD_BITMAP | ||
48 | #include "keyboard.h" | 47 | #include "keyboard.h" |
49 | #endif | ||
50 | 48 | ||
51 | #if CONFIG_TUNER | 49 | #if CONFIG_TUNER |
52 | #include "radio.h" | 50 | #include "radio.h" |
@@ -339,13 +337,11 @@ int ft_load(struct tree_context* c, const char* tempdir) | |||
339 | (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) || | 337 | (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) || |
340 | (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) || | 338 | (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) || |
341 | (*c->dirfilter == SHOW_WPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_WPS) || | 339 | (*c->dirfilter == SHOW_WPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_WPS) || |
342 | #ifdef HAVE_LCD_BITMAP | ||
343 | (*c->dirfilter == SHOW_FONT && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FONT) || | 340 | (*c->dirfilter == SHOW_FONT && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FONT) || |
344 | (*c->dirfilter == SHOW_SBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_SBS) || | 341 | (*c->dirfilter == SHOW_SBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_SBS) || |
345 | #if CONFIG_TUNER | 342 | #if CONFIG_TUNER |
346 | (*c->dirfilter == SHOW_FMS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FMS) || | 343 | (*c->dirfilter == SHOW_FMS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_FMS) || |
347 | #endif | 344 | #endif |
348 | #endif | ||
349 | #ifdef HAVE_REMOTE_LCD | 345 | #ifdef HAVE_REMOTE_LCD |
350 | (*c->dirfilter == SHOW_RWPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RWPS) || | 346 | (*c->dirfilter == SHOW_RWPS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RWPS) || |
351 | (*c->dirfilter == SHOW_RSBS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_RSBS) || | 347 | (*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) | |||
399 | tree_unlock_cache(c); | 395 | tree_unlock_cache(c); |
400 | return 0; | 396 | return 0; |
401 | } | 397 | } |
402 | #ifdef HAVE_LCD_BITMAP | ||
403 | static void ft_load_font(char *file) | 398 | static void ft_load_font(char *file) |
404 | { | 399 | { |
405 | int current_font_id; | 400 | int current_font_id; |
@@ -428,8 +423,7 @@ static void ft_load_font(char *file) | |||
428 | screens[screen].setuifont( | 423 | screens[screen].setuifont( |
429 | font_load_ex(file,0,global_settings.glyphs_to_cache)); | 424 | font_load_ex(file,0,global_settings.glyphs_to_cache)); |
430 | viewportmanager_theme_changed(THEME_UI_VIEWPORT); | 425 | viewportmanager_theme_changed(THEME_UI_VIEWPORT); |
431 | } | 426 | } |
432 | #endif | ||
433 | 427 | ||
434 | int ft_enter(struct tree_context* c) | 428 | int ft_enter(struct tree_context* c) |
435 | { | 429 | { |
@@ -550,13 +544,11 @@ int ft_enter(struct tree_context* c) | |||
550 | #endif | 544 | #endif |
551 | #endif | 545 | #endif |
552 | 546 | ||
553 | #ifdef HAVE_LCD_BITMAP | ||
554 | case FILE_ATTR_SBS: | 547 | case FILE_ATTR_SBS: |
555 | splash(0, ID2P(LANG_WAIT)); | 548 | splash(0, ID2P(LANG_WAIT)); |
556 | set_file(buf, (char *)global_settings.sbs_file, MAX_FILENAME); | 549 | set_file(buf, (char *)global_settings.sbs_file, MAX_FILENAME); |
557 | settings_apply_skins(); | 550 | settings_apply_skins(); |
558 | break; | 551 | break; |
559 | #endif | ||
560 | #ifdef HAVE_REMOTE_LCD | 552 | #ifdef HAVE_REMOTE_LCD |
561 | case FILE_ATTR_RSBS: | 553 | case FILE_ATTR_RSBS: |
562 | splash(0, ID2P(LANG_WAIT)); | 554 | splash(0, ID2P(LANG_WAIT)); |
@@ -610,7 +602,6 @@ int ft_enter(struct tree_context* c) | |||
610 | splash(HZ, ID2P(LANG_LANGUAGE_LOADED)); | 602 | splash(HZ, ID2P(LANG_LANGUAGE_LOADED)); |
611 | break; | 603 | break; |
612 | 604 | ||
613 | #ifdef HAVE_LCD_BITMAP | ||
614 | case FILE_ATTR_FONT: | 605 | case FILE_ATTR_FONT: |
615 | ft_load_font(buf); | 606 | ft_load_font(buf); |
616 | break; | 607 | break; |
@@ -621,7 +612,6 @@ int ft_enter(struct tree_context* c) | |||
621 | splash(HZ, ID2P(LANG_KEYBOARD_LOADED)); | 612 | splash(HZ, ID2P(LANG_KEYBOARD_LOADED)); |
622 | set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); | 613 | set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); |
623 | break; | 614 | break; |
624 | #endif | ||
625 | 615 | ||
626 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 616 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
627 | /* firmware file */ | 617 | /* firmware file */ |
diff --git a/apps/filetypes.c b/apps/filetypes.c index 9abcfec884..39fb2c5b32 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -43,11 +43,7 @@ | |||
43 | /* max filetypes (plugins & icons stored here) */ | 43 | /* max filetypes (plugins & icons stored here) */ |
44 | #define MAX_FILETYPES 192 | 44 | #define MAX_FILETYPES 192 |
45 | /* max viewer plugins */ | 45 | /* max viewer plugins */ |
46 | #ifdef HAVE_LCD_BITMAP | ||
47 | #define MAX_VIEWERS 56 | 46 | #define MAX_VIEWERS 56 |
48 | #else | ||
49 | #define MAX_VIEWERS 24 | ||
50 | #endif | ||
51 | 47 | ||
52 | /* a table for the known file types */ | 48 | /* a table for the known file types */ |
53 | static const struct filetype inbuilt_filetypes[] = { | 49 | static const struct filetype inbuilt_filetypes[] = { |
@@ -129,15 +125,11 @@ static const struct filetype inbuilt_filetypes[] = { | |||
129 | { "lng", FILE_ATTR_LNG, Icon_Language, LANG_LANGUAGE }, | 125 | { "lng", FILE_ATTR_LNG, Icon_Language, LANG_LANGUAGE }, |
130 | { "rock",FILE_ATTR_ROCK,Icon_Plugin, VOICE_EXT_ROCK }, | 126 | { "rock",FILE_ATTR_ROCK,Icon_Plugin, VOICE_EXT_ROCK }, |
131 | { "lua", FILE_ATTR_LUA, Icon_Plugin, VOICE_EXT_ROCK }, | 127 | { "lua", FILE_ATTR_LUA, Icon_Plugin, VOICE_EXT_ROCK }, |
132 | #ifdef HAVE_LCD_BITMAP | ||
133 | { "fnt", FILE_ATTR_FONT,Icon_Font, VOICE_EXT_FONT }, | 128 | { "fnt", FILE_ATTR_FONT,Icon_Font, VOICE_EXT_FONT }, |
134 | { "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD }, | 129 | { "kbd", FILE_ATTR_KBD, Icon_Keyboard, VOICE_EXT_KBD }, |
135 | #endif | ||
136 | { "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK }, | 130 | { "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK }, |
137 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, | 131 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, |
138 | #ifdef HAVE_LCD_BITMAP | ||
139 | { "sbs", FILE_ATTR_SBS, Icon_Wps, VOICE_EXT_SBS }, | 132 | { "sbs", FILE_ATTR_SBS, Icon_Wps, VOICE_EXT_SBS }, |
140 | #endif | ||
141 | #ifdef HAVE_REMOTE_LCD | 133 | #ifdef HAVE_REMOTE_LCD |
142 | { "rsbs", FILE_ATTR_RSBS, Icon_Wps, VOICE_EXT_RSBS }, | 134 | { "rsbs", FILE_ATTR_RSBS, Icon_Wps, VOICE_EXT_RSBS }, |
143 | #if CONFIG_TUNER | 135 | #if CONFIG_TUNER |
@@ -289,7 +281,6 @@ void read_color_theme_file(void) { | |||
289 | close(fd); | 281 | close(fd); |
290 | } | 282 | } |
291 | #endif | 283 | #endif |
292 | #ifdef HAVE_LCD_BITMAP | ||
293 | void read_viewer_theme_file(void) | 284 | void read_viewer_theme_file(void) |
294 | { | 285 | { |
295 | char buffer[MAX_PATH]; | 286 | char buffer[MAX_PATH]; |
@@ -340,7 +331,6 @@ void read_viewer_theme_file(void) | |||
340 | close(fd); | 331 | close(fd); |
341 | custom_icons_loaded = true; | 332 | custom_icons_loaded = true; |
342 | } | 333 | } |
343 | #endif | ||
344 | 334 | ||
345 | void filetype_init(void) | 335 | void filetype_init(void) |
346 | { | 336 | { |
@@ -368,9 +358,7 @@ void filetype_init(void) | |||
368 | read_builtin_types(); | 358 | read_builtin_types(); |
369 | read_config(fd); | 359 | read_config(fd); |
370 | close(fd); | 360 | close(fd); |
371 | #ifdef HAVE_LCD_BITMAP | ||
372 | read_viewer_theme_file(); | 361 | read_viewer_theme_file(); |
373 | #endif | ||
374 | #ifdef HAVE_LCD_COLOR | 362 | #ifdef HAVE_LCD_COLOR |
375 | read_color_theme_file(); | 363 | read_color_theme_file(); |
376 | #endif | 364 | #endif |
diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index d6b868ae26..f0396263f3 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c | |||
@@ -236,7 +236,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
236 | int cols = (parent->width / listcfg[screen]->width); | 236 | int cols = (parent->width / listcfg[screen]->width); |
237 | current_column = (cur_line)%cols; | 237 | current_column = (cur_line)%cols; |
238 | current_row = (cur_line)/cols; | 238 | current_row = (cur_line)/cols; |
239 | 239 | ||
240 | skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x; | 240 | skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x; |
241 | skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y; | 241 | skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y; |
242 | } | 242 | } |
@@ -249,7 +249,6 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
249 | (listcfg[screen]->height*cur_line); | 249 | (listcfg[screen]->height*cur_line); |
250 | } | 250 | } |
251 | display->set_viewport(&skin_viewport->vp); | 251 | display->set_viewport(&skin_viewport->vp); |
252 | #ifdef HAVE_LCD_BITMAP | ||
253 | /* Set images to not to be displayed */ | 252 | /* Set images to not to be displayed */ |
254 | struct skin_token_list *imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), wps.data->images); | 253 | struct skin_token_list *imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), wps.data->images); |
255 | while (imglist) | 254 | while (imglist) |
@@ -259,13 +258,10 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) | |||
259 | img->display = -1; | 258 | img->display = -1; |
260 | imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), imglist->next); | 259 | imglist = SKINOFFSETTOPTR(get_skin_buffer(wps.data), imglist->next); |
261 | } | 260 | } |
262 | #endif | ||
263 | struct skin_element** children = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->children); | 261 | struct skin_element** children = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->children); |
264 | skin_render_viewport(SKINOFFSETTOPTR(get_skin_buffer(wps.data), (intptr_t)children[0]), | 262 | skin_render_viewport(SKINOFFSETTOPTR(get_skin_buffer(wps.data), (intptr_t)children[0]), |
265 | &wps, skin_viewport, SKIN_REFRESH_ALL); | 263 | &wps, skin_viewport, SKIN_REFRESH_ALL); |
266 | #ifdef HAVE_LCD_BITMAP | ||
267 | wps_display_images(&wps, &skin_viewport->vp); | 264 | wps_display_images(&wps, &skin_viewport->vp); |
268 | #endif | ||
269 | /* force disableing scroll because it breaks later */ | 265 | /* force disableing scroll because it breaks later */ |
270 | if (!is_selected) | 266 | if (!is_selected) |
271 | { | 267 | { |
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index db3ae2c96b..5190c54ea5 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c | |||
@@ -144,11 +144,7 @@ void screen_put_iconxy(struct screen * display, | |||
144 | 144 | ||
145 | void screen_put_cursorxy(struct screen * display, int x, int y, bool on) | 145 | void screen_put_cursorxy(struct screen * display, int x, int y, bool on) |
146 | { | 146 | { |
147 | #ifdef HAVE_LCD_BITMAP | ||
148 | screen_put_icon(display, x, y, on?Icon_Cursor:0); | 147 | screen_put_icon(display, x, y, on?Icon_Cursor:0); |
149 | #else | ||
150 | screen_put_icon(display, x, y, on?CURSOR_CHAR:-1); | ||
151 | #endif | ||
152 | } | 148 | } |
153 | 149 | ||
154 | static int buflib_move_callback(int handle, void* current, void* new) | 150 | static int buflib_move_callback(int handle, void* current, void* new) |
diff --git a/apps/gui/icon.h b/apps/gui/icon.h index 88449c61ca..4165391316 100644 --- a/apps/gui/icon.h +++ b/apps/gui/icon.h | |||
@@ -24,11 +24,7 @@ | |||
24 | #include "screen_access.h" | 24 | #include "screen_access.h" |
25 | /* Defines a type for the icons since it's not the same thing on | 25 | /* Defines a type for the icons since it's not the same thing on |
26 | * char-based displays and bitmap displays */ | 26 | * char-based displays and bitmap displays */ |
27 | #ifdef HAVE_LCD_BITMAP | ||
28 | typedef const unsigned char * ICON; | 27 | typedef const unsigned char * ICON; |
29 | #else | ||
30 | typedef long ICON; | ||
31 | #endif | ||
32 | 28 | ||
33 | /* Don't #ifdef icon values, or we wont be able to use the same | 29 | /* Don't #ifdef icon values, or we wont be able to use the same |
34 | bmp for every target. */ | 30 | bmp for every target. */ |
diff --git a/apps/gui/line.c b/apps/gui/line.c index ea6bcea93b..d319ff3c51 100644 --- a/apps/gui/line.c +++ b/apps/gui/line.c | |||
@@ -294,7 +294,6 @@ next: | |||
294 | } | 294 | } |
295 | } | 295 | } |
296 | 296 | ||
297 | #ifdef HAVE_LCD_BITMAP | ||
298 | static void style_line(struct screen *display, | 297 | static void style_line(struct screen *display, |
299 | int x, int y, struct line_desc *line) | 298 | int x, int y, struct line_desc *line) |
300 | { | 299 | { |
@@ -380,7 +379,6 @@ static void style_line(struct screen *display, | |||
380 | } | 379 | } |
381 | #endif | 380 | #endif |
382 | } | 381 | } |
383 | #endif /* HAVE_LCD_BITMAP */ | ||
384 | 382 | ||
385 | void vput_line(struct screen *display, | 383 | void vput_line(struct screen *display, |
386 | int x, int y, struct line_desc *line, | 384 | int x, int y, struct line_desc *line, |
diff --git a/apps/gui/list.c b/apps/gui/list.c index b1120aa794..ee4684233f 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -47,17 +47,14 @@ | |||
47 | */ | 47 | */ |
48 | #define FRAMEDROP_TRIGGER 6 | 48 | #define FRAMEDROP_TRIGGER 6 |
49 | 49 | ||
50 | #ifdef HAVE_LCD_BITMAP | ||
51 | static int offset_step = 16; /* pixels per screen scroll step */ | 50 | static int offset_step = 16; /* pixels per screen scroll step */ |
52 | /* should lines scroll out of the screen */ | 51 | /* should lines scroll out of the screen */ |
53 | static bool offset_out_of_view = false; | 52 | static bool offset_out_of_view = false; |
54 | #endif | ||
55 | 53 | ||
56 | static void gui_list_select_at_offset(struct gui_synclist * gui_list, | 54 | static void gui_list_select_at_offset(struct gui_synclist * gui_list, |
57 | int offset); | 55 | int offset); |
58 | void list_draw(struct screen *display, struct gui_synclist *list); | 56 | void list_draw(struct screen *display, struct gui_synclist *list); |
59 | 57 | ||
60 | #ifdef HAVE_LCD_BITMAP | ||
61 | static long last_dirty_tick; | 58 | static long last_dirty_tick; |
62 | static struct viewport parent[NB_SCREENS]; | 59 | static struct viewport parent[NB_SCREENS]; |
63 | 60 | ||
@@ -92,23 +89,7 @@ static void list_init_viewports(struct gui_synclist *list) | |||
92 | } | 89 | } |
93 | list->dirty_tick = current_tick; | 90 | list->dirty_tick = current_tick; |
94 | } | 91 | } |
95 | #else | ||
96 | static struct viewport parent[NB_SCREENS] = | ||
97 | { | ||
98 | [SCREEN_MAIN] = | ||
99 | { | ||
100 | .x = 0, | ||
101 | .y = 0, | ||
102 | .width = LCD_WIDTH, | ||
103 | .height = LCD_HEIGHT | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | #define list_init_viewports(a) | ||
108 | #define list_is_dirty(a) false | ||
109 | #endif | ||
110 | 92 | ||
111 | #ifdef HAVE_LCD_BITMAP | ||
112 | static int list_nb_lines(struct gui_synclist *list, enum screen_type screen) | 93 | static int list_nb_lines(struct gui_synclist *list, enum screen_type screen) |
113 | { | 94 | { |
114 | struct viewport *vp = list->parent[screen]; | 95 | struct viewport *vp = list->parent[screen]; |
@@ -148,13 +129,6 @@ void list_init_item_height(struct gui_synclist *list, enum screen_type screen) | |||
148 | #endif | 129 | #endif |
149 | } | 130 | } |
150 | 131 | ||
151 | #else | ||
152 | #define list_display_title(l, i) false | ||
153 | #define list_get_nb_lines(list, screen) \ | ||
154 | viewport_get_nb_lines((list)->parent[(screen)]); | ||
155 | #define list_init_item_height(l, i) | ||
156 | #endif | ||
157 | |||
158 | /* | 132 | /* |
159 | * Initializes a scrolling list | 133 | * Initializes a scrolling list |
160 | * - gui_list : the list structure to initialize | 134 | * - gui_list : the list structure to initialize |
@@ -181,9 +155,7 @@ void gui_synclist_init(struct gui_synclist * gui_list, | |||
181 | FOR_NB_SCREENS(i) | 155 | FOR_NB_SCREENS(i) |
182 | { | 156 | { |
183 | gui_list->start_item[i] = 0; | 157 | gui_list->start_item[i] = 0; |
184 | #ifdef HAVE_LCD_BITMAP | ||
185 | gui_list->offset_position[i] = 0; | 158 | gui_list->offset_position[i] = 0; |
186 | #endif | ||
187 | if (list_parent) | 159 | if (list_parent) |
188 | gui_list->parent[i] = &list_parent[i]; | 160 | gui_list->parent[i] = &list_parent[i]; |
189 | else | 161 | else |
@@ -216,7 +188,6 @@ void gui_synclist_hide_selection_marker(struct gui_synclist * lists, bool hide) | |||
216 | } | 188 | } |
217 | 189 | ||
218 | 190 | ||
219 | #ifdef HAVE_LCD_BITMAP | ||
220 | int gui_list_get_item_offset(struct gui_synclist * gui_list, | 191 | int gui_list_get_item_offset(struct gui_synclist * gui_list, |
221 | int item_width, | 192 | int item_width, |
222 | int text_pos, | 193 | int text_pos, |
@@ -248,7 +219,6 @@ int gui_list_get_item_offset(struct gui_synclist * gui_list, | |||
248 | 219 | ||
249 | return item_offset; | 220 | return item_offset; |
250 | } | 221 | } |
251 | #endif | ||
252 | 222 | ||
253 | /* | 223 | /* |
254 | * Force a full screen update. | 224 | * Force a full screen update. |
@@ -264,9 +234,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list) | |||
264 | } | 234 | } |
265 | FOR_NB_SCREENS(i) | 235 | FOR_NB_SCREENS(i) |
266 | { | 236 | { |
267 | #ifdef HAVE_LCD_BITMAP | ||
268 | if (!skinlist_draw(&screens[i], gui_list)) | 237 | if (!skinlist_draw(&screens[i], gui_list)) |
269 | #endif | ||
270 | list_draw(&screens[i], gui_list); | 238 | list_draw(&screens[i], gui_list); |
271 | } | 239 | } |
272 | } | 240 | } |
@@ -481,7 +449,6 @@ void gui_synclist_del_item(struct gui_synclist * gui_list) | |||
481 | } | 449 | } |
482 | } | 450 | } |
483 | 451 | ||
484 | #ifdef HAVE_LCD_BITMAP | ||
485 | void gui_list_screen_scroll_step(int ofs) | 452 | void gui_list_screen_scroll_step(int ofs) |
486 | { | 453 | { |
487 | offset_step = ofs; | 454 | offset_step = ofs; |
@@ -491,7 +458,6 @@ void gui_list_screen_scroll_out_of_view(bool enable) | |||
491 | { | 458 | { |
492 | offset_out_of_view = enable; | 459 | offset_out_of_view = enable; |
493 | } | 460 | } |
494 | #endif /* HAVE_LCD_BITMAP */ | ||
495 | 461 | ||
496 | /* | 462 | /* |
497 | * Set the title and title icon of the list. Setting title to NULL disables | 463 | * 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, | |||
502 | { | 468 | { |
503 | gui_list->title = title; | 469 | gui_list->title = title; |
504 | gui_list->title_icon = icon; | 470 | gui_list->title_icon = icon; |
505 | #ifdef HAVE_LCD_BITMAP | ||
506 | FOR_NB_SCREENS(i) | 471 | FOR_NB_SCREENS(i) |
507 | sb_set_title_text(title, icon, i); | 472 | sb_set_title_text(title, icon, i); |
508 | #endif | ||
509 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); | 473 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); |
510 | } | 474 | } |
511 | 475 | ||
512 | void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items) | 476 | void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items) |
513 | { | 477 | { |
514 | lists->nb_items = nb_items; | 478 | lists->nb_items = nb_items; |
515 | #ifdef HAVE_LCD_BITMAP | ||
516 | FOR_NB_SCREENS(i) | 479 | FOR_NB_SCREENS(i) |
517 | { | 480 | { |
518 | lists->offset_position[i] = 0; | 481 | lists->offset_position[i] = 0; |
519 | } | 482 | } |
520 | #endif | ||
521 | } | 483 | } |
522 | int gui_synclist_get_nb_items(struct gui_synclist * lists) | 484 | int gui_synclist_get_nb_items(struct gui_synclist * lists) |
523 | { | 485 | { |
@@ -576,7 +538,6 @@ void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll) | |||
576 | lists->limit_scroll = scroll; | 538 | lists->limit_scroll = scroll; |
577 | } | 539 | } |
578 | 540 | ||
579 | #ifdef HAVE_LCD_BITMAP | ||
580 | /* | 541 | /* |
581 | * Makes all the item in the list scroll by one step to the right. | 542 | * Makes all the item in the list scroll by one step to the right. |
582 | * Should stop increasing the value when reaching the widest item value | 543 | * 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) | |||
608 | lists->offset_position[i] = 0; | 569 | lists->offset_position[i] = 0; |
609 | } | 570 | } |
610 | } | 571 | } |
611 | #endif /* HAVE_LCD_BITMAP */ | ||
612 | 572 | ||
613 | bool gui_synclist_keyclick_callback(int action, void* data) | 573 | bool gui_synclist_keyclick_callback(int action, void* data) |
614 | { | 574 | { |
@@ -652,9 +612,7 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
652 | int *actionptr, enum list_wrap wrap) | 612 | int *actionptr, enum list_wrap wrap) |
653 | { | 613 | { |
654 | int action = *actionptr; | 614 | int action = *actionptr; |
655 | #ifdef HAVE_LCD_BITMAP | ||
656 | static bool pgleft_allow_cancel = false; | 615 | static bool pgleft_allow_cancel = false; |
657 | #endif | ||
658 | 616 | ||
659 | #ifdef HAVE_WHEEL_ACCELERATION | 617 | #ifdef HAVE_WHEEL_ACCELERATION |
660 | int next_item_modifier = button_apply_acceleration(get_action_data()); | 618 | int next_item_modifier = button_apply_acceleration(get_action_data()); |
@@ -753,7 +711,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
753 | *actionptr = ACTION_STD_NEXT; | 711 | *actionptr = ACTION_STD_NEXT; |
754 | return true; | 712 | return true; |
755 | 713 | ||
756 | #ifdef HAVE_LCD_BITMAP | ||
757 | case ACTION_TREE_PGRIGHT: | 714 | case ACTION_TREE_PGRIGHT: |
758 | gui_synclist_scroll_right(lists); | 715 | gui_synclist_scroll_right(lists); |
759 | gui_synclist_draw(lists); | 716 | gui_synclist_draw(lists); |
@@ -784,7 +741,6 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
784 | pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT | 741 | pgleft_allow_cancel = false; /* stop ACTION_TREE_PAGE_LEFT |
785 | skipping to root */ | 742 | skipping to root */ |
786 | return true; | 743 | return true; |
787 | #endif | ||
788 | /* for pgup / pgdown, we are obliged to have a different behaviour depending | 744 | /* for pgup / pgdown, we are obliged to have a different behaviour depending |
789 | * on the screen for which the user pressed the key since for example, remote | 745 | * on the screen for which the user pressed the key since for example, remote |
790 | * and main screen doesn't have the same number of lines */ | 746 | * and main screen doesn't have the same number of lines */ |
diff --git a/apps/gui/list.h b/apps/gui/list.h index 9107bf0591..f860e27bf9 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -102,9 +102,7 @@ struct gui_synclist | |||
102 | int selected_size; | 102 | int selected_size; |
103 | /* the number of pixels each line occupies (including optional padding on touchscreen */ | 103 | /* the number of pixels each line occupies (including optional padding on touchscreen */ |
104 | int line_height[NB_SCREENS]; | 104 | int line_height[NB_SCREENS]; |
105 | #ifdef HAVE_LCD_BITMAP | ||
106 | int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */ | 105 | int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */ |
107 | #endif | ||
108 | long scheduled_talk_tick, last_talked_tick, dirty_tick; | 106 | long scheduled_talk_tick, last_talked_tick, dirty_tick; |
109 | 107 | ||
110 | list_get_icon *callback_get_item_icon; | 108 | list_get_icon *callback_get_item_icon; |
@@ -127,14 +125,12 @@ struct gui_synclist | |||
127 | }; | 125 | }; |
128 | 126 | ||
129 | 127 | ||
130 | #ifdef HAVE_LCD_BITMAP | ||
131 | extern void list_init(void); | 128 | extern void list_init(void); |
132 | /* parse global setting to static int */ | 129 | /* parse global setting to static int */ |
133 | extern void gui_list_screen_scroll_step(int ofs); | 130 | extern void gui_list_screen_scroll_step(int ofs); |
134 | 131 | ||
135 | /* parse global setting to static bool */ | 132 | /* parse global setting to static bool */ |
136 | extern void gui_list_screen_scroll_out_of_view(bool enable); | 133 | extern void gui_list_screen_scroll_out_of_view(bool enable); |
137 | #endif /* HAVE_LCD_BITMAP */ | ||
138 | 134 | ||
139 | extern void gui_synclist_init( | 135 | extern void gui_synclist_init( |
140 | struct gui_synclist * lists, | 136 | struct gui_synclist * lists, |
@@ -179,7 +175,7 @@ extern bool gui_synclist_keyclick_callback(int action, void* data); | |||
179 | extern bool gui_synclist_do_button(struct gui_synclist * lists, | 175 | extern bool gui_synclist_do_button(struct gui_synclist * lists, |
180 | int *action, | 176 | int *action, |
181 | enum list_wrap); | 177 | enum list_wrap); |
182 | #if defined(HAVE_LCD_BITMAP) && !defined(PLUGIN) | 178 | #if !defined(PLUGIN) |
183 | struct listitem_viewport_cfg { | 179 | struct listitem_viewport_cfg { |
184 | struct wps_data *data; | 180 | struct wps_data *data; |
185 | OFFSETTYPE(char *) label; | 181 | OFFSETTYPE(char *) label; |
@@ -204,7 +200,7 @@ enum themable_icons skinlist_get_item_icon(int offset, bool wrap); | |||
204 | bool skinlist_needs_scrollbar(enum screen_type screen); | 200 | bool skinlist_needs_scrollbar(enum screen_type screen); |
205 | void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown); | 201 | void skinlist_get_scrollbar(int* nb_item, int* first_shown, int* last_shown); |
206 | int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list); | 202 | int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list); |
207 | #endif | 203 | #endif /* !PLUGIN) */ |
208 | 204 | ||
209 | #if defined(HAVE_TOUCHSCREEN) | 205 | #if defined(HAVE_TOUCHSCREEN) |
210 | /* this needs to be fixed if we ever get more than 1 touchscreen on a target */ | 206 | /* this needs to be fixed if we ever get more than 1 touchscreen on a target */ |
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c index 2e4bd8580c..532659e580 100644 --- a/apps/gui/scrollbar.c +++ b/apps/gui/scrollbar.c | |||
@@ -20,7 +20,6 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "scrollbar.h" | 22 | #include "scrollbar.h" |
23 | #ifdef HAVE_LCD_BITMAP | ||
24 | #include "config.h" | 23 | #include "config.h" |
25 | #include "limits.h" | 24 | #include "limits.h" |
26 | #include "bmp.h" | 25 | #include "bmp.h" |
@@ -264,5 +263,3 @@ void show_busy_slider(struct screen *s, int x, int y, int width, int height) | |||
264 | dir = 1; | 263 | dir = 1; |
265 | } | 264 | } |
266 | } | 265 | } |
267 | |||
268 | #endif /* HAVE_LCD_BITMAP */ | ||
diff --git a/apps/gui/scrollbar.h b/apps/gui/scrollbar.h index dcaef5721d..fa0907c686 100644 --- a/apps/gui/scrollbar.h +++ b/apps/gui/scrollbar.h | |||
@@ -23,8 +23,6 @@ | |||
23 | #define _GUI_SCROLLBAR_H_ | 23 | #define _GUI_SCROLLBAR_H_ |
24 | #include "screen_access.h" | 24 | #include "screen_access.h" |
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | |||
28 | enum orientation { | 26 | enum orientation { |
29 | VERTICAL = 0x0000, /* Vertical orientation */ | 27 | VERTICAL = 0x0000, /* Vertical orientation */ |
30 | HORIZONTAL = 0x0001, /* Horizontal orientation */ | 28 | HORIZONTAL = 0x0001, /* Horizontal orientation */ |
@@ -64,5 +62,4 @@ extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap *bm, | |||
64 | unsigned flags); | 62 | unsigned flags); |
65 | extern void show_busy_slider(struct screen *s, int x, int y, | 63 | extern void show_busy_slider(struct screen *s, int x, int y, |
66 | int width, int height); | 64 | int width, int height); |
67 | #endif /* HAVE_LCD_BITMAP */ | ||
68 | #endif /* _GUI_SCROLLBAR_H_ */ | 65 | #endif /* _GUI_SCROLLBAR_H_ */ |
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 345d74b65c..bd3a2b40aa 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -47,14 +47,12 @@ | |||
47 | #include "list.h" | 47 | #include "list.h" |
48 | #include "option_select.h" | 48 | #include "option_select.h" |
49 | 49 | ||
50 | #ifdef HAVE_LCD_BITMAP | ||
51 | #include "peakmeter.h" | 50 | #include "peakmeter.h" |
52 | /* Image stuff */ | 51 | /* Image stuff */ |
53 | #include "bmp.h" | 52 | #include "bmp.h" |
54 | #ifdef HAVE_ALBUMART | 53 | #ifdef HAVE_ALBUMART |
55 | #include "albumart.h" | 54 | #include "albumart.h" |
56 | #endif | 55 | #endif |
57 | #endif | ||
58 | 56 | ||
59 | #include "cuesheet.h" | 57 | #include "cuesheet.h" |
60 | #include "playback.h" | 58 | #include "playback.h" |
@@ -93,9 +91,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen, | |||
93 | SKIN_REFRESH_ALL : update_type); | 91 | SKIN_REFRESH_ALL : update_type); |
94 | } | 92 | } |
95 | 93 | ||
96 | #ifdef HAVE_LCD_BITMAP | ||
97 | |||
98 | |||
99 | #ifdef AB_REPEAT_ENABLE | 94 | #ifdef AB_REPEAT_ENABLE |
100 | 95 | ||
101 | #define DIRECTION_RIGHT 1 | 96 | #define DIRECTION_RIGHT 1 |
@@ -171,7 +166,7 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) | |||
171 | int x = pb->x, y = pb->y, width = pb->width, height = pb->height; | 166 | int x = pb->x, y = pb->y, width = pb->width, height = pb->height; |
172 | unsigned long length, end; | 167 | unsigned long length, end; |
173 | int flags = HORIZONTAL; | 168 | int flags = HORIZONTAL; |
174 | 169 | ||
175 | if (height < 0) | 170 | if (height < 0) |
176 | height = font_get(vp->font)->height; | 171 | height = font_get(vp->font)->height; |
177 | 172 | ||
@@ -423,8 +418,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp) | |||
423 | display->set_drawmode(DRMODE_SOLID); | 418 | display->set_drawmode(DRMODE_SOLID); |
424 | } | 419 | } |
425 | 420 | ||
426 | #endif /* HAVE_LCD_BITMAP */ | ||
427 | |||
428 | /* Evaluate the conditional that is at *token_index and return whether a skip | 421 | /* Evaluate the conditional that is at *token_index and return whether a skip |
429 | has ocurred. *token_index is updated with the new position. | 422 | has ocurred. *token_index is updated with the new position. |
430 | */ | 423 | */ |
@@ -587,21 +580,17 @@ void write_line(struct screen *display, struct align_pos *format_align, | |||
587 | else | 580 | else |
588 | { | 581 | { |
589 | linedes->scroll = false; | 582 | linedes->scroll = false; |
590 | #ifdef HAVE_LCD_BITMAP | ||
591 | /* clear the line first */ | 583 | /* clear the line first */ |
592 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 584 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
593 | display->fillrect(0, line*string_height, viewport_width, string_height); | 585 | display->fillrect(0, line*string_height, viewport_width, string_height); |
594 | display->set_drawmode(DRMODE_SOLID); | 586 | display->set_drawmode(DRMODE_SOLID); |
595 | #endif | ||
596 | 587 | ||
597 | /* Nasty hack: we output an empty scrolling string, | 588 | /* Nasty hack: we output an empty scrolling string, |
598 | which will reset the scroller for that line */ | 589 | which will reset the scroller for that line */ |
599 | display->puts_scroll(0, line, (unsigned char *)""); | 590 | display->puts_scroll(0, line, (unsigned char *)""); |
600 | #ifdef HAVE_LCD_BITMAP | ||
601 | line *= string_height; | 591 | line *= string_height; |
602 | center_xpos = (viewport_width-center_width)/2; | 592 | center_xpos = (viewport_width-center_width)/2; |
603 | right_xpos = viewport_width-right_width; | 593 | right_xpos = viewport_width-right_width; |
604 | #endif | ||
605 | /* print aligned strings. print whole line at once so that %Vs works | 594 | /* print aligned strings. print whole line at once so that %Vs works |
606 | * across the full viewport width */ | 595 | * across the full viewport width */ |
607 | char *left = format_align->left ?: ""; | 596 | char *left = format_align->left ?: ""; |
@@ -614,7 +603,6 @@ void write_line(struct screen *display, struct align_pos *format_align, | |||
614 | } | 603 | } |
615 | } | 604 | } |
616 | 605 | ||
617 | #ifdef HAVE_LCD_BITMAP | ||
618 | void draw_peakmeters(struct gui_wps *gwps, int line_number, | 606 | void draw_peakmeters(struct gui_wps *gwps, int line_number, |
619 | struct viewport *viewport) | 607 | struct viewport *viewport) |
620 | { | 608 | { |
@@ -645,15 +633,12 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data) | |||
645 | (void)screen; | 633 | (void)screen; |
646 | (void)data; | 634 | (void)data; |
647 | bool draw = false; | 635 | bool draw = false; |
648 | #ifdef HAVE_LCD_BITMAP | ||
649 | if (data->wps_sb_tag) | 636 | if (data->wps_sb_tag) |
650 | draw = data->show_sb_on_wps; | 637 | draw = data->show_sb_on_wps; |
651 | else if (statusbar_position(screen) != STATUSBAR_OFF) | 638 | else if (statusbar_position(screen) != STATUSBAR_OFF) |
652 | draw = true; | 639 | draw = true; |
653 | #endif | ||
654 | return draw; | 640 | return draw; |
655 | } | 641 | } |
656 | #endif | ||
657 | 642 | ||
658 | /* do the button loop as often as required for the peak meters to update | 643 | /* do the button loop as often as required for the peak meters to update |
659 | * with a good refresh rate. | 644 | * with a good refresh rate. |
@@ -661,7 +646,6 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data) | |||
661 | int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) | 646 | int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) |
662 | { | 647 | { |
663 | int button = ACTION_NONE; | 648 | int button = ACTION_NONE; |
664 | #ifdef HAVE_LCD_BITMAP | ||
665 | /* when the peak meter is enabled we want to have a | 649 | /* when the peak meter is enabled we want to have a |
666 | few extra updates to make it look smooth. On the | 650 | few extra updates to make it look smooth. On the |
667 | other hand we don't want to waste energy if it | 651 | 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) | |||
700 | /* The peak meter is disabled | 684 | /* The peak meter is disabled |
701 | -> no additional screen updates needed */ | 685 | -> no additional screen updates needed */ |
702 | else | 686 | else |
703 | #endif | ||
704 | { | 687 | { |
705 | button = get_action(context, timeout); | 688 | button = get_action(context, timeout); |
706 | } | 689 | } |
diff --git a/apps/gui/skin_engine/skin_display.h b/apps/gui/skin_engine/skin_display.h index 01a2169952..de1b0b20b5 100644 --- a/apps/gui/skin_engine/skin_display.h +++ b/apps/gui/skin_engine/skin_display.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #define _SKIN_DISPLAY_H_ | 29 | #define _SKIN_DISPLAY_H_ |
30 | 30 | ||
31 | 31 | ||
32 | #ifdef HAVE_LCD_BITMAP | ||
33 | void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb); | 32 | void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb); |
34 | void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer); | 33 | void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer); |
35 | /* clears the area where the image was shown */ | 34 | /* clears the area where the image was shown */ |
@@ -40,7 +39,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp); | |||
40 | void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, | 39 | void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, |
41 | struct skin_viewport* skin_viewport, unsigned long refresh_type); | 40 | struct skin_viewport* skin_viewport, unsigned long refresh_type); |
42 | 41 | ||
43 | #endif | ||
44 | 42 | ||
45 | /* Evaluate the conditional that is at *token_index and return whether a skip | 43 | /* Evaluate the conditional that is at *token_index and return whether a skip |
46 | has ocurred. *token_index is updated with the new position. | 44 | has ocurred. *token_index is updated with the new position. |
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index ec4e1fd073..cd763def1c 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c | |||
@@ -56,9 +56,7 @@ static struct gui_skin_helper { | |||
56 | char* (*default_skin)(enum screen_type screen); | 56 | char* (*default_skin)(enum screen_type screen); |
57 | bool load_on_boot; | 57 | bool load_on_boot; |
58 | } skin_helpers[SKINNABLE_SCREENS_COUNT] = { | 58 | } skin_helpers[SKINNABLE_SCREENS_COUNT] = { |
59 | #ifdef HAVE_LCD_BITMAP | ||
60 | [CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true }, | 59 | [CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true }, |
61 | #endif | ||
62 | [WPS] = { NULL, NULL, wps_default_skin, true }, | 60 | [WPS] = { NULL, NULL, wps_default_skin, true }, |
63 | #if CONFIG_TUNER | 61 | #if CONFIG_TUNER |
64 | [FM_SCREEN] = { NULL, NULL, default_radio_skin, false } | 62 | [FM_SCREEN] = { NULL, NULL, default_radio_skin, false } |
@@ -115,10 +113,8 @@ static void gui_skin_reset(struct gui_skin *skin) | |||
115 | #ifdef HAVE_SKIN_VARIABLES | 113 | #ifdef HAVE_SKIN_VARIABLES |
116 | skin->data.skinvars = -1; | 114 | skin->data.skinvars = -1; |
117 | #endif | 115 | #endif |
118 | #ifdef HAVE_LCD_BITMAP | ||
119 | skin->data.font_ids = -1; | 116 | skin->data.font_ids = -1; |
120 | skin->data.images = -1; | 117 | skin->data.images = -1; |
121 | #endif | ||
122 | #ifdef HAVE_ALBUMART | 118 | #ifdef HAVE_ALBUMART |
123 | skin->data.albumart = -1; | 119 | skin->data.albumart = -1; |
124 | skin->data.playback_aa_slot = -1; | 120 | skin->data.playback_aa_slot = -1; |
@@ -157,9 +153,7 @@ void settings_apply_skins(void) | |||
157 | char filename[MAX_PATH]; | 153 | char filename[MAX_PATH]; |
158 | static bool first_run = true; | 154 | static bool first_run = true; |
159 | 155 | ||
160 | #ifdef HAVE_LCD_BITMAP | ||
161 | skin_backdrop_init(); | 156 | skin_backdrop_init(); |
162 | #endif | ||
163 | skins_initialised = true; | 157 | skins_initialised = true; |
164 | 158 | ||
165 | /* Make sure each skin is loaded */ | 159 | /* Make sure each skin is loaded */ |
@@ -236,7 +230,6 @@ static char* get_skin_filename(char *buf, size_t buf_size, | |||
236 | char *setting = NULL, *ext = NULL; | 230 | char *setting = NULL, *ext = NULL; |
237 | switch (skin) | 231 | switch (skin) |
238 | { | 232 | { |
239 | #ifdef HAVE_LCD_BITMAP | ||
240 | case CUSTOM_STATUSBAR: | 233 | case CUSTOM_STATUSBAR: |
241 | #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 | 234 | #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 |
242 | if (screen == SCREEN_REMOTE) | 235 | if (screen == SCREEN_REMOTE) |
@@ -251,7 +244,6 @@ static char* get_skin_filename(char *buf, size_t buf_size, | |||
251 | ext = "sbs"; | 244 | ext = "sbs"; |
252 | } | 245 | } |
253 | break; | 246 | break; |
254 | #endif | ||
255 | case WPS: | 247 | case WPS: |
256 | #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 | 248 | #if defined(HAVE_REMOTE_LCD) && NB_SCREENS > 1 |
257 | if (screen == SCREEN_REMOTE) | 249 | if (screen == SCREEN_REMOTE) |
@@ -296,10 +288,8 @@ static char* get_skin_filename(char *buf, size_t buf_size, | |||
296 | 288 | ||
297 | struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen) | 289 | struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen) |
298 | { | 290 | { |
299 | #ifdef HAVE_LCD_BITMAP | ||
300 | if (skin == CUSTOM_STATUSBAR && !skins_initialised) | 291 | if (skin == CUSTOM_STATUSBAR && !skins_initialised) |
301 | return &skins[skin][screen].gui_wps; | 292 | return &skins[skin][screen].gui_wps; |
302 | #endif | ||
303 | 293 | ||
304 | if (skins[skin][screen].data.wps_loaded == false) | 294 | if (skins[skin][screen].data.wps_loaded == false) |
305 | { | 295 | { |
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h index 59e00b5176..55839608be 100644 --- a/apps/gui/skin_engine/skin_engine.h +++ b/apps/gui/skin_engine/skin_engine.h | |||
@@ -30,15 +30,12 @@ | |||
30 | #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */ | 30 | #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */ |
31 | 31 | ||
32 | enum skinnable_screens { | 32 | enum skinnable_screens { |
33 | #ifdef HAVE_LCD_BITMAP | ||
34 | CUSTOM_STATUSBAR, | 33 | CUSTOM_STATUSBAR, |
35 | #endif | ||
36 | WPS, | 34 | WPS, |
37 | #if CONFIG_TUNER | 35 | #if CONFIG_TUNER |
38 | FM_SCREEN, | 36 | FM_SCREEN, |
39 | #endif | 37 | #endif |
40 | 38 | ||
41 | |||
42 | SKINNABLE_SCREENS_COUNT | 39 | SKINNABLE_SCREENS_COUNT |
43 | }; | 40 | }; |
44 | 41 | ||
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index de7c1db372..f3a23377ef 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -66,9 +66,7 @@ | |||
66 | #include "tuner.h" | 66 | #include "tuner.h" |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #ifdef HAVE_LCD_BITMAP | ||
70 | #include "bmp.h" | 69 | #include "bmp.h" |
71 | #endif | ||
72 | 70 | ||
73 | #ifdef HAVE_ALBUMART | 71 | #ifdef HAVE_ALBUMART |
74 | #include "playback.h" | 72 | #include "playback.h" |
@@ -127,7 +125,6 @@ typedef int (*parse_function)(struct skin_element *element, | |||
127 | struct wps_token *token, | 125 | struct wps_token *token, |
128 | struct wps_data *wps_data); | 126 | struct wps_data *wps_data); |
129 | 127 | ||
130 | #ifdef HAVE_LCD_BITMAP | ||
131 | /* add a skin_token_list item to the list chain. ALWAYS appended because some of the | 128 | /* add a skin_token_list item to the list chain. ALWAYS appended because some of the |
132 | * chains require the order to be kept. | 129 | * chains require the order to be kept. |
133 | */ | 130 | */ |
@@ -147,9 +144,6 @@ static void add_to_ll_chain(OFFSETTYPE(struct skin_token_list *) *listoffset, | |||
147 | } | 144 | } |
148 | } | 145 | } |
149 | 146 | ||
150 | #endif | ||
151 | |||
152 | |||
153 | void *skin_find_item(const char *label, enum skin_find_what what, | 147 | void *skin_find_item(const char *label, enum skin_find_what what, |
154 | struct wps_data *data) | 148 | struct wps_data *data) |
155 | { | 149 | { |
@@ -170,11 +164,9 @@ void *skin_find_item(const char *label, enum skin_find_what what, | |||
170 | list.vplist = SKINOFFSETTOPTR(databuf, data->tree); | 164 | list.vplist = SKINOFFSETTOPTR(databuf, data->tree); |
171 | isvplist = true; | 165 | isvplist = true; |
172 | break; | 166 | break; |
173 | #ifdef HAVE_LCD_BITMAP | ||
174 | case SKIN_FIND_IMAGE: | 167 | case SKIN_FIND_IMAGE: |
175 | list.linkedlist = SKINOFFSETTOPTR(databuf, data->images); | 168 | list.linkedlist = SKINOFFSETTOPTR(databuf, data->images); |
176 | break; | 169 | break; |
177 | #endif | ||
178 | #ifdef HAVE_TOUCHSCREEN | 170 | #ifdef HAVE_TOUCHSCREEN |
179 | case SKIN_FIND_TOUCHREGION: | 171 | case SKIN_FIND_TOUCHREGION: |
180 | list.linkedlist = SKINOFFSETTOPTR(databuf, data->touchregions); | 172 | list.linkedlist = SKINOFFSETTOPTR(databuf, data->touchregions); |
@@ -190,11 +182,9 @@ void *skin_find_item(const char *label, enum skin_find_what what, | |||
190 | while (list.linkedlist) | 182 | while (list.linkedlist) |
191 | { | 183 | { |
192 | bool skip = false; | 184 | bool skip = false; |
193 | #ifdef HAVE_LCD_BITMAP | ||
194 | struct wps_token *token = NULL; | 185 | struct wps_token *token = NULL; |
195 | if (!isvplist) | 186 | if (!isvplist) |
196 | token = SKINOFFSETTOPTR(databuf, list.linkedlist->token); | 187 | token = SKINOFFSETTOPTR(databuf, list.linkedlist->token); |
197 | #endif | ||
198 | switch (what) | 188 | switch (what) |
199 | { | 189 | { |
200 | case SKIN_FIND_UIVP: | 190 | case SKIN_FIND_UIVP: |
@@ -207,12 +197,10 @@ void *skin_find_item(const char *label, enum skin_find_what what, | |||
207 | skip = !(((struct skin_viewport *)ret)->is_infovp == | 197 | skip = !(((struct skin_viewport *)ret)->is_infovp == |
208 | (what==SKIN_FIND_UIVP)); | 198 | (what==SKIN_FIND_UIVP)); |
209 | break; | 199 | break; |
210 | #ifdef HAVE_LCD_BITMAP | ||
211 | case SKIN_FIND_IMAGE: | 200 | case SKIN_FIND_IMAGE: |
212 | ret = SKINOFFSETTOPTR(databuf, token->value.data); | 201 | ret = SKINOFFSETTOPTR(databuf, token->value.data); |
213 | itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label); | 202 | itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label); |
214 | break; | 203 | break; |
215 | #endif | ||
216 | #ifdef HAVE_TOUCHSCREEN | 204 | #ifdef HAVE_TOUCHSCREEN |
217 | case SKIN_FIND_TOUCHREGION: | 205 | case SKIN_FIND_TOUCHREGION: |
218 | ret = SKINOFFSETTOPTR(databuf, token->value.data); | 206 | ret = SKINOFFSETTOPTR(databuf, token->value.data); |
@@ -240,8 +228,6 @@ void *skin_find_item(const char *label, enum skin_find_what what, | |||
240 | return NULL; | 228 | return NULL; |
241 | } | 229 | } |
242 | 230 | ||
243 | #ifdef HAVE_LCD_BITMAP | ||
244 | |||
245 | /* create and init a new wpsll item. | 231 | /* create and init a new wpsll item. |
246 | * passing NULL to token will alloc a new one. | 232 | * passing NULL to token will alloc a new one. |
247 | * You should only pass NULL for the token when the token type (table above) | 233 | * 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, | |||
493 | return 0; | 479 | return 0; |
494 | } | 480 | } |
495 | 481 | ||
496 | |||
497 | #ifdef HAVE_LCD_BITMAP | ||
498 | |||
499 | static int parse_playlistview(struct skin_element *element, | 482 | static int parse_playlistview(struct skin_element *element, |
500 | struct wps_token *token, | 483 | struct wps_token *token, |
501 | struct wps_data *wps_data) | 484 | struct wps_data *wps_data) |
@@ -513,7 +496,7 @@ static int parse_playlistview(struct skin_element *element, | |||
513 | 496 | ||
514 | return 0; | 497 | return 0; |
515 | } | 498 | } |
516 | #endif | 499 | |
517 | #ifdef HAVE_LCD_COLOR | 500 | #ifdef HAVE_LCD_COLOR |
518 | static int parse_viewport_gradient_setup(struct skin_element *element, | 501 | static int parse_viewport_gradient_setup(struct skin_element *element, |
519 | struct wps_token *token, | 502 | struct wps_token *token, |
@@ -756,8 +739,6 @@ static int parse_image_special(struct skin_element *element, | |||
756 | } | 739 | } |
757 | #endif | 740 | #endif |
758 | 741 | ||
759 | #endif /* HAVE_LCD_BITMAP */ | ||
760 | |||
761 | static int parse_progressbar_tag(struct skin_element* element, | 742 | static int parse_progressbar_tag(struct skin_element* element, |
762 | struct wps_token *token, | 743 | struct wps_token *token, |
763 | struct wps_data *wps_data); | 744 | struct wps_data *wps_data); |
@@ -898,7 +879,6 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
898 | struct wps_token *token, | 879 | struct wps_token *token, |
899 | struct wps_data *wps_data) | 880 | struct wps_data *wps_data) |
900 | { | 881 | { |
901 | #ifdef HAVE_LCD_BITMAP | ||
902 | struct progressbar *pb; | 882 | struct progressbar *pb; |
903 | struct viewport *vp = &curr_vp->vp; | 883 | struct viewport *vp = &curr_vp->vp; |
904 | struct skin_tag_parameter *param = get_param(element, 0); | 884 | struct skin_tag_parameter *param = get_param(element, 0); |
@@ -1211,20 +1191,7 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
1211 | add_to_ll_chain(&wps_data->touchregions, item); | 1191 | add_to_ll_chain(&wps_data->touchregions, item); |
1212 | } | 1192 | } |
1213 | #endif | 1193 | #endif |
1214 | |||
1215 | return 0; | ||
1216 | |||
1217 | #else | ||
1218 | (void)element; | ||
1219 | if (token->type == SKIN_TOKEN_PROGRESSBAR || | ||
1220 | token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR) | ||
1221 | { | ||
1222 | wps_data->full_line_progressbar = | ||
1223 | token->type == SKIN_TOKEN_PLAYER_PROGRESSBAR; | ||
1224 | } | ||
1225 | return 0; | 1194 | return 0; |
1226 | |||
1227 | #endif | ||
1228 | } | 1195 | } |
1229 | 1196 | ||
1230 | #ifdef HAVE_ALBUMART | 1197 | #ifdef HAVE_ALBUMART |
@@ -1741,7 +1708,6 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data) | |||
1741 | { | 1708 | { |
1742 | if (wps_data->wps_loaded) | 1709 | if (wps_data->wps_loaded) |
1743 | skin_buffer = get_skin_buffer(wps_data); | 1710 | skin_buffer = get_skin_buffer(wps_data); |
1744 | #ifdef HAVE_LCD_BITMAP | ||
1745 | #ifndef __PCTOOL__ | 1711 | #ifndef __PCTOOL__ |
1746 | struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images); | 1712 | struct skin_token_list *list = SKINOFFSETTOPTR(skin_buffer, wps_data->images); |
1747 | int *font_ids = SKINOFFSETTOPTR(skin_buffer, wps_data->font_ids); | 1713 | 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) | |||
1776 | core_free(wps_data->buflib_handle); | 1742 | core_free(wps_data->buflib_handle); |
1777 | wps_data->buflib_handle = -1; | 1743 | wps_data->buflib_handle = -1; |
1778 | #endif | 1744 | #endif |
1779 | #endif | ||
1780 | } | 1745 | } |
1781 | 1746 | ||
1782 | /* | 1747 | /* |
@@ -1787,9 +1752,7 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data) | |||
1787 | static void skin_data_reset(struct wps_data *wps_data) | 1752 | static void skin_data_reset(struct wps_data *wps_data) |
1788 | { | 1753 | { |
1789 | skin_data_free_buflib_allocs(wps_data); | 1754 | skin_data_free_buflib_allocs(wps_data); |
1790 | #ifdef HAVE_LCD_BITMAP | ||
1791 | wps_data->images = INVALID_OFFSET; | 1755 | wps_data->images = INVALID_OFFSET; |
1792 | #endif | ||
1793 | wps_data->tree = INVALID_OFFSET; | 1756 | wps_data->tree = INVALID_OFFSET; |
1794 | #ifdef HAVE_BACKDROP_IMAGE | 1757 | #ifdef HAVE_BACKDROP_IMAGE |
1795 | if (wps_data->backdrop_id >= 0) | 1758 | if (wps_data->backdrop_id >= 0) |
@@ -1811,15 +1774,12 @@ static void skin_data_reset(struct wps_data *wps_data) | |||
1811 | } | 1774 | } |
1812 | #endif | 1775 | #endif |
1813 | 1776 | ||
1814 | #ifdef HAVE_LCD_BITMAP | ||
1815 | wps_data->peak_meter_enabled = false; | 1777 | wps_data->peak_meter_enabled = false; |
1816 | wps_data->wps_sb_tag = false; | 1778 | wps_data->wps_sb_tag = false; |
1817 | wps_data->show_sb_on_wps = false; | 1779 | wps_data->show_sb_on_wps = false; |
1818 | #endif | ||
1819 | wps_data->wps_loaded = false; | 1780 | wps_data->wps_loaded = false; |
1820 | } | 1781 | } |
1821 | 1782 | ||
1822 | #ifdef HAVE_LCD_BITMAP | ||
1823 | #ifndef __PCTOOL__ | 1783 | #ifndef __PCTOOL__ |
1824 | static int currently_loading_handle = -1; | 1784 | static int currently_loading_handle = -1; |
1825 | static int buflib_move_callback(int handle, void* current, void* new) | 1785 | static int buflib_move_callback(int handle, void* current, void* new) |
@@ -2065,7 +2025,6 @@ static bool skin_load_fonts(struct wps_data *data) | |||
2065 | return success; | 2025 | return success; |
2066 | } | 2026 | } |
2067 | 2027 | ||
2068 | #endif /* HAVE_LCD_BITMAP */ | ||
2069 | static int convert_viewport(struct wps_data *data, struct skin_element* element) | 2028 | static int convert_viewport(struct wps_data *data, struct skin_element* element) |
2070 | { | 2029 | { |
2071 | struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(*skin_vp)); | 2030 | 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) | |||
2176 | skin_vp->vp.height = display->lcdheight - skin_vp->vp.y; | 2135 | skin_vp->vp.height = display->lcdheight - skin_vp->vp.y; |
2177 | } | 2136 | } |
2178 | param++; | 2137 | param++; |
2179 | #ifdef HAVE_LCD_BITMAP | ||
2180 | /* font */ | 2138 | /* font */ |
2181 | if (!isdefault(param)) | 2139 | if (!isdefault(param)) |
2182 | skin_vp->parsed_fontid = param->data.number; | 2140 | skin_vp->parsed_fontid = param->data.number; |
2183 | #endif | ||
2184 | if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth || | 2141 | if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth || |
2185 | skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth || | 2142 | skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth || |
2186 | (unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight || | 2143 | (unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight || |
@@ -2259,7 +2216,6 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
2259 | case SKIN_TOKEN_TRACK_ENDING: | 2216 | case SKIN_TOKEN_TRACK_ENDING: |
2260 | function = parse_timeout_tag; | 2217 | function = parse_timeout_tag; |
2261 | break; | 2218 | break; |
2262 | #ifdef HAVE_LCD_BITMAP | ||
2263 | case SKIN_TOKEN_LIST_ITEM_TEXT: | 2219 | case SKIN_TOKEN_LIST_ITEM_TEXT: |
2264 | case SKIN_TOKEN_LIST_ITEM_ICON: | 2220 | case SKIN_TOKEN_LIST_ITEM_ICON: |
2265 | function = parse_listitem; | 2221 | function = parse_listitem; |
@@ -2274,7 +2230,6 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
2274 | sb_skin_has_title(curr_screen); | 2230 | sb_skin_has_title(curr_screen); |
2275 | #endif | 2231 | #endif |
2276 | break; | 2232 | break; |
2277 | #endif | ||
2278 | #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) | 2233 | #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) |
2279 | case SKIN_TOKEN_DRAWRECTANGLE: | 2234 | case SKIN_TOKEN_DRAWRECTANGLE: |
2280 | function = parse_drawrectangle; | 2235 | function = parse_drawrectangle; |
@@ -2309,7 +2264,6 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
2309 | case SKIN_TOKEN_SETTING: | 2264 | case SKIN_TOKEN_SETTING: |
2310 | function = parse_setting_and_lang; | 2265 | function = parse_setting_and_lang; |
2311 | break; | 2266 | break; |
2312 | #ifdef HAVE_LCD_BITMAP | ||
2313 | case SKIN_TOKEN_VIEWPORT_CUSTOMLIST: | 2267 | case SKIN_TOKEN_VIEWPORT_CUSTOMLIST: |
2314 | function = parse_playlistview; | 2268 | function = parse_playlistview; |
2315 | break; | 2269 | break; |
@@ -2331,7 +2285,6 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
2331 | case SKIN_TOKEN_LIST_ITEM_CFG: | 2285 | case SKIN_TOKEN_LIST_ITEM_CFG: |
2332 | function = parse_listitemviewport; | 2286 | function = parse_listitemviewport; |
2333 | break; | 2287 | break; |
2334 | #endif | ||
2335 | #ifdef HAVE_TOUCHSCREEN | 2288 | #ifdef HAVE_TOUCHSCREEN |
2336 | case SKIN_TOKEN_TOUCHREGION: | 2289 | case SKIN_TOKEN_TOUCHREGION: |
2337 | function = parse_touchregion; | 2290 | function = parse_touchregion; |
@@ -2423,14 +2376,12 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, | |||
2423 | char *wps_buffer = NULL; | 2376 | char *wps_buffer = NULL; |
2424 | if (!wps_data || !buf) | 2377 | if (!wps_data || !buf) |
2425 | return false; | 2378 | return false; |
2426 | #ifdef HAVE_LCD_BITMAP | ||
2427 | int i; | 2379 | int i; |
2428 | for (i=0;i<MAXUSERFONTS;i++) | 2380 | for (i=0;i<MAXUSERFONTS;i++) |
2429 | { | 2381 | { |
2430 | skinfonts[i].id = -1; | 2382 | skinfonts[i].id = -1; |
2431 | skinfonts[i].name = NULL; | 2383 | skinfonts[i].name = NULL; |
2432 | } | 2384 | } |
2433 | #endif | ||
2434 | #ifdef DEBUG_SKIN_ENGINE | 2385 | #ifdef DEBUG_SKIN_ENGINE |
2435 | if (isfile && debug_wps) | 2386 | if (isfile && debug_wps) |
2436 | { | 2387 | { |
@@ -2504,7 +2455,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, | |||
2504 | return false; | 2455 | return false; |
2505 | } | 2456 | } |
2506 | 2457 | ||
2507 | #ifdef HAVE_LCD_BITMAP | ||
2508 | char bmpdir[MAX_PATH]; | 2458 | char bmpdir[MAX_PATH]; |
2509 | if (isfile) | 2459 | if (isfile) |
2510 | { | 2460 | { |
@@ -2523,7 +2473,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data, | |||
2523 | skin_data_reset(wps_data); | 2473 | skin_data_reset(wps_data); |
2524 | return false; | 2474 | return false; |
2525 | } | 2475 | } |
2526 | #endif | ||
2527 | #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) | 2476 | #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) |
2528 | /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ | 2477 | /* last_albumart_{width,height} is either both 0 or valid AA dimensions */ |
2529 | struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); | 2478 | struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, wps_data->albumart); |
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index e14c882dd9..51c58fc196 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c | |||
@@ -77,12 +77,10 @@ struct skin_draw_info { | |||
77 | typedef bool (*skin_render_func)(struct skin_element* alternator, struct skin_draw_info *info); | 77 | typedef bool (*skin_render_func)(struct skin_element* alternator, struct skin_draw_info *info); |
78 | bool skin_render_alternator(struct skin_element* alternator, struct skin_draw_info *info); | 78 | bool skin_render_alternator(struct skin_element* alternator, struct skin_draw_info *info); |
79 | 79 | ||
80 | #ifdef HAVE_LCD_BITMAP | ||
81 | static void skin_render_playlistviewer(struct playlistviewer* viewer, | 80 | static void skin_render_playlistviewer(struct playlistviewer* viewer, |
82 | struct gui_wps *gwps, | 81 | struct gui_wps *gwps, |
83 | struct skin_viewport* skin_viewport, | 82 | struct skin_viewport* skin_viewport, |
84 | unsigned long refresh_type); | 83 | unsigned long refresh_type); |
85 | #endif | ||
86 | 84 | ||
87 | static char* skin_buffer; | 85 | static char* skin_buffer; |
88 | 86 | ||
@@ -99,11 +97,10 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
99 | { | 97 | { |
100 | struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data); | 98 | struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data); |
101 | 99 | ||
102 | #ifdef HAVE_LCD_BITMAP | ||
103 | struct viewport *vp = &skin_vp->vp; | 100 | struct viewport *vp = &skin_vp->vp; |
104 | struct wps_data *data = gwps->data; | 101 | struct wps_data *data = gwps->data; |
105 | bool do_refresh = (element->tag->flags & info->refresh_type) > 0; | 102 | bool do_refresh = (element->tag->flags & info->refresh_type) > 0; |
106 | #endif | 103 | |
107 | switch (token->type) | 104 | switch (token->type) |
108 | { | 105 | { |
109 | #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) | 106 | #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, | |||
181 | } | 178 | } |
182 | } | 179 | } |
183 | break; | 180 | break; |
184 | #ifdef HAVE_LCD_BITMAP | ||
185 | case SKIN_TOKEN_LIST_ITEM_CFG: | 181 | case SKIN_TOKEN_LIST_ITEM_CFG: |
186 | skinlist_set_cfg(gwps->display->screen_type, | 182 | skinlist_set_cfg(gwps->display->screen_type, |
187 | SKINOFFSETTOPTR(skin_buffer, token->value.data)); | 183 | 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, | |||
225 | case SKIN_TOKEN_PEAKMETER_RIGHTBAR: | 221 | case SKIN_TOKEN_PEAKMETER_RIGHTBAR: |
226 | data->peak_meter_enabled = true; | 222 | data->peak_meter_enabled = true; |
227 | /* fall through to the progressbar code */ | 223 | /* fall through to the progressbar code */ |
228 | #endif | ||
229 | case SKIN_TOKEN_VOLUMEBAR: | 224 | case SKIN_TOKEN_VOLUMEBAR: |
230 | case SKIN_TOKEN_BATTERY_PERCENTBAR: | 225 | case SKIN_TOKEN_BATTERY_PERCENTBAR: |
231 | case SKIN_TOKEN_SETTINGBAR: | 226 | case SKIN_TOKEN_SETTINGBAR: |
232 | #ifdef HAVE_LCD_BITMAP | ||
233 | case SKIN_TOKEN_PROGRESSBAR: | 227 | case SKIN_TOKEN_PROGRESSBAR: |
234 | case SKIN_TOKEN_TUNER_RSSI_BAR: | 228 | case SKIN_TOKEN_TUNER_RSSI_BAR: |
235 | case SKIN_TOKEN_LIST_SCROLLBAR: | 229 | case SKIN_TOKEN_LIST_SCROLLBAR: |
@@ -238,9 +232,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
238 | if (do_refresh) | 232 | if (do_refresh) |
239 | draw_progressbar(gwps, info->line_number, bar); | 233 | draw_progressbar(gwps, info->line_number, bar); |
240 | } | 234 | } |
241 | #endif | ||
242 | break; | 235 | break; |
243 | #ifdef HAVE_LCD_BITMAP | ||
244 | case SKIN_TOKEN_IMAGE_DISPLAY: | 236 | case SKIN_TOKEN_IMAGE_DISPLAY: |
245 | { | 237 | { |
246 | struct gui_img *img = SKINOFFSETTOPTR(skin_buffer, token->value.data); | 238 | 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, | |||
321 | skin_render_playlistviewer(SKINOFFSETTOPTR(skin_buffer, token->value.data), gwps, | 313 | skin_render_playlistviewer(SKINOFFSETTOPTR(skin_buffer, token->value.data), gwps, |
322 | info->skin_vp, info->refresh_type); | 314 | info->skin_vp, info->refresh_type); |
323 | break; | 315 | break; |
324 | 316 | ||
325 | #endif /* HAVE_LCD_BITMAP */ | ||
326 | #ifdef HAVE_SKIN_VARIABLES | 317 | #ifdef HAVE_SKIN_VARIABLES |
327 | case SKIN_TOKEN_VAR_SET: | 318 | case SKIN_TOKEN_VAR_SET: |
328 | { | 319 | { |
@@ -352,16 +343,12 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
352 | } | 343 | } |
353 | return true; | 344 | return true; |
354 | } | 345 | } |
355 | |||
356 | |||
357 | 346 | ||
358 | static void do_tags_in_hidden_conditional(struct skin_element* branch, | 347 | static void do_tags_in_hidden_conditional(struct skin_element* branch, |
359 | struct skin_draw_info *info) | 348 | struct skin_draw_info *info) |
360 | { | 349 | { |
361 | #ifdef HAVE_LCD_BITMAP | ||
362 | struct gui_wps *gwps = info->gwps; | 350 | struct gui_wps *gwps = info->gwps; |
363 | struct wps_data *data = gwps->data; | 351 | struct wps_data *data = gwps->data; |
364 | #endif | ||
365 | /* Tags here are ones which need to be "turned off" or cleared | 352 | /* Tags here are ones which need to be "turned off" or cleared |
366 | * if they are in a conditional branch which isnt being used */ | 353 | * if they are in a conditional branch which isnt being used */ |
367 | if (branch->type == LINE_ALTERNATOR) | 354 | if (branch->type == LINE_ALTERNATOR) |
@@ -375,9 +362,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch, | |||
375 | else if (branch->type == LINE && branch->children_count) | 362 | else if (branch->type == LINE && branch->children_count) |
376 | { | 363 | { |
377 | struct skin_element *child = get_child(branch->children, 0); | 364 | struct skin_element *child = get_child(branch->children, 0); |
378 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART) | ||
379 | struct wps_token *token; | 365 | struct wps_token *token; |
380 | #endif | ||
381 | while (child) | 366 | while (child) |
382 | { | 367 | { |
383 | if (child->type == CONDITIONAL) | 368 | if (child->type == CONDITIONAL) |
@@ -395,10 +380,7 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch, | |||
395 | child = SKINOFFSETTOPTR(skin_buffer, child->next); | 380 | child = SKINOFFSETTOPTR(skin_buffer, child->next); |
396 | continue; | 381 | continue; |
397 | } | 382 | } |
398 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_ALBUMART) | ||
399 | token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data); | 383 | token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, child->data); |
400 | #endif | ||
401 | #ifdef HAVE_LCD_BITMAP | ||
402 | /* clear all pictures in the conditional and nested ones */ | 384 | /* clear all pictures in the conditional and nested ones */ |
403 | if (token->type == SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY) | 385 | if (token->type == SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY) |
404 | { | 386 | { |
@@ -420,7 +402,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch, | |||
420 | viewport = SKINOFFSETTOPTR(skin_buffer, viewport->next)) | 402 | viewport = SKINOFFSETTOPTR(skin_buffer, viewport->next)) |
421 | { | 403 | { |
422 | struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); | 404 | struct skin_viewport *skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); |
423 | |||
424 | char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label); | 405 | char *vplabel = SKINOFFSETTOPTR(skin_buffer, skin_viewport->label); |
425 | if (skin_viewport->label == VP_DEFAULT_LABEL) | 406 | if (skin_viewport->label == VP_DEFAULT_LABEL) |
426 | vplabel = VP_DEFAULT_LABEL_STRING; | 407 | vplabel = VP_DEFAULT_LABEL_STRING; |
@@ -460,7 +441,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch, | |||
460 | } | 441 | } |
461 | } | 442 | } |
462 | } | 443 | } |
463 | #endif | ||
464 | #ifdef HAVE_ALBUMART | 444 | #ifdef HAVE_ALBUMART |
465 | else if (data->albumart && token->type == SKIN_TOKEN_ALBUMART_DISPLAY) | 445 | else if (data->albumart && token->type == SKIN_TOKEN_ALBUMART_DISPLAY) |
466 | { | 446 | { |
@@ -734,11 +714,10 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, | |||
734 | .offset = 0, | 714 | .offset = 0, |
735 | .line_desc = LINE_DESC_DEFINIT, | 715 | .line_desc = LINE_DESC_DEFINIT, |
736 | }; | 716 | }; |
737 | 717 | ||
738 | struct align_pos * align = &info.align; | 718 | struct align_pos * align = &info.align; |
739 | bool needs_update, update_all = false; | 719 | bool needs_update, update_all = false; |
740 | skin_buffer = get_skin_buffer(gwps->data); | 720 | skin_buffer = get_skin_buffer(gwps->data); |
741 | #ifdef HAVE_LCD_BITMAP | ||
742 | /* Set images to not to be displayed */ | 721 | /* Set images to not to be displayed */ |
743 | struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images); | 722 | struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, gwps->data->images); |
744 | while (imglist) | 723 | while (imglist) |
@@ -752,10 +731,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, | |||
752 | /* fix font ID's */ | 731 | /* fix font ID's */ |
753 | if (skin_viewport->parsed_fontid == 1) | 732 | if (skin_viewport->parsed_fontid == 1) |
754 | skin_viewport->vp.font = display->getuifont(); | 733 | skin_viewport->vp.font = display->getuifont(); |
755 | #endif | ||
756 | |||
757 | 734 | ||
758 | |||
759 | while (line) | 735 | while (line) |
760 | { | 736 | { |
761 | linebuf[0] = '\0'; | 737 | linebuf[0] = '\0'; |
@@ -811,9 +787,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, | |||
811 | info.line_number++; | 787 | info.line_number++; |
812 | line = SKINOFFSETTOPTR(skin_buffer, line->next); | 788 | line = SKINOFFSETTOPTR(skin_buffer, line->next); |
813 | } | 789 | } |
814 | #ifdef HAVE_LCD_BITMAP | ||
815 | wps_display_images(gwps, &skin_viewport->vp); | 790 | wps_display_images(gwps, &skin_viewport->vp); |
816 | #endif | ||
817 | } | 791 | } |
818 | 792 | ||
819 | void skin_render(struct gui_wps *gwps, unsigned refresh_mode) | 793 | void skin_render(struct gui_wps *gwps, unsigned refresh_mode) |
@@ -903,8 +877,7 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode) | |||
903 | display->update(); | 877 | display->update(); |
904 | } | 878 | } |
905 | 879 | ||
906 | #ifdef HAVE_LCD_BITMAP | 880 | static __attribute__((noinline)) |
907 | static __attribute__((noinline)) | ||
908 | void skin_render_playlistviewer(struct playlistviewer* viewer, | 881 | void skin_render_playlistviewer(struct playlistviewer* viewer, |
909 | struct gui_wps *gwps, | 882 | struct gui_wps *gwps, |
910 | struct skin_viewport* skin_viewport, | 883 | struct skin_viewport* skin_viewport, |
@@ -926,7 +899,7 @@ void skin_render_playlistviewer(struct playlistviewer* viewer, | |||
926 | .offset = viewer->start_offset, | 899 | .offset = viewer->start_offset, |
927 | .line_desc = LINE_DESC_DEFINIT, | 900 | .line_desc = LINE_DESC_DEFINIT, |
928 | }; | 901 | }; |
929 | 902 | ||
930 | struct align_pos * align = &info.align; | 903 | struct align_pos * align = &info.align; |
931 | bool needs_update; | 904 | bool needs_update; |
932 | int cur_pos, start_item, max; | 905 | int cur_pos, start_item, max; |
@@ -989,4 +962,3 @@ void skin_render_playlistviewer(struct playlistviewer* viewer, | |||
989 | start_item++; | 962 | start_item++; |
990 | } | 963 | } |
991 | } | 964 | } |
992 | #endif | ||
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 2528a0af55..db9a9e694b 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -41,11 +41,9 @@ | |||
41 | #include "lang.h" | 41 | #include "lang.h" |
42 | #include "misc.h" | 42 | #include "misc.h" |
43 | #include "led.h" | 43 | #include "led.h" |
44 | #ifdef HAVE_LCD_BITMAP | ||
45 | #include "peakmeter.h" | 44 | #include "peakmeter.h" |
46 | /* Image stuff */ | 45 | /* Image stuff */ |
47 | #include "albumart.h" | 46 | #include "albumart.h" |
48 | #endif | ||
49 | #include "playlist.h" | 47 | #include "playlist.h" |
50 | #include "playback.h" | 48 | #include "playback.h" |
51 | #include "tdspeed.h" | 49 | #include "tdspeed.h" |
@@ -813,7 +811,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
813 | if (intval) | 811 | if (intval) |
814 | *intval = playlist_amount(); | 812 | *intval = playlist_amount(); |
815 | return buf; | 813 | return buf; |
816 | #ifdef HAVE_LCD_BITMAP | ||
817 | case SKIN_TOKEN_LIST_TITLE_TEXT: | 814 | case SKIN_TOKEN_LIST_TITLE_TEXT: |
818 | return sb_get_title(gwps->display->screen_type); | 815 | return sb_get_title(gwps->display->screen_type); |
819 | case SKIN_TOKEN_LIST_TITLE_ICON: | 816 | case SKIN_TOKEN_LIST_TITLE_ICON: |
@@ -854,7 +851,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
854 | } | 851 | } |
855 | case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR: | 852 | case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR: |
856 | return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : ""; | 853 | return skinlist_needs_scrollbar(gwps->display->screen_type) ? "s" : ""; |
857 | #endif | ||
858 | case SKIN_TOKEN_PLAYLIST_NAME: | 854 | case SKIN_TOKEN_PLAYLIST_NAME: |
859 | return playlist_name(NULL, buf, buf_size); | 855 | return playlist_name(NULL, buf, buf_size); |
860 | 856 | ||
@@ -1202,7 +1198,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1202 | return "-"; | 1198 | return "-"; |
1203 | #endif | 1199 | #endif |
1204 | 1200 | ||
1205 | #ifdef HAVE_LCD_BITMAP | ||
1206 | /* peakmeter */ | 1201 | /* peakmeter */ |
1207 | case SKIN_TOKEN_PEAKMETER_LEFT: | 1202 | case SKIN_TOKEN_PEAKMETER_LEFT: |
1208 | case SKIN_TOKEN_PEAKMETER_RIGHT: | 1203 | case SKIN_TOKEN_PEAKMETER_RIGHT: |
@@ -1218,7 +1213,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1218 | data->peak_meter_enabled = true; | 1213 | data->peak_meter_enabled = true; |
1219 | return buf; | 1214 | return buf; |
1220 | } | 1215 | } |
1221 | #endif | ||
1222 | 1216 | ||
1223 | case SKIN_TOKEN_CROSSFADE: | 1217 | case SKIN_TOKEN_CROSSFADE: |
1224 | #ifdef HAVE_CROSSFADE | 1218 | #ifdef HAVE_CROSSFADE |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index caf43b21cb..b7d7ff35d0 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -80,7 +80,6 @@ struct skin_token_list { | |||
80 | OFFSETTYPE(struct skin_token_list *) next; | 80 | OFFSETTYPE(struct skin_token_list *) next; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #ifdef HAVE_LCD_BITMAP | ||
84 | struct gui_img { | 83 | struct gui_img { |
85 | OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */ | 84 | OFFSETTYPE(struct viewport*) vp; /* The viewport to display this image in */ |
86 | short int x; /* x-pos */ | 85 | short int x; /* x-pos */ |
@@ -137,9 +136,6 @@ struct draw_rectangle { | |||
137 | unsigned start_colour; | 136 | unsigned start_colour; |
138 | unsigned end_colour; | 137 | unsigned end_colour; |
139 | }; | 138 | }; |
140 | #endif | ||
141 | |||
142 | |||
143 | 139 | ||
144 | struct align_pos { | 140 | struct align_pos { |
145 | char* left; | 141 | char* left; |
@@ -147,11 +143,7 @@ struct align_pos { | |||
147 | char* right; | 143 | char* right; |
148 | }; | 144 | }; |
149 | 145 | ||
150 | #ifdef HAVE_LCD_BITMAP | ||
151 | #define WPS_MAX_TOKENS 1150 | 146 | #define WPS_MAX_TOKENS 1150 |
152 | #else | ||
153 | #define WPS_MAX_TOKENS 64 | ||
154 | #endif | ||
155 | 147 | ||
156 | enum wps_parse_error { | 148 | enum wps_parse_error { |
157 | PARSE_OK, | 149 | PARSE_OK, |
@@ -344,11 +336,9 @@ struct wps_data | |||
344 | int buflib_handle; | 336 | int buflib_handle; |
345 | 337 | ||
346 | OFFSETTYPE(struct skin_element *) tree; | 338 | OFFSETTYPE(struct skin_element *) tree; |
347 | #ifdef HAVE_LCD_BITMAP | ||
348 | OFFSETTYPE(struct skin_token_list *) images; | 339 | OFFSETTYPE(struct skin_token_list *) images; |
349 | OFFSETTYPE(int *) font_ids; | 340 | OFFSETTYPE(int *) font_ids; |
350 | int font_count; | 341 | int font_count; |
351 | #endif | ||
352 | #ifdef HAVE_BACKDROP_IMAGE | 342 | #ifdef HAVE_BACKDROP_IMAGE |
353 | int backdrop_id; | 343 | int backdrop_id; |
354 | bool use_extra_framebuffer; | 344 | bool use_extra_framebuffer; |
@@ -370,11 +360,9 @@ struct wps_data | |||
370 | OFFSETTYPE(struct skin_token_list *) skinvars; | 360 | OFFSETTYPE(struct skin_token_list *) skinvars; |
371 | #endif | 361 | #endif |
372 | 362 | ||
373 | #ifdef HAVE_LCD_BITMAP | ||
374 | bool peak_meter_enabled; | 363 | bool peak_meter_enabled; |
375 | bool wps_sb_tag; | 364 | bool wps_sb_tag; |
376 | bool show_sb_on_wps; | 365 | bool show_sb_on_wps; |
377 | #endif | ||
378 | bool wps_loaded; | 366 | bool wps_loaded; |
379 | }; | 367 | }; |
380 | 368 | ||
@@ -448,9 +436,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset, | |||
448 | enum skin_find_what { | 436 | enum skin_find_what { |
449 | SKIN_FIND_VP = 0, | 437 | SKIN_FIND_VP = 0, |
450 | SKIN_FIND_UIVP, | 438 | SKIN_FIND_UIVP, |
451 | #ifdef HAVE_LCD_BITMAP | ||
452 | SKIN_FIND_IMAGE, | 439 | SKIN_FIND_IMAGE, |
453 | #endif | ||
454 | #ifdef HAVE_TOUCHSCREEN | 440 | #ifdef HAVE_TOUCHSCREEN |
455 | SKIN_FIND_TOUCHREGION, | 441 | SKIN_FIND_TOUCHREGION, |
456 | #endif | 442 | #endif |
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index fa2c21768a..5bcac80169 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -31,16 +31,11 @@ | |||
31 | #include "viewport.h" | 31 | #include "viewport.h" |
32 | #include "strtok_r.h" | 32 | #include "strtok_r.h" |
33 | 33 | ||
34 | #ifdef HAVE_LCD_BITMAP | ||
35 | |||
36 | #define MAXLINES (LCD_HEIGHT/6) | 34 | #define MAXLINES (LCD_HEIGHT/6) |
37 | #define MAXBUFFER 512 | 35 | #define MAXBUFFER 512 |
38 | #define RECT_SPACING 2 | 36 | #define RECT_SPACING 2 |
39 | #define SPLASH_MEMORY_INTERVAL (HZ) | 37 | #define SPLASH_MEMORY_INTERVAL (HZ) |
40 | 38 | ||
41 | #endif | ||
42 | |||
43 | |||
44 | static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | 39 | static void splash_internal(struct screen * screen, const char *fmt, va_list ap) |
45 | { | 40 | { |
46 | char splash_buf[MAXBUFFER]; | 41 | char splash_buf[MAXBUFFER]; |
@@ -54,15 +49,13 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
54 | int y, i; | 49 | int y, i; |
55 | int space_w, w, h; | 50 | int space_w, w, h; |
56 | struct viewport vp; | 51 | struct viewport vp; |
57 | #ifdef HAVE_LCD_BITMAP | ||
58 | int width, height; | 52 | int width, height; |
59 | int maxw = 0; | 53 | int maxw = 0; |
60 | 54 | ||
61 | viewport_set_defaults(&vp, screen->screen_type); | 55 | viewport_set_defaults(&vp, screen->screen_type); |
62 | screen->set_viewport(&vp); | 56 | screen->set_viewport(&vp); |
63 | 57 | ||
64 | screen->getstringsize(" ", &space_w, &h); | 58 | screen->getstringsize(" ", &space_w, &h); |
65 | #endif | ||
66 | y = h; | 59 | y = h; |
67 | 60 | ||
68 | vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap); | 61 | 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) | |||
77 | lines[0] = next; | 70 | lines[0] = next; |
78 | while (true) | 71 | while (true) |
79 | { | 72 | { |
80 | #ifdef HAVE_LCD_BITMAP | ||
81 | screen->getstringsize(next, &w, NULL); | 73 | screen->getstringsize(next, &w, NULL); |
82 | #else | ||
83 | w = utf8length(next); | ||
84 | #endif | ||
85 | if (lastbreak) | 74 | if (lastbreak) |
86 | { | 75 | { |
87 | if (x + (next - lastbreak) * space_w + w | 76 | if (x + (next - lastbreak) * space_w + w |
88 | > vp.width - RECT_SPACING*2) | 77 | > vp.width - RECT_SPACING*2) |
89 | { /* too wide, wrap */ | 78 | { /* too wide, wrap */ |
90 | #ifdef HAVE_LCD_BITMAP | ||
91 | if (x > maxw) | 79 | if (x > maxw) |
92 | maxw = x; | 80 | maxw = x; |
93 | #endif | ||
94 | if ((y + h > vp.height) || (line >= (MAXLINES-1))) | 81 | if ((y + h > vp.height) || (line >= (MAXLINES-1))) |
95 | break; /* screen full or out of lines */ | 82 | break; /* screen full or out of lines */ |
96 | x = 0; | 83 | x = 0; |
@@ -109,10 +96,8 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
109 | next = strtok_r(NULL, " ", &store); | 96 | next = strtok_r(NULL, " ", &store); |
110 | if (!next) | 97 | if (!next) |
111 | { /* no more words */ | 98 | { /* no more words */ |
112 | #ifdef HAVE_LCD_BITMAP | ||
113 | if (x > maxw) | 99 | if (x > maxw) |
114 | maxw = x; | 100 | maxw = x; |
115 | #endif | ||
116 | break; | 101 | break; |
117 | } | 102 | } |
118 | } | 103 | } |
@@ -123,8 +108,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
123 | 108 | ||
124 | screen->scroll_stop(); | 109 | screen->scroll_stop(); |
125 | 110 | ||
126 | #ifdef HAVE_LCD_BITMAP | ||
127 | |||
128 | width = maxw + 2*RECT_SPACING; | 111 | width = maxw + 2*RECT_SPACING; |
129 | height = y + 2*RECT_SPACING; | 112 | height = y + 2*RECT_SPACING; |
130 | 113 | ||
@@ -166,14 +149,11 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
166 | 149 | ||
167 | /* prepare putting the text */ | 150 | /* prepare putting the text */ |
168 | y = RECT_SPACING; | 151 | y = RECT_SPACING; |
169 | #endif | ||
170 | 152 | ||
171 | /* print the message to screen */ | 153 | /* print the message to screen */ |
172 | for (i = 0; i <= line; i++, y+=h) | 154 | for (i = 0; i <= line; i++, y+=h) |
173 | { | 155 | { |
174 | #ifdef HAVE_LCD_BITMAP | ||
175 | screen->putsxy(0, y, lines[i]); | 156 | screen->putsxy(0, y, lines[i]); |
176 | #endif | ||
177 | } | 157 | } |
178 | screen->update_viewport(); | 158 | screen->update_viewport(); |
179 | end: | 159 | end: |
diff --git a/apps/gui/statusbar-skinned.h b/apps/gui/statusbar-skinned.h index 237ec45c82..ad102bef47 100644 --- a/apps/gui/statusbar-skinned.h +++ b/apps/gui/statusbar-skinned.h | |||
@@ -23,8 +23,6 @@ | |||
23 | 23 | ||
24 | #define DEFAULT_UPDATE_DELAY (HZ/7) | 24 | #define DEFAULT_UPDATE_DELAY (HZ/7) |
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | |||
28 | #include <stdio.h> | 26 | #include <stdio.h> |
29 | #include <string.h> | 27 | #include <string.h> |
30 | #include <stdlib.h> | 28 | #include <stdlib.h> |
@@ -57,14 +55,5 @@ int sb_get_backdrop(enum screen_type screen); | |||
57 | int sb_preproccess(enum screen_type screen, struct wps_data *data); | 55 | int sb_preproccess(enum screen_type screen, struct wps_data *data); |
58 | int sb_postproccess(enum screen_type screen, struct wps_data *data); | 56 | int sb_postproccess(enum screen_type screen, struct wps_data *data); |
59 | 57 | ||
60 | #else /* CHARCELL */ | ||
61 | #define sb_skin_init() | ||
62 | #define sb_skin_data_load(a,b,c) | ||
63 | #define sb_skin_set_update_delay(a) | ||
64 | #define sb_skin_set_state(a,b) | ||
65 | #define sb_create_from_settings NULL | ||
66 | #define sb_preproccess NULL | ||
67 | #define sb_postproccess NULL | ||
68 | #endif | ||
69 | void do_sbs_update_callback(unsigned short id, void *param); | 58 | void do_sbs_update_callback(unsigned short id, void *param); |
70 | #endif /* __STATUSBAR_SKINNED_H__ */ | 59 | #endif /* __STATUSBAR_SKINNED_H__ */ |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 0c8f54f749..a43828b268 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -132,7 +132,6 @@ | |||
132 | struct gui_syncstatusbar statusbars; | 132 | struct gui_syncstatusbar statusbars; |
133 | 133 | ||
134 | /* Prototypes */ | 134 | /* Prototypes */ |
135 | #ifdef HAVE_LCD_BITMAP | ||
136 | static void gui_statusbar_icon_battery(struct screen * display, int percent, | 135 | static void gui_statusbar_icon_battery(struct screen * display, int percent, |
137 | int batt_charge_step); | 136 | int batt_charge_step); |
138 | static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume); | 137 | 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); | |||
152 | #if CONFIG_RTC | 151 | #if CONFIG_RTC |
153 | static void gui_statusbar_time(struct screen * display, struct tm *time); | 152 | static void gui_statusbar_time(struct screen * display, struct tm *time); |
154 | #endif | 153 | #endif |
155 | #endif | ||
156 | 154 | ||
157 | /* End prototypes */ | 155 | /* End prototypes */ |
158 | 156 | ||
@@ -242,7 +240,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi | |||
242 | } | 240 | } |
243 | 241 | ||
244 | bar->info.volume = global_settings.volume; | 242 | bar->info.volume = global_settings.volume; |
245 | #ifdef HAVE_LCD_BITMAP | ||
246 | bar->info.shuffle = global_settings.playlist_shuffle; | 243 | bar->info.shuffle = global_settings.playlist_shuffle; |
247 | #ifdef HAS_BUTTON_HOLD | 244 | #ifdef HAS_BUTTON_HOLD |
248 | bar->info.keylock = button_hold(); | 245 | bar->info.keylock = button_hold(); |
@@ -349,11 +346,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi | |||
349 | display->set_viewport(NULL); | 346 | display->set_viewport(NULL); |
350 | bar->lastinfo = bar->info; | 347 | bar->lastinfo = bar->info; |
351 | } | 348 | } |
352 | #endif /* HAVE_LCD_BITMAP */ | ||
353 | |||
354 | } | 349 | } |
355 | 350 | ||
356 | #ifdef HAVE_LCD_BITMAP | ||
357 | /* from icon.c */ | 351 | /* from icon.c */ |
358 | /* | 352 | /* |
359 | * Print battery icon to status bar | 353 | * Print battery icon to status bar |
@@ -717,8 +711,6 @@ static void gui_statusbar_icon_recording_info(struct screen * display) | |||
717 | } | 711 | } |
718 | #endif /* HAVE_RECORDING */ | 712 | #endif /* HAVE_RECORDING */ |
719 | 713 | ||
720 | #endif /* HAVE_LCD_BITMAP */ | ||
721 | |||
722 | void gui_syncstatusbar_init(struct gui_syncstatusbar * bars) | 714 | void gui_syncstatusbar_init(struct gui_syncstatusbar * bars) |
723 | { | 715 | { |
724 | FOR_NB_SCREENS(i) { | 716 | FOR_NB_SCREENS(i) { |
@@ -730,7 +722,6 @@ void gui_syncstatusbar_init(struct gui_syncstatusbar * bars) | |||
730 | void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, | 722 | void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, |
731 | bool force_redraw) | 723 | bool force_redraw) |
732 | { | 724 | { |
733 | #ifdef HAVE_LCD_BITMAP | ||
734 | if(!global_settings.statusbar) | 725 | if(!global_settings.statusbar) |
735 | return; | 726 | return; |
736 | struct viewport viewport; | 727 | struct viewport viewport; |
@@ -738,9 +729,6 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, | |||
738 | GET_RECT(viewport,statusbar_position(i),&screens[i]); | 729 | GET_RECT(viewport,statusbar_position(i),&screens[i]); |
739 | gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport ); | 730 | gui_statusbar_draw( &(bars->statusbars[i]), force_redraw, &viewport ); |
740 | } | 731 | } |
741 | #else | ||
742 | gui_statusbar_draw( &(bars->statusbars[0]), force_redraw, NULL ); | ||
743 | #endif /* HAVE_LCD_BITMAP */ | ||
744 | } | 732 | } |
745 | 733 | ||
746 | 734 | ||
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index dd1d97df3c..3169831322 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c | |||
@@ -42,9 +42,7 @@ | |||
42 | #include "playlist.h" | 42 | #include "playlist.h" |
43 | #include "misc.h" | 43 | #include "misc.h" |
44 | 44 | ||
45 | #ifdef HAVE_LCD_BITMAP | ||
46 | #include "bitmaps/usblogo.h" | 45 | #include "bitmaps/usblogo.h" |
47 | #endif | ||
48 | 46 | ||
49 | #ifdef HAVE_REMOTE_LCD | 47 | #ifdef HAVE_REMOTE_LCD |
50 | #include "bitmaps/remote_usblogo.h" | 48 | #include "bitmaps/remote_usblogo.h" |
@@ -122,15 +120,12 @@ static int handle_usb_events(void) | |||
122 | struct usb_screen_vps_t | 120 | struct usb_screen_vps_t |
123 | { | 121 | { |
124 | struct viewport parent; | 122 | struct viewport parent; |
125 | #ifdef HAVE_LCD_BITMAP | ||
126 | struct viewport logo; | 123 | struct viewport logo; |
127 | #ifdef USB_ENABLE_HID | 124 | #ifdef USB_ENABLE_HID |
128 | struct viewport title; | 125 | struct viewport title; |
129 | #endif | 126 | #endif |
130 | #endif | ||
131 | }; | 127 | }; |
132 | 128 | ||
133 | #ifdef HAVE_LCD_BITMAP | ||
134 | static void usb_screen_fix_viewports(struct screen *screen, | 129 | static void usb_screen_fix_viewports(struct screen *screen, |
135 | struct usb_screen_vps_t *usb_screen_vps) | 130 | struct usb_screen_vps_t *usb_screen_vps) |
136 | { | 131 | { |
@@ -181,18 +176,15 @@ static void usb_screen_fix_viewports(struct screen *screen, | |||
181 | } | 176 | } |
182 | #endif | 177 | #endif |
183 | } | 178 | } |
184 | #endif | ||
185 | 179 | ||
186 | static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) | 180 | static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) |
187 | { | 181 | { |
188 | #ifdef HAVE_LCD_BITMAP | ||
189 | static const struct bitmap* logos[NB_SCREENS] = { | 182 | static const struct bitmap* logos[NB_SCREENS] = { |
190 | &bm_usblogo, | 183 | &bm_usblogo, |
191 | #ifdef HAVE_REMOTE_LCD | 184 | #ifdef HAVE_REMOTE_LCD |
192 | &bm_remote_usblogo, | 185 | &bm_remote_usblogo, |
193 | #endif | 186 | #endif |
194 | }; | 187 | }; |
195 | #endif | ||
196 | 188 | ||
197 | FOR_NB_SCREENS(i) | 189 | FOR_NB_SCREENS(i) |
198 | { | 190 | { |
@@ -200,15 +192,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) | |||
200 | 192 | ||
201 | struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i]; | 193 | struct usb_screen_vps_t *usb_screen_vps = &usb_screen_vps_ar[i]; |
202 | struct viewport *parent = &usb_screen_vps->parent; | 194 | struct viewport *parent = &usb_screen_vps->parent; |
203 | #ifdef HAVE_LCD_BITMAP | ||
204 | struct viewport *logo = &usb_screen_vps->logo; | 195 | struct viewport *logo = &usb_screen_vps->logo; |
205 | #endif | ||
206 | 196 | ||
207 | screen->set_viewport(parent); | 197 | screen->set_viewport(parent); |
208 | screen->clear_viewport(); | 198 | screen->clear_viewport(); |
209 | screen->backlight_on(); | 199 | screen->backlight_on(); |
210 | 200 | ||
211 | #ifdef HAVE_LCD_BITMAP | ||
212 | screen->set_viewport(logo); | 201 | screen->set_viewport(logo); |
213 | screen->bmp(logos[i], 0, 0); | 202 | screen->bmp(logos[i], 0, 0); |
214 | if (i == SCREEN_MAIN) | 203 | if (i == SCREEN_MAIN) |
@@ -228,14 +217,6 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) | |||
228 | } | 217 | } |
229 | screen->set_viewport(parent); | 218 | screen->set_viewport(parent); |
230 | 219 | ||
231 | #else /* !HAVE_LCD_BITMAP */ | ||
232 | screen->double_height(false); | ||
233 | screen->puts_scroll(0, 0, "[USB Mode]"); | ||
234 | status_set_param(false); | ||
235 | status_set_audio(false); | ||
236 | status_set_usb(true); | ||
237 | #endif /* HAVE_LCD_BITMAP */ | ||
238 | |||
239 | screen->set_viewport(NULL); | 220 | screen->set_viewport(NULL); |
240 | screen->update_viewport(); | 221 | screen->update_viewport(); |
241 | } | 222 | } |
@@ -275,13 +256,11 @@ void gui_usb_screen_run(bool early_usb) | |||
275 | /* update the UI before disabling fonts, this maximizes the propability | 256 | /* update the UI before disabling fonts, this maximizes the propability |
276 | * that font cache lookups succeed during USB */ | 257 | * that font cache lookups succeed during USB */ |
277 | send_event(GUI_EVENT_ACTIONUPDATE, NULL); | 258 | send_event(GUI_EVENT_ACTIONUPDATE, NULL); |
278 | #ifdef HAVE_LCD_BITMAP | ||
279 | if(!early_usb) | 259 | if(!early_usb) |
280 | { | 260 | { |
281 | /* The font system leaves the .fnt fd's open, so we need for force close them all */ | 261 | /* The font system leaves the .fnt fd's open, so we need for force close them all */ |
282 | font_disable_all(); | 262 | font_disable_all(); |
283 | } | 263 | } |
284 | #endif | ||
285 | 264 | ||
286 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 265 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
287 | 266 | ||
@@ -302,10 +281,8 @@ void gui_usb_screen_run(bool early_usb) | |||
302 | { | 281 | { |
303 | const struct viewport* vp = NULL; | 282 | const struct viewport* vp = NULL; |
304 | 283 | ||
305 | #if defined(HAVE_LCD_BITMAP) && defined(USB_ENABLE_HID) | 284 | #if defined(USB_ENABLE_HID) |
306 | vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL; | 285 | vp = usb_hid ? &usb_screen_vps_ar[i].title : NULL; |
307 | #elif !defined(HAVE_LCD_BITMAP) | ||
308 | vp = &usb_screen_vps_ar[i].parent; | ||
309 | #endif | 286 | #endif |
310 | if (vp) | 287 | if (vp) |
311 | screens[i].scroll_stop_viewport(vp); | 288 | screens[i].scroll_stop_viewport(vp); |
@@ -322,7 +299,6 @@ void gui_usb_screen_run(bool early_usb) | |||
322 | touchscreen_set_mode(old_mode); | 299 | touchscreen_set_mode(old_mode); |
323 | #endif | 300 | #endif |
324 | 301 | ||
325 | #ifdef HAVE_LCD_BITMAP | ||
326 | if(!early_usb) | 302 | if(!early_usb) |
327 | { | 303 | { |
328 | font_enable_all(); | 304 | font_enable_all(); |
@@ -331,7 +307,6 @@ void gui_usb_screen_run(bool early_usb) | |||
331 | /* Reload playlist */ | 307 | /* Reload playlist */ |
332 | playlist_resume(); | 308 | playlist_resume(); |
333 | } | 309 | } |
334 | #endif | ||
335 | 310 | ||
336 | FOR_NB_SCREENS(i) | 311 | FOR_NB_SCREENS(i) |
337 | { | 312 | { |
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index fad3255cdb..db58b5d72d 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -54,9 +54,7 @@ | |||
54 | #include "statusbar.h" | 54 | #include "statusbar.h" |
55 | #include "appevents.h" | 55 | #include "appevents.h" |
56 | #include "panic.h" | 56 | #include "panic.h" |
57 | #ifdef HAVE_LCD_BITMAP | ||
58 | #include "language.h" | 57 | #include "language.h" |
59 | #endif | ||
60 | #include "statusbar-skinned.h" | 58 | #include "statusbar-skinned.h" |
61 | #include "skin_engine/skin_engine.h" | 59 | #include "skin_engine/skin_engine.h" |
62 | #include "debug.h" | 60 | #include "debug.h" |
@@ -68,7 +66,6 @@ struct viewport_stack_item | |||
68 | bool enabled; | 66 | bool enabled; |
69 | }; | 67 | }; |
70 | 68 | ||
71 | #ifdef HAVE_LCD_BITMAP | ||
72 | static void viewportmanager_redraw(unsigned short id, void* data); | 69 | static void viewportmanager_redraw(unsigned short id, void* data); |
73 | 70 | ||
74 | static int theme_stack_top[NB_SCREENS]; /* the last item added */ | 71 | static int theme_stack_top[NB_SCREENS]; /* the last item added */ |
@@ -218,16 +215,10 @@ static bool is_theme_enabled(enum screen_type screen) | |||
218 | int top = theme_stack_top[screen]; | 215 | int top = theme_stack_top[screen]; |
219 | return theme_stack[screen][top].enabled; | 216 | return theme_stack[screen][top].enabled; |
220 | } | 217 | } |
221 | #endif /* HAVE_LCD_BITMAP */ | ||
222 | 218 | ||
223 | int viewport_get_nb_lines(const struct viewport *vp) | 219 | int viewport_get_nb_lines(const struct viewport *vp) |
224 | { | 220 | { |
225 | #ifdef HAVE_LCD_BITMAP | ||
226 | return vp->height/font_get(vp->font)->height; | 221 | return vp->height/font_get(vp->font)->height; |
227 | #else | ||
228 | (void)vp; | ||
229 | return 2; | ||
230 | #endif | ||
231 | } | 222 | } |
232 | 223 | ||
233 | static void viewportmanager_redraw(unsigned short id, void* data) | 224 | static void viewportmanager_redraw(unsigned short id, void* data) |
@@ -235,31 +226,21 @@ static void viewportmanager_redraw(unsigned short id, void* data) | |||
235 | (void)id; | 226 | (void)id; |
236 | FOR_NB_SCREENS(i) | 227 | FOR_NB_SCREENS(i) |
237 | { | 228 | { |
238 | #ifdef HAVE_LCD_BITMAP | ||
239 | if (is_theme_enabled(i)) | 229 | if (is_theme_enabled(i)) |
240 | sb_skin_update(i, NULL != data); | 230 | sb_skin_update(i, NULL != data); |
241 | #else | ||
242 | (void)data; | ||
243 | gui_statusbar_draw(&statusbars.statusbars[i], NULL, NULL); | ||
244 | #endif | ||
245 | } | 231 | } |
246 | } | 232 | } |
247 | 233 | ||
248 | void viewportmanager_init() | 234 | void viewportmanager_init() |
249 | { | 235 | { |
250 | #ifdef HAVE_LCD_BITMAP | ||
251 | FOR_NB_SCREENS(i) | 236 | FOR_NB_SCREENS(i) |
252 | { | 237 | { |
253 | theme_stack_top[i] = -1; /* the next call fixes this to 0 */ | 238 | theme_stack_top[i] = -1; /* the next call fixes this to 0 */ |
254 | /* We always want the theme enabled by default... */ | 239 | /* We always want the theme enabled by default... */ |
255 | viewportmanager_theme_enable(i, true, NULL); | 240 | viewportmanager_theme_enable(i, true, NULL); |
256 | } | 241 | } |
257 | #else | ||
258 | add_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); | ||
259 | #endif | ||
260 | } | 242 | } |
261 | 243 | ||
262 | #ifdef HAVE_LCD_BITMAP | ||
263 | void viewportmanager_theme_changed(const int which) | 244 | void viewportmanager_theme_changed(const int which) |
264 | { | 245 | { |
265 | if (which & THEME_LANGUAGE) | 246 | if (which & THEME_LANGUAGE) |
@@ -296,7 +277,6 @@ static void set_default_align_flags(struct viewport *vp) | |||
296 | vp->flags |= VP_FLAG_ALIGN_RIGHT; | 277 | vp->flags |= VP_FLAG_ALIGN_RIGHT; |
297 | } | 278 | } |
298 | 279 | ||
299 | #endif /* HAVE_LCD_BITMAP */ | ||
300 | #endif /* __PCTOOL__ */ | 280 | #endif /* __PCTOOL__ */ |
301 | 281 | ||
302 | void viewport_set_fullscreen(struct viewport *vp, | 282 | void viewport_set_fullscreen(struct viewport *vp, |
@@ -307,7 +287,6 @@ void viewport_set_fullscreen(struct viewport *vp, | |||
307 | vp->width = screens[screen].lcdwidth; | 287 | vp->width = screens[screen].lcdwidth; |
308 | vp->height = screens[screen].lcdheight; | 288 | vp->height = screens[screen].lcdheight; |
309 | 289 | ||
310 | #ifdef HAVE_LCD_BITMAP | ||
311 | #ifndef __PCTOOL__ | 290 | #ifndef __PCTOOL__ |
312 | set_default_align_flags(vp); | 291 | set_default_align_flags(vp); |
313 | #endif | 292 | #endif |
@@ -331,13 +310,12 @@ void viewport_set_fullscreen(struct viewport *vp, | |||
331 | vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; | 310 | vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; |
332 | } | 311 | } |
333 | #endif | 312 | #endif |
334 | #endif | ||
335 | } | 313 | } |
336 | 314 | ||
337 | void viewport_set_defaults(struct viewport *vp, | 315 | void viewport_set_defaults(struct viewport *vp, |
338 | const enum screen_type screen) | 316 | const enum screen_type screen) |
339 | { | 317 | { |
340 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | 318 | #if !defined(__PCTOOL__) |
341 | struct viewport *sbs_area = NULL; | 319 | struct viewport *sbs_area = NULL; |
342 | if (!is_theme_enabled(screen)) | 320 | if (!is_theme_enabled(screen)) |
343 | { | 321 | { |
@@ -349,13 +327,11 @@ void viewport_set_defaults(struct viewport *vp, | |||
349 | if (sbs_area) | 327 | if (sbs_area) |
350 | *vp = *sbs_area; | 328 | *vp = *sbs_area; |
351 | else | 329 | else |
352 | #endif /* HAVE_LCD_BITMAP */ | 330 | #endif /* !__PCTOOL__ */ |
353 | viewport_set_fullscreen(vp, screen); | 331 | viewport_set_fullscreen(vp, screen); |
354 | } | 332 | } |
355 | 333 | ||
356 | 334 | ||
357 | #ifdef HAVE_LCD_BITMAP | ||
358 | |||
359 | int get_viewport_default_colour(enum screen_type screen, bool fgcolour) | 335 | int get_viewport_default_colour(enum screen_type screen, bool fgcolour) |
360 | { | 336 | { |
361 | (void)screen; (void)fgcolour; | 337 | (void)screen; (void)fgcolour; |
@@ -392,5 +368,3 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour) | |||
392 | return 0; | 368 | return 0; |
393 | #endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */ | 369 | #endif /* LCD_DEPTH > 1 || LCD_REMOTE_DEPTH > 1 */ |
394 | } | 370 | } |
395 | |||
396 | #endif | ||
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h index c4b90aa64c..683c36fe76 100644 --- a/apps/gui/viewport.h +++ b/apps/gui/viewport.h | |||
@@ -53,7 +53,6 @@ int get_viewport_default_colour(enum screen_type screen, bool fgcolour); | |||
53 | */ | 53 | */ |
54 | void viewportmanager_init(void) INIT_ATTR; | 54 | void viewportmanager_init(void) INIT_ATTR; |
55 | 55 | ||
56 | #ifdef HAVE_LCD_BITMAP | ||
57 | void viewportmanager_theme_enable(enum screen_type screen, bool enable, | 56 | void viewportmanager_theme_enable(enum screen_type screen, bool enable, |
58 | struct viewport *viewport); | 57 | struct viewport *viewport); |
59 | /* Force will cause a redraw even if the theme was previously and | 58 | /* 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, | |||
69 | const int x, const int y); | 68 | const int x, const int y); |
70 | #endif | 69 | #endif |
71 | 70 | ||
72 | #endif | ||
73 | |||
74 | #endif /* __PCTOOL__ */ | 71 | #endif /* __PCTOOL__ */ |
75 | 72 | ||
76 | #endif /* __VIEWPORT_H__ */ | 73 | #endif /* __VIEWPORT_H__ */ |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 82321ff945..8d0453385b 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -39,9 +39,7 @@ | |||
39 | #include "storage.h" | 39 | #include "storage.h" |
40 | #include "screens.h" | 40 | #include "screens.h" |
41 | #include "playlist.h" | 41 | #include "playlist.h" |
42 | #ifdef HAVE_LCD_BITMAP | ||
43 | #include "icons.h" | 42 | #include "icons.h" |
44 | #endif | ||
45 | #include "lang.h" | 43 | #include "lang.h" |
46 | #include "bookmark.h" | 44 | #include "bookmark.h" |
47 | #include "misc.h" | 45 | #include "misc.h" |
@@ -87,7 +85,6 @@ static void track_info_callback(unsigned short id, void *param); | |||
87 | char* wps_default_skin(enum screen_type screen) | 85 | char* wps_default_skin(enum screen_type screen) |
88 | { | 86 | { |
89 | static char *skin_buf[NB_SCREENS] = { | 87 | static char *skin_buf[NB_SCREENS] = { |
90 | #ifdef HAVE_LCD_BITMAP | ||
91 | #if LCD_DEPTH > 1 | 88 | #if LCD_DEPTH > 1 |
92 | "%X(d)\n" | 89 | "%X(d)\n" |
93 | #endif | 90 | #endif |
@@ -97,10 +94,6 @@ char* wps_default_skin(enum screen_type screen) | |||
97 | "%al%pc/%pt%ar[%pp:%pe]\n" | 94 | "%al%pc/%pt%ar[%pp:%pe]\n" |
98 | "%fbkBit %?fv<avg|> %?iv<%(id3v%iv%)|%(no id3%)>\n" | 95 | "%fbkBit %?fv<avg|> %?iv<%(id3v%iv%)|%(no id3%)>\n" |
99 | "%pb\n%pm\n", | 96 | "%pb\n%pm\n", |
100 | #else | ||
101 | "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d(2)> - %?id<%id|%d(1)>\n" | ||
102 | "%pc%?ps<*|/>%pt\n", | ||
103 | #endif | ||
104 | #ifdef HAVE_REMOTE_LCD | 97 | #ifdef HAVE_REMOTE_LCD |
105 | #if LCD_REMOTE_DEPTH > 1 | 98 | #if LCD_REMOTE_DEPTH > 1 |
106 | "%X(d)\n" | 99 | "%X(d)\n" |
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 45638b7076..1a1645047a 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -112,9 +112,7 @@ static void gui_yesno_draw(struct gui_yesno * yn) | |||
112 | if(line_shift+3 <= vp_lines) | 112 | if(line_shift+3 <= vp_lines) |
113 | line_shift++; | 113 | line_shift++; |
114 | display->puts(0, line_shift, str(LANG_CONFIRM_WITH_BUTTON)); | 114 | display->puts(0, line_shift, str(LANG_CONFIRM_WITH_BUTTON)); |
115 | #ifdef HAVE_LCD_BITMAP | ||
116 | display->puts(0, line_shift+1, str(LANG_CANCEL_WITH_ANY)); | 115 | display->puts(0, line_shift+1, str(LANG_CANCEL_WITH_ANY)); |
117 | #endif | ||
118 | } | 116 | } |
119 | #endif | 117 | #endif |
120 | display->update_viewport(); | 118 | display->update_viewport(); |
diff --git a/apps/keyboard.h b/apps/keyboard.h index a76b49834e..e3ee0b05d0 100644 --- a/apps/keyboard.h +++ b/apps/keyboard.h | |||
@@ -25,8 +25,6 @@ | |||
25 | 25 | ||
26 | int kbd_input(char* buffer, int buflen, unsigned short *kbd); | 26 | int kbd_input(char* buffer, int buflen, unsigned short *kbd); |
27 | 27 | ||
28 | #ifdef HAVE_LCD_BITMAP | ||
29 | int load_kbd(unsigned char* filename); | 28 | int load_kbd(unsigned char* filename); |
30 | #endif | ||
31 | 29 | ||
32 | #endif | 30 | #endif |
diff --git a/apps/lang/SOURCES b/apps/lang/SOURCES index 4c34ea7f6f..276d1bff1c 100644 --- a/apps/lang/SOURCES +++ b/apps/lang/SOURCES | |||
@@ -39,7 +39,6 @@ ukrainian.lang | |||
39 | vlaams.lang | 39 | vlaams.lang |
40 | wallisertitsch.lang | 40 | wallisertitsch.lang |
41 | walon.lang | 41 | walon.lang |
42 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ | ||
43 | arabic.lang | 42 | arabic.lang |
44 | chinese-simp.lang | 43 | chinese-simp.lang |
45 | chinese-trad.lang | 44 | chinese-trad.lang |
@@ -47,4 +46,3 @@ hindi.lang | |||
47 | japanese.lang | 46 | japanese.lang |
48 | korean.lang | 47 | korean.lang |
49 | thai.lang | 48 | thai.lang |
50 | #endif /* HAVE_LCD_BITMAP */ | ||
diff --git a/apps/language.c b/apps/language.c index 715f83f672..7fe1258dea 100644 --- a/apps/language.c +++ b/apps/language.c | |||
@@ -26,9 +26,7 @@ | |||
26 | #include "lang.h" | 26 | #include "lang.h" |
27 | #include "debug.h" | 27 | #include "debug.h" |
28 | #include "string.h" | 28 | #include "string.h" |
29 | #ifdef HAVE_LCD_BITMAP | ||
30 | #include "viewport.h" | 29 | #include "viewport.h" |
31 | #endif | ||
32 | 30 | ||
33 | /* The following header is generated by the build system and only defines | 31 | /* The following header is generated by the build system and only defines |
34 | MAX_LANGUAGE_SIZE to be the size of the largest currently available | 32 | MAX_LANGUAGE_SIZE to be the size of the largest currently available |
diff --git a/apps/logfdisp.c b/apps/logfdisp.c index 0c5f63e8dc..b139f30ac7 100644 --- a/apps/logfdisp.c +++ b/apps/logfdisp.c | |||
@@ -36,15 +36,14 @@ | |||
36 | #include "action.h" | 36 | #include "action.h" |
37 | #include "splash.h" | 37 | #include "splash.h" |
38 | 38 | ||
39 | #ifdef HAVE_LCD_BITMAP | ||
40 | int compute_nb_lines(int w, struct font* font) | 39 | int compute_nb_lines(int w, struct font* font) |
41 | { | 40 | { |
42 | int i, nb_lines; | 41 | int i, nb_lines; |
43 | int cur_x, delta_x; | 42 | int cur_x, delta_x; |
44 | 43 | ||
45 | if(logfindex == 0 && !logfwrap) | 44 | if(logfindex == 0 && !logfwrap) |
46 | return 0; | 45 | return 0; |
47 | 46 | ||
48 | if(logfwrap) | 47 | if(logfwrap) |
49 | i = logfindex; | 48 | i = logfindex; |
50 | else | 49 | else |
@@ -209,7 +208,6 @@ bool logfdisplay(void) | |||
209 | 208 | ||
210 | return false; | 209 | return false; |
211 | } | 210 | } |
212 | #endif /* HAVE_LCD_BITMAP */ | ||
213 | 211 | ||
214 | bool logfdump(void) | 212 | bool logfdump(void) |
215 | { | 213 | { |
diff --git a/apps/main.c b/apps/main.c index 4f468fa65b..e1eccc0fa9 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -167,9 +167,7 @@ int main(void) | |||
167 | screens[i].clear_display(); | 167 | screens[i].clear_display(); |
168 | screens[i].update(); | 168 | screens[i].update(); |
169 | } | 169 | } |
170 | #ifdef HAVE_LCD_BITMAP | ||
171 | list_init(); | 170 | list_init(); |
172 | #endif | ||
173 | tree_gui_init(); | 171 | tree_gui_init(); |
174 | /* Keep the order of this 3 | 172 | /* Keep the order of this 3 |
175 | * Must be done before any code uses the multi-screen API */ | 173 | * Must be done before any code uses the multi-screen API */ |
@@ -280,7 +278,6 @@ static void init_tagcache(void) | |||
280 | talk_number(tagcache_get_max_commit_step(), true); | 278 | talk_number(tagcache_get_max_commit_step(), true); |
281 | } | 279 | } |
282 | #endif | 280 | #endif |
283 | #ifdef HAVE_LCD_BITMAP | ||
284 | if (lang_is_rtl()) | 281 | if (lang_is_rtl()) |
285 | { | 282 | { |
286 | splashf(0, "[%d/%d] %s", ret, tagcache_get_max_commit_step(), | 283 | splashf(0, "[%d/%d] %s", ret, tagcache_get_max_commit_step(), |
@@ -291,12 +288,6 @@ static void init_tagcache(void) | |||
291 | splashf(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), ret, | 288 | splashf(0, "%s [%d/%d]", str(LANG_TAGCACHE_INIT), ret, |
292 | tagcache_get_max_commit_step()); | 289 | tagcache_get_max_commit_step()); |
293 | } | 290 | } |
294 | #else | ||
295 | lcd_double_height(false); | ||
296 | lcd_putsf(0, 1, " DB [%d/%d]", ret, | ||
297 | tagcache_get_max_commit_step()); | ||
298 | lcd_update(); | ||
299 | #endif | ||
300 | clear = true; | 291 | clear = true; |
301 | } | 292 | } |
302 | sleep(HZ/4); | 293 | sleep(HZ/4); |
@@ -326,11 +317,9 @@ static void init(void) | |||
326 | #ifdef HAVE_REMOTE_LCD | 317 | #ifdef HAVE_REMOTE_LCD |
327 | lcd_remote_init(); | 318 | lcd_remote_init(); |
328 | #endif | 319 | #endif |
329 | #ifdef HAVE_LCD_BITMAP | ||
330 | FOR_NB_SCREENS(i) | 320 | FOR_NB_SCREENS(i) |
331 | global_status.font_id[i] = FONT_SYSFIXED; | 321 | global_status.font_id[i] = FONT_SYSFIXED; |
332 | font_init(); | 322 | font_init(); |
333 | #endif | ||
334 | show_logo(); | 323 | show_logo(); |
335 | #ifndef USB_NONE | 324 | #ifndef USB_NONE |
336 | usb_init(); | 325 | usb_init(); |
@@ -428,11 +417,9 @@ static void init(void) | |||
428 | #ifdef HAVE_REMOTE_LCD | 417 | #ifdef HAVE_REMOTE_LCD |
429 | lcd_remote_init(); | 418 | lcd_remote_init(); |
430 | #endif | 419 | #endif |
431 | #ifdef HAVE_LCD_BITMAP | ||
432 | FOR_NB_SCREENS(i) | 420 | FOR_NB_SCREENS(i) |
433 | global_status.font_id[i] = FONT_SYSFIXED; | 421 | global_status.font_id[i] = FONT_SYSFIXED; |
434 | font_init(); | 422 | font_init(); |
435 | #endif | ||
436 | 423 | ||
437 | settings_reset(); | 424 | settings_reset(); |
438 | 425 | ||
@@ -507,14 +494,12 @@ static void init(void) | |||
507 | CHART("<storage_init"); | 494 | CHART("<storage_init"); |
508 | if(rc) | 495 | if(rc) |
509 | { | 496 | { |
510 | #ifdef HAVE_LCD_BITMAP | ||
511 | lcd_clear_display(); | 497 | lcd_clear_display(); |
512 | lcd_putsf(0, 1, "ATA error: %d", rc); | 498 | lcd_putsf(0, 1, "ATA error: %d", rc); |
513 | lcd_puts(0, 3, "Press ON to debug"); | 499 | lcd_puts(0, 3, "Press ON to debug"); |
514 | lcd_update(); | 500 | lcd_update(); |
515 | while(!(button_get(true) & BUTTON_REL)); /* DO NOT CHANGE TO ACTION SYSTEM */ | 501 | while(!(button_get(true) & BUTTON_REL)); /* DO NOT CHANGE TO ACTION SYSTEM */ |
516 | dbg_ports(); | 502 | dbg_ports(); |
517 | #endif | ||
518 | panicf("ata: %d", rc); | 503 | panicf("ata: %d", rc); |
519 | } | 504 | } |
520 | 505 | ||
@@ -565,10 +550,8 @@ static void init(void) | |||
565 | lcd_clear_display(); | 550 | lcd_clear_display(); |
566 | lcd_puts(0, 0, "No partition"); | 551 | lcd_puts(0, 0, "No partition"); |
567 | lcd_puts(0, 1, "found."); | 552 | lcd_puts(0, 1, "found."); |
568 | #ifdef HAVE_LCD_BITMAP | ||
569 | lcd_puts(0, 2, "Insert USB cable"); | 553 | lcd_puts(0, 2, "Insert USB cable"); |
570 | lcd_puts(0, 3, "and fix it."); | 554 | lcd_puts(0, 3, "and fix it."); |
571 | #endif | ||
572 | lcd_update(); | 555 | lcd_update(); |
573 | 556 | ||
574 | while(button_get(true) != SYS_USB_CONNECTED) {}; | 557 | while(button_get(true) != SYS_USB_CONNECTED) {}; |
diff --git a/apps/menu.c b/apps/menu.c index 49e6c58b2b..1e0cb3668f 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -54,9 +54,7 @@ | |||
54 | #include "quickscreen.h" | 54 | #include "quickscreen.h" |
55 | #include "shortcuts.h" | 55 | #include "shortcuts.h" |
56 | 56 | ||
57 | #ifdef HAVE_LCD_BITMAP | ||
58 | #include "icons.h" | 57 | #include "icons.h" |
59 | #endif | ||
60 | 58 | ||
61 | /* gui api */ | 59 | /* gui api */ |
62 | #include "list.h" | 60 | #include "list.h" |
@@ -129,7 +127,7 @@ static const char* get_menu_item_name(int selected_item, | |||
129 | } | 127 | } |
130 | return P2STR(menu->callback_and_desc->desc); | 128 | return P2STR(menu->callback_and_desc->desc); |
131 | } | 129 | } |
132 | #ifdef HAVE_LCD_BITMAP | 130 | |
133 | static enum themable_icons menu_get_icon(int selected_item, void * data) | 131 | static enum themable_icons menu_get_icon(int selected_item, void * data) |
134 | { | 132 | { |
135 | const struct menu_item_ex *menu = (const struct menu_item_ex *)data; | 133 | 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) | |||
168 | } | 166 | } |
169 | return menu_icon; | 167 | return menu_icon; |
170 | } | 168 | } |
171 | #endif | ||
172 | 169 | ||
173 | static void init_menu_lists(const struct menu_item_ex *menu, | 170 | static void init_menu_lists(const struct menu_item_ex *menu, |
174 | struct gui_synclist *lists, int selected, bool callback, | 171 | struct gui_synclist *lists, int selected, bool callback, |
@@ -207,7 +204,6 @@ static void init_menu_lists(const struct menu_item_ex *menu, | |||
207 | current_submenus_menu = (struct menu_item_ex *)menu; | 204 | current_submenus_menu = (struct menu_item_ex *)menu; |
208 | 205 | ||
209 | gui_synclist_init(lists,get_menu_item_name,(void*)menu,false,1, parent); | 206 | gui_synclist_init(lists,get_menu_item_name,(void*)menu,false,1, parent); |
210 | #ifdef HAVE_LCD_BITMAP | ||
211 | 207 | ||
212 | if (menu->flags&MENU_HAS_DESC) | 208 | if (menu->flags&MENU_HAS_DESC) |
213 | { | 209 | { |
@@ -232,11 +228,6 @@ static void init_menu_lists(const struct menu_item_ex *menu, | |||
232 | icon = Icon_Submenu_Entered; | 228 | icon = Icon_Submenu_Entered; |
233 | gui_synclist_set_title(lists, title, icon); | 229 | gui_synclist_set_title(lists, title, icon); |
234 | gui_synclist_set_icon_callback(lists, global_settings.show_icons?menu_get_icon:NULL); | 230 | gui_synclist_set_icon_callback(lists, global_settings.show_icons?menu_get_icon:NULL); |
235 | #else | ||
236 | (void)icon; | ||
237 | (void)title; | ||
238 | gui_synclist_set_icon_callback(lists, NULL); | ||
239 | #endif | ||
240 | if(global_settings.talk_menu) | 231 | if(global_settings.talk_menu) |
241 | gui_synclist_set_voice_callback(lists, talk_menu_item); | 232 | gui_synclist_set_voice_callback(lists, talk_menu_item); |
242 | gui_synclist_set_nb_items(lists,current_subitems_count); | 233 | gui_synclist_set_nb_items(lists,current_subitems_count); |
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index b7a44a3bb7..b4a3d3eb63 100644 --- a/apps/menus/display_menu.c +++ b/apps/menus/display_menu.c | |||
@@ -30,9 +30,7 @@ | |||
30 | #include "menu.h" | 30 | #include "menu.h" |
31 | #include "tree.h" | 31 | #include "tree.h" |
32 | #include "list.h" | 32 | #include "list.h" |
33 | #ifdef HAVE_LCD_BITMAP | ||
34 | #include "peakmeter.h" | 33 | #include "peakmeter.h" |
35 | #endif | ||
36 | #include "talk.h" | 34 | #include "talk.h" |
37 | #include "lcd.h" | 35 | #include "lcd.h" |
38 | #ifdef HAVE_REMOTE_LCD | 36 | #ifdef HAVE_REMOTE_LCD |
@@ -187,16 +185,12 @@ MENUITEM_SETTING(brightness_item, &global_settings.brightness, NULL); | |||
187 | #ifdef HAVE_LCD_CONTRAST | 185 | #ifdef HAVE_LCD_CONTRAST |
188 | MENUITEM_SETTING(contrast, &global_settings.contrast, NULL); | 186 | MENUITEM_SETTING(contrast, &global_settings.contrast, NULL); |
189 | #endif | 187 | #endif |
190 | #ifdef HAVE_LCD_BITMAP | ||
191 | #ifdef HAVE_LCD_INVERT | 188 | #ifdef HAVE_LCD_INVERT |
192 | MENUITEM_SETTING(invert, &global_settings.invert, NULL); | 189 | MENUITEM_SETTING(invert, &global_settings.invert, NULL); |
193 | #endif | 190 | #endif |
194 | #ifdef HAVE_LCD_FLIP | 191 | #ifdef HAVE_LCD_FLIP |
195 | MENUITEM_SETTING(flip_display, &global_settings.flip_display, flipdisplay_callback); | 192 | MENUITEM_SETTING(flip_display, &global_settings.flip_display, flipdisplay_callback); |
196 | #endif | 193 | #endif |
197 | #endif /* HAVE_LCD_BITMAP */ | ||
198 | |||
199 | |||
200 | 194 | ||
201 | /* now the actual menu */ | 195 | /* now the actual menu */ |
202 | MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), | 196 | MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), |
@@ -226,14 +220,12 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), | |||
226 | #ifdef HAVE_LCD_CONTRAST | 220 | #ifdef HAVE_LCD_CONTRAST |
227 | ,&contrast | 221 | ,&contrast |
228 | #endif | 222 | #endif |
229 | #ifdef HAVE_LCD_BITMAP | ||
230 | # ifdef HAVE_LCD_INVERT | 223 | # ifdef HAVE_LCD_INVERT |
231 | ,&invert | 224 | ,&invert |
232 | # endif | 225 | # endif |
233 | # ifdef HAVE_LCD_FLIP | 226 | # ifdef HAVE_LCD_FLIP |
234 | ,&flip_display | 227 | ,&flip_display |
235 | # endif | 228 | # endif |
236 | #endif /* HAVE_LCD_BITMAP */ | ||
237 | ); | 229 | ); |
238 | /* LCD MENU */ | 230 | /* LCD MENU */ |
239 | /***********************************/ | 231 | /***********************************/ |
@@ -318,10 +310,8 @@ MAKE_MENU(lcd_remote_settings, ID2P(LANG_LCD_REMOTE_MENU), | |||
318 | MENUITEM_SETTING_W_TEXT(scroll_speed, &global_settings.scroll_speed, | 310 | MENUITEM_SETTING_W_TEXT(scroll_speed, &global_settings.scroll_speed, |
319 | ID2P(LANG_SCROLL), NULL); | 311 | ID2P(LANG_SCROLL), NULL); |
320 | MENUITEM_SETTING(scroll_delay, &global_settings.scroll_delay, NULL); | 312 | MENUITEM_SETTING(scroll_delay, &global_settings.scroll_delay, NULL); |
321 | #ifdef HAVE_LCD_BITMAP | ||
322 | MENUITEM_SETTING_W_TEXT(scroll_step, &global_settings.scroll_step, | 313 | MENUITEM_SETTING_W_TEXT(scroll_step, &global_settings.scroll_step, |
323 | ID2P(LANG_SCROLL_STEP_EXAMPLE), NULL); | 314 | ID2P(LANG_SCROLL_STEP_EXAMPLE), NULL); |
324 | #endif | ||
325 | MENUITEM_SETTING(bidir_limit, &global_settings.bidir_limit, NULL); | 315 | MENUITEM_SETTING(bidir_limit, &global_settings.bidir_limit, NULL); |
326 | #ifdef HAVE_REMOTE_LCD | 316 | #ifdef HAVE_REMOTE_LCD |
327 | MENUITEM_SETTING_W_TEXT(remote_scroll_speed, &global_settings.remote_scroll_speed, | 317 | MENUITEM_SETTING_W_TEXT(remote_scroll_speed, &global_settings.remote_scroll_speed, |
@@ -342,7 +332,6 @@ MENUITEM_SETTING(list_accel_start_delay, | |||
342 | &global_settings.list_accel_start_delay, NULL); | 332 | &global_settings.list_accel_start_delay, NULL); |
343 | MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); | 333 | MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL); |
344 | #endif /* HAVE_WHEEL_ACCELERATION */ | 334 | #endif /* HAVE_WHEEL_ACCELERATION */ |
345 | #ifdef HAVE_LCD_BITMAP | ||
346 | static int screenscroll_callback(int action, | 335 | static int screenscroll_callback(int action, |
347 | const struct menu_item_ex *this_item, | 336 | const struct menu_item_ex *this_item, |
348 | struct gui_synclist *this_list) | 337 | struct gui_synclist *this_list) |
@@ -360,21 +349,16 @@ static int screenscroll_callback(int action, | |||
360 | MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, | 349 | MENUITEM_SETTING(offset_out_of_view, &global_settings.offset_out_of_view, |
361 | screenscroll_callback); | 350 | screenscroll_callback); |
362 | MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL); | 351 | MENUITEM_SETTING(screen_scroll_step, &global_settings.screen_scroll_step, NULL); |
363 | #endif | ||
364 | MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL); | 352 | MENUITEM_SETTING(scroll_paginated, &global_settings.scroll_paginated, NULL); |
365 | 353 | ||
366 | MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON, | 354 | MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON, |
367 | &scroll_speed, &scroll_delay, | 355 | &scroll_speed, &scroll_delay, |
368 | #ifdef HAVE_LCD_BITMAP | ||
369 | &scroll_step, | 356 | &scroll_step, |
370 | #endif | ||
371 | &bidir_limit, | 357 | &bidir_limit, |
372 | #ifdef HAVE_REMOTE_LCD | 358 | #ifdef HAVE_REMOTE_LCD |
373 | &remote_scroll_sets, | 359 | &remote_scroll_sets, |
374 | #endif | 360 | #endif |
375 | #ifdef HAVE_LCD_BITMAP | ||
376 | &offset_out_of_view, &screen_scroll_step, | 361 | &offset_out_of_view, &screen_scroll_step, |
377 | #endif | ||
378 | &scroll_paginated, | 362 | &scroll_paginated, |
379 | #ifndef HAVE_WHEEL_ACCELERATION | 363 | #ifndef HAVE_WHEEL_ACCELERATION |
380 | &list_accel_start_delay, &list_accel_wait | 364 | &list_accel_start_delay, &list_accel_wait |
@@ -386,7 +370,6 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON, | |||
386 | /***********************************/ | 370 | /***********************************/ |
387 | /* PEAK METER MENU */ | 371 | /* PEAK METER MENU */ |
388 | 372 | ||
389 | #ifdef HAVE_LCD_BITMAP | ||
390 | static int peakmeter_callback(int action, | 373 | static int peakmeter_callback(int action, |
391 | const struct menu_item_ex *this_item, | 374 | const struct menu_item_ex *this_item, |
392 | struct gui_synclist *this_list) | 375 | struct gui_synclist *this_list) |
@@ -570,7 +553,6 @@ MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON, | |||
570 | &histogram, | 553 | &histogram, |
571 | #endif | 554 | #endif |
572 | &peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item); | 555 | &peak_meter_scale_item, &peak_meter_min_item, &peak_meter_max_item); |
573 | #endif /* HAVE_LCD_BITMAP */ | ||
574 | /* PEAK METER MENU */ | 556 | /* PEAK METER MENU */ |
575 | /***********************************/ | 557 | /***********************************/ |
576 | 558 | ||
@@ -645,9 +627,7 @@ MAKE_MENU(display_menu, ID2P(LANG_DISPLAY), | |||
645 | &lcd_remote_settings, | 627 | &lcd_remote_settings, |
646 | #endif | 628 | #endif |
647 | &scroll_settings_menu, | 629 | &scroll_settings_menu, |
648 | #ifdef HAVE_LCD_BITMAP | ||
649 | &peak_meter_menu, | 630 | &peak_meter_menu, |
650 | #endif | ||
651 | &codepage_setting, | 631 | &codepage_setting, |
652 | #ifdef HAVE_TOUCHSCREEN | 632 | #ifdef HAVE_TOUCHSCREEN |
653 | &touchscreen_menu, | 633 | &touchscreen_menu, |
diff --git a/apps/menus/exported_menus.h b/apps/menus/exported_menus.h index efb6341155..93cabb0f2e 100644 --- a/apps/menus/exported_menus.h +++ b/apps/menus/exported_menus.h | |||
@@ -31,10 +31,8 @@ extern const struct menu_item_ex | |||
31 | #ifdef HAVE_RECORDING | 31 | #ifdef HAVE_RECORDING |
32 | recording_settings, /* recording_menu.c */ | 32 | recording_settings, /* recording_menu.c */ |
33 | recording_settings_menu, | 33 | recording_settings_menu, |
34 | #ifdef HAVE_LCD_BITMAP | ||
35 | peak_meter_menu, /* also used from within recording_menu */ | 34 | peak_meter_menu, /* also used from within recording_menu */ |
36 | #endif | 35 | #endif |
37 | #endif | ||
38 | sound_settings, /* sound_menu.c */ | 36 | sound_settings, /* sound_menu.c */ |
39 | settings_menu_item, /* settings_menu.c */ | 37 | settings_menu_item, /* settings_menu.c */ |
40 | bookmark_settings_menu, | 38 | bookmark_settings_menu, |
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index c841de4e89..c3187afbef 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c | |||
@@ -32,10 +32,8 @@ | |||
32 | #include "settings.h" | 32 | #include "settings.h" |
33 | #include "screens.h" | 33 | #include "screens.h" |
34 | #include "icons.h" | 34 | #include "icons.h" |
35 | #ifdef HAVE_LCD_BITMAP | ||
36 | #include "font.h" | 35 | #include "font.h" |
37 | #include "scrollbar.h" | 36 | #include "scrollbar.h" |
38 | #endif | ||
39 | #include "lang.h" | 37 | #include "lang.h" |
40 | #include "talk.h" | 38 | #include "talk.h" |
41 | #include "misc.h" | 39 | #include "misc.h" |
@@ -601,9 +599,7 @@ MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS), | |||
601 | #ifdef HAVE_AGC | 599 | #ifdef HAVE_AGC |
602 | &agc_preset, &agc_cliptime, | 600 | &agc_preset, &agc_cliptime, |
603 | #endif | 601 | #endif |
604 | #ifdef HAVE_LCD_BITMAP | ||
605 | &peak_meter_menu, | 602 | &peak_meter_menu, |
606 | #endif | ||
607 | &browse_recconfigs, &save_recpresets_item | 603 | &browse_recconfigs, &save_recpresets_item |
608 | ); | 604 | ); |
609 | 605 | ||
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index e2b496a6f7..431600bbe1 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -187,9 +187,7 @@ MENUITEM_SETTING(interpret_numbers, &global_settings.interpret_numbers, fileview | |||
187 | MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL); | 187 | MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL); |
188 | MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL); | 188 | MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL); |
189 | MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL); | 189 | MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL); |
190 | #ifdef HAVE_LCD_BITMAP | ||
191 | MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL); | 190 | MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL); |
192 | #endif | ||
193 | static int clear_start_directory(void) | 191 | static int clear_start_directory(void) |
194 | { | 192 | { |
195 | strcpy(global_settings.start_directory, "/"); | 193 | strcpy(global_settings.start_directory, "/"); |
@@ -222,9 +220,7 @@ static int fileview_callback(int action, | |||
222 | MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu, | 220 | MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu, |
223 | &sort_case, &sort_dir, &sort_file, &interpret_numbers, | 221 | &sort_case, &sort_dir, &sort_file, &interpret_numbers, |
224 | &dirfilter, &show_filename_ext, &browse_current, | 222 | &dirfilter, &show_filename_ext, &browse_current, |
225 | #ifdef HAVE_LCD_BITMAP | ||
226 | &show_path_in_browser, | 223 | &show_path_in_browser, |
227 | #endif | ||
228 | &clear_start_directory_item | 224 | &clear_start_directory_item |
229 | ); | 225 | ); |
230 | /* FILE VIEW MENU */ | 226 | /* FILE VIEW MENU */ |
@@ -312,14 +308,10 @@ MAKE_MENU(disk_menu, ID2P(LANG_DISK_MENU), 0, Icon_NOICON, | |||
312 | /* Limits menu */ | 308 | /* Limits menu */ |
313 | MENUITEM_SETTING(max_files_in_dir, &global_settings.max_files_in_dir, NULL); | 309 | MENUITEM_SETTING(max_files_in_dir, &global_settings.max_files_in_dir, NULL); |
314 | MENUITEM_SETTING(max_files_in_playlist, &global_settings.max_files_in_playlist, NULL); | 310 | MENUITEM_SETTING(max_files_in_playlist, &global_settings.max_files_in_playlist, NULL); |
315 | #ifdef HAVE_LCD_BITMAP | ||
316 | MENUITEM_SETTING(default_glyphs, &global_settings.glyphs_to_cache, NULL); | 311 | MENUITEM_SETTING(default_glyphs, &global_settings.glyphs_to_cache, NULL); |
317 | #endif | ||
318 | MAKE_MENU(limits_menu, ID2P(LANG_LIMITS_MENU), 0, Icon_NOICON, | 312 | MAKE_MENU(limits_menu, ID2P(LANG_LIMITS_MENU), 0, Icon_NOICON, |
319 | &max_files_in_dir, &max_files_in_playlist | 313 | &max_files_in_dir, &max_files_in_playlist |
320 | #ifdef HAVE_LCD_BITMAP | ||
321 | ,&default_glyphs | 314 | ,&default_glyphs |
322 | #endif | ||
323 | ); | 315 | ); |
324 | 316 | ||
325 | 317 | ||
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index 138a2f928a..a160d4c298 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c | |||
@@ -159,7 +159,6 @@ MAKE_MENU(colors_settings, ID2P(LANG_COLORS_MENU), | |||
159 | /* */ | 159 | /* */ |
160 | 160 | ||
161 | 161 | ||
162 | #ifdef HAVE_LCD_BITMAP | ||
163 | static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item, | 162 | static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item, |
164 | enum screen_type screen) | 163 | enum screen_type screen) |
165 | { | 164 | { |
@@ -218,19 +217,16 @@ MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON, | |||
218 | , &battery_display | 217 | , &battery_display |
219 | #endif | 218 | #endif |
220 | ); | 219 | ); |
221 | #endif /* HAVE_LCD_BITMAP */ | ||
222 | 220 | ||
223 | /* */ | 221 | /* */ |
224 | /* BARS MENU */ | 222 | /* BARS MENU */ |
225 | /************************************/ | 223 | /************************************/ |
226 | 224 | ||
227 | #ifdef HAVE_LCD_BITMAP | ||
228 | static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT}; | 225 | static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT}; |
229 | static struct browse_folder_info sbs = {SBS_DIR, SHOW_SBS}; | 226 | static struct browse_folder_info sbs = {SBS_DIR, SHOW_SBS}; |
230 | #if CONFIG_TUNER | 227 | #if CONFIG_TUNER |
231 | static struct browse_folder_info fms = {WPS_DIR, SHOW_FMS}; | 228 | static struct browse_folder_info fms = {WPS_DIR, SHOW_FMS}; |
232 | #endif | 229 | #endif |
233 | #endif | ||
234 | static struct browse_folder_info wps = {WPS_DIR, SHOW_WPS}; | 230 | static struct browse_folder_info wps = {WPS_DIR, SHOW_WPS}; |
235 | #ifdef HAVE_REMOTE_LCD | 231 | #ifdef HAVE_REMOTE_LCD |
236 | static struct browse_folder_info rwps = {WPS_DIR, SHOW_RWPS}; | 232 | static struct browse_folder_info rwps = {WPS_DIR, SHOW_RWPS}; |
@@ -268,7 +264,6 @@ int browse_folder(void *param) | |||
268 | setting = global_settings.wps_file; | 264 | setting = global_settings.wps_file; |
269 | lang_id = LANG_WHILE_PLAYING; | 265 | lang_id = LANG_WHILE_PLAYING; |
270 | break; | 266 | break; |
271 | #ifdef HAVE_LCD_BITMAP | ||
272 | case SHOW_FONT: | 267 | case SHOW_FONT: |
273 | ext = "fnt"; | 268 | ext = "fnt"; |
274 | setting = global_settings.font_file; | 269 | setting = global_settings.font_file; |
@@ -286,7 +281,6 @@ int browse_folder(void *param) | |||
286 | lang_id = LANG_RADIOSCREEN; | 281 | lang_id = LANG_RADIOSCREEN; |
287 | break; | 282 | break; |
288 | #endif /* CONFIG_TUNER */ | 283 | #endif /* CONFIG_TUNER */ |
289 | #endif | ||
290 | #ifdef HAVE_REMOTE_LCD | 284 | #ifdef HAVE_REMOTE_LCD |
291 | case SHOW_RWPS: | 285 | case SHOW_RWPS: |
292 | ext = "rwps"; | 286 | ext = "rwps"; |
@@ -324,7 +318,6 @@ int browse_folder(void *param) | |||
324 | return rockbox_browse(&browse); | 318 | return rockbox_browse(&browse); |
325 | } | 319 | } |
326 | 320 | ||
327 | #ifdef HAVE_LCD_BITMAP | ||
328 | MENUITEM_FUNCTION(browse_fonts, MENU_FUNC_USEPARAM, | 321 | MENUITEM_FUNCTION(browse_fonts, MENU_FUNC_USEPARAM, |
329 | ID2P(LANG_CUSTOM_FONT), | 322 | ID2P(LANG_CUSTOM_FONT), |
330 | browse_folder, (void*)&fonts, NULL, Icon_Font); | 323 | browse_folder, (void*)&fonts, NULL, Icon_Font); |
@@ -337,7 +330,6 @@ MENUITEM_FUNCTION(browse_fms, MENU_FUNC_USEPARAM, | |||
337 | ID2P(LANG_RADIOSCREEN), | 330 | ID2P(LANG_RADIOSCREEN), |
338 | browse_folder, (void*)&fms, NULL, Icon_Wps); | 331 | browse_folder, (void*)&fms, NULL, Icon_Wps); |
339 | #endif | 332 | #endif |
340 | #endif | ||
341 | MENUITEM_FUNCTION(browse_wps, MENU_FUNC_USEPARAM, | 333 | MENUITEM_FUNCTION(browse_wps, MENU_FUNC_USEPARAM, |
342 | ID2P(LANG_WHILE_PLAYING), | 334 | ID2P(LANG_WHILE_PLAYING), |
343 | browse_folder, (void*)&wps, NULL, Icon_Wps); | 335 | browse_folder, (void*)&wps, NULL, Icon_Wps); |
@@ -380,9 +372,7 @@ MENUITEM_SETTING(show_icons, &global_settings.show_icons, showicons_callback); | |||
380 | MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, | 372 | MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, |
381 | ID2P(LANG_CUSTOM_THEME), | 373 | ID2P(LANG_CUSTOM_THEME), |
382 | browse_folder, (void*)&themes, NULL, Icon_Config); | 374 | browse_folder, (void*)&themes, NULL, Icon_Config); |
383 | #ifdef HAVE_LCD_BITMAP | ||
384 | MENUITEM_SETTING(cursor_style, &global_settings.cursor_style, NULL); | 375 | MENUITEM_SETTING(cursor_style, &global_settings.cursor_style, NULL); |
385 | #endif | ||
386 | #if LCD_DEPTH > 1 | 376 | #if LCD_DEPTH > 1 |
387 | MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL); | 377 | MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL); |
388 | #endif | 378 | #endif |
@@ -390,9 +380,7 @@ MENUITEM_SETTING(sep_menu, &global_settings.list_separator_height, NULL); | |||
390 | MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), | 380 | MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), |
391 | NULL, Icon_Wps, | 381 | NULL, Icon_Wps, |
392 | &browse_themes, | 382 | &browse_themes, |
393 | #ifdef HAVE_LCD_BITMAP | ||
394 | &browse_fonts, | 383 | &browse_fonts, |
395 | #endif | ||
396 | &browse_wps, | 384 | &browse_wps, |
397 | #ifdef HAVE_REMOTE_LCD | 385 | #ifdef HAVE_REMOTE_LCD |
398 | &browse_rwps, | 386 | &browse_rwps, |
@@ -403,9 +391,7 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), | |||
403 | &browse_rfms, | 391 | &browse_rfms, |
404 | #endif | 392 | #endif |
405 | #endif | 393 | #endif |
406 | #ifdef HAVE_LCD_BITMAP | ||
407 | &browse_sbs, | 394 | &browse_sbs, |
408 | #endif | ||
409 | #ifdef HAVE_REMOTE_LCD | 395 | #ifdef HAVE_REMOTE_LCD |
410 | &browse_rsbs, | 396 | &browse_rsbs, |
411 | #endif | 397 | #endif |
@@ -413,7 +399,6 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), | |||
413 | #ifdef HAVE_BACKDROP_IMAGE | 399 | #ifdef HAVE_BACKDROP_IMAGE |
414 | &clear_main_bd, | 400 | &clear_main_bd, |
415 | #endif | 401 | #endif |
416 | #ifdef HAVE_LCD_BITMAP | ||
417 | &bars_menu, | 402 | &bars_menu, |
418 | &cursor_style, | 403 | &cursor_style, |
419 | #if LCD_DEPTH > 1 | 404 | #if LCD_DEPTH > 1 |
@@ -422,5 +407,4 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU), | |||
422 | #ifdef HAVE_LCD_COLOR | 407 | #ifdef HAVE_LCD_COLOR |
423 | &colors_settings, | 408 | &colors_settings, |
424 | #endif | 409 | #endif |
425 | #endif /* HAVE_LCD_BITMAP */ | ||
426 | ); | 410 | ); |
diff --git a/apps/misc.c b/apps/misc.c index b20a0095ab..2d60ecca49 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -84,10 +84,10 @@ | |||
84 | #if defined(HAVE_RECORDING) && !defined(__PCTOOL__) | 84 | #if defined(HAVE_RECORDING) && !defined(__PCTOOL__) |
85 | #include "recording.h" | 85 | #include "recording.h" |
86 | #endif | 86 | #endif |
87 | #if defined(HAVE_LCD_BITMAP) && !defined(__PCTOOL__) | 87 | #if !defined(__PCTOOL__) |
88 | #include "bmp.h" | 88 | #include "bmp.h" |
89 | #include "icons.h" | 89 | #include "icons.h" |
90 | #endif /* End HAVE_LCD_BITMAP */ | 90 | #endif /* !__PCTOOL__ */ |
91 | #include "bookmark.h" | 91 | #include "bookmark.h" |
92 | #include "wps.h" | 92 | #include "wps.h" |
93 | #include "playback.h" | 93 | #include "playback.h" |
@@ -712,7 +712,6 @@ long default_event_handler(long event) | |||
712 | 712 | ||
713 | int show_logo( void ) | 713 | int show_logo( void ) |
714 | { | 714 | { |
715 | #ifdef HAVE_LCD_BITMAP | ||
716 | char version[32]; | 715 | char version[32]; |
717 | int font_h, font_w; | 716 | int font_h, font_w; |
718 | 717 | ||
@@ -735,14 +734,6 @@ int show_logo( void ) | |||
735 | #endif | 734 | #endif |
736 | lcd_setfont(FONT_UI); | 735 | lcd_setfont(FONT_UI); |
737 | 736 | ||
738 | #else | ||
739 | char *rockbox = " ROCKbox!"; | ||
740 | |||
741 | lcd_clear_display(); | ||
742 | lcd_double_height(true); | ||
743 | lcd_puts(0, 0, rockbox); | ||
744 | lcd_puts_scroll(0, 1, rbversion); | ||
745 | #endif | ||
746 | lcd_update(); | 737 | lcd_update(); |
747 | 738 | ||
748 | #ifdef HAVE_REMOTE_LCD | 739 | #ifdef HAVE_REMOTE_LCD |
@@ -1439,7 +1430,6 @@ int hex_to_rgb(const char* hex, int* color) | |||
1439 | } | 1430 | } |
1440 | #endif /* HAVE_LCD_COLOR */ | 1431 | #endif /* HAVE_LCD_COLOR */ |
1441 | 1432 | ||
1442 | #ifdef HAVE_LCD_BITMAP | ||
1443 | /* '0'-'3' are ASCII 0x30 to 0x33 */ | 1433 | /* '0'-'3' are ASCII 0x30 to 0x33 */ |
1444 | #define is0123(x) (((x) & 0xfc) == 0x30) | 1434 | #define is0123(x) (((x) & 0xfc) == 0x30) |
1445 | #if !defined(__PCTOOL__) || defined(CHECKWPS) | 1435 | #if !defined(__PCTOOL__) || defined(CHECKWPS) |
@@ -1482,7 +1472,6 @@ int clamp_value_wrap(int value, int max, int min) | |||
1482 | return value; | 1472 | return value; |
1483 | } | 1473 | } |
1484 | #endif | 1474 | #endif |
1485 | #endif | ||
1486 | 1475 | ||
1487 | 1476 | ||
1488 | #ifndef __PCTOOL__ | 1477 | #ifndef __PCTOOL__ |
@@ -1494,25 +1483,21 @@ static int current_activity_top = 0; | |||
1494 | void push_current_activity(enum current_activity screen) | 1483 | void push_current_activity(enum current_activity screen) |
1495 | { | 1484 | { |
1496 | current_activity[current_activity_top++] = screen; | 1485 | current_activity[current_activity_top++] = screen; |
1497 | #ifdef HAVE_LCD_BITMAP | ||
1498 | FOR_NB_SCREENS(i) | 1486 | FOR_NB_SCREENS(i) |
1499 | { | 1487 | { |
1500 | skinlist_set_cfg(i, NULL); | 1488 | skinlist_set_cfg(i, NULL); |
1501 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1489 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); |
1502 | } | 1490 | } |
1503 | #endif | ||
1504 | } | 1491 | } |
1505 | 1492 | ||
1506 | void pop_current_activity(void) | 1493 | void pop_current_activity(void) |
1507 | { | 1494 | { |
1508 | current_activity_top--; | 1495 | current_activity_top--; |
1509 | #ifdef HAVE_LCD_BITMAP | ||
1510 | FOR_NB_SCREENS(i) | 1496 | FOR_NB_SCREENS(i) |
1511 | { | 1497 | { |
1512 | skinlist_set_cfg(i, NULL); | 1498 | skinlist_set_cfg(i, NULL); |
1513 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1499 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); |
1514 | } | 1500 | } |
1515 | #endif | ||
1516 | } | 1501 | } |
1517 | enum current_activity get_current_activity(void) | 1502 | enum current_activity get_current_activity(void) |
1518 | { | 1503 | { |
diff --git a/apps/misc.h b/apps/misc.h index 10626dfaf4..c4057f4ebc 100644 --- a/apps/misc.h +++ b/apps/misc.h | |||
@@ -147,14 +147,12 @@ char* skip_whitespace(char* const str); | |||
147 | */ | 147 | */ |
148 | char *strip_extension(char* buffer, int buffer_size, const char *filename); | 148 | char *strip_extension(char* buffer, int buffer_size, const char *filename); |
149 | 149 | ||
150 | #ifdef HAVE_LCD_BITMAP | ||
151 | bool parse_color(enum screen_type screen, char *text, int *value); | 150 | bool parse_color(enum screen_type screen, char *text, int *value); |
152 | 151 | ||
153 | /* only used in USB HID and set_time screen */ | 152 | /* only used in USB HID and set_time screen */ |
154 | #if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0) | 153 | #if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0) |
155 | int clamp_value_wrap(int value, int max, int min); | 154 | int clamp_value_wrap(int value, int max, int min); |
156 | #endif | 155 | #endif |
157 | #endif | ||
158 | 156 | ||
159 | enum current_activity { | 157 | enum current_activity { |
160 | ACTIVITY_UNKNOWN = 0, | 158 | ACTIVITY_UNKNOWN = 0, |
diff --git a/apps/onplay.c b/apps/onplay.c index 9226f32f4c..fd956167d3 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -49,9 +49,7 @@ | |||
49 | #include "splash.h" | 49 | #include "splash.h" |
50 | #include "yesno.h" | 50 | #include "yesno.h" |
51 | #include "menus/exported_menus.h" | 51 | #include "menus/exported_menus.h" |
52 | #ifdef HAVE_LCD_BITMAP | ||
53 | #include "icons.h" | 52 | #include "icons.h" |
54 | #endif | ||
55 | #include "sound_menu.h" | 53 | #include "sound_menu.h" |
56 | #include "playlist_menu.h" | 54 | #include "playlist_menu.h" |
57 | #include "playlist_catalog.h" | 55 | #include "playlist_catalog.h" |
@@ -794,7 +792,6 @@ static int cat_playlist_callback(int action, | |||
794 | return action; | 792 | return action; |
795 | } | 793 | } |
796 | 794 | ||
797 | #ifdef HAVE_LCD_BITMAP | ||
798 | static void draw_slider(void) | 795 | static void draw_slider(void) |
799 | { | 796 | { |
800 | FOR_NB_SCREENS(i) | 797 | FOR_NB_SCREENS(i) |
@@ -809,9 +806,6 @@ static void draw_slider(void) | |||
809 | screens[i].set_viewport(NULL); | 806 | screens[i].set_viewport(NULL); |
810 | } | 807 | } |
811 | } | 808 | } |
812 | #else | ||
813 | #define draw_slider() | ||
814 | #endif | ||
815 | 809 | ||
816 | static void clear_display(bool update) | 810 | static void clear_display(bool update) |
817 | { | 811 | { |
diff --git a/apps/playback.c b/apps/playback.c index e9014ee7b6..2d9747e86a 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -46,11 +46,9 @@ | |||
46 | #include "tagcache.h" | 46 | #include "tagcache.h" |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef HAVE_LCD_BITMAP | ||
50 | #ifdef HAVE_ALBUMART | 49 | #ifdef HAVE_ALBUMART |
51 | #include "albumart.h" | 50 | #include "albumart.h" |
52 | #endif | 51 | #endif |
53 | #endif | ||
54 | 52 | ||
55 | #ifdef HAVE_PLAY_FREQ | 53 | #ifdef HAVE_PLAY_FREQ |
56 | #include "pcm_mixer.h" | 54 | #include "pcm_mixer.h" |
diff --git a/apps/playlist.c b/apps/playlist.c index f903458004..34a3ea53d2 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -93,9 +93,7 @@ | |||
93 | #include "thread.h" | 93 | #include "thread.h" |
94 | #include "usb.h" | 94 | #include "usb.h" |
95 | #include "filetypes.h" | 95 | #include "filetypes.h" |
96 | #ifdef HAVE_LCD_BITMAP | ||
97 | #include "icons.h" | 96 | #include "icons.h" |
98 | #endif | ||
99 | #include "system.h" | 97 | #include "system.h" |
100 | 98 | ||
101 | #include "lang.h" | 99 | #include "lang.h" |
diff --git a/apps/plugin.c b/apps/plugin.c index 4c0f44b2e8..4fe8544527 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -50,12 +50,10 @@ | |||
50 | #include "power.h" | 50 | #include "power.h" |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef HAVE_LCD_BITMAP | ||
54 | #include "scrollbar.h" | 53 | #include "scrollbar.h" |
55 | #include "peakmeter.h" | 54 | #include "peakmeter.h" |
56 | #include "bmp.h" | 55 | #include "bmp.h" |
57 | #include "bidi.h" | 56 | #include "bidi.h" |
58 | #endif | ||
59 | 57 | ||
60 | #ifdef USB_ENABLE_HID | 58 | #ifdef USB_ENABLE_HID |
61 | #include "usbstack/usb_hid.h" | 59 | #include "usbstack/usb_hid.h" |
@@ -301,11 +299,9 @@ static const struct plugin_api rockbox_api = { | |||
301 | #endif | 299 | #endif |
302 | 300 | ||
303 | viewport_set_defaults, | 301 | viewport_set_defaults, |
304 | #ifdef HAVE_LCD_BITMAP | ||
305 | viewportmanager_theme_enable, | 302 | viewportmanager_theme_enable, |
306 | viewportmanager_theme_undo, | 303 | viewportmanager_theme_undo, |
307 | viewport_set_fullscreen, | 304 | viewport_set_fullscreen, |
308 | #endif | ||
309 | 305 | ||
310 | #ifdef HAVE_BACKLIGHT | 306 | #ifdef HAVE_BACKLIGHT |
311 | /* lcd backlight */ | 307 | /* lcd backlight */ |
@@ -533,7 +529,7 @@ static const struct plugin_api rockbox_api = { | |||
533 | 529 | ||
534 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 530 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
535 | /* special simulator hooks */ | 531 | /* special simulator hooks */ |
536 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 | 532 | #if LCD_DEPTH < 8 |
537 | sim_lcd_ex_init, | 533 | sim_lcd_ex_init, |
538 | sim_lcd_ex_update_rect, | 534 | sim_lcd_ex_update_rect, |
539 | #endif | 535 | #endif |
@@ -780,7 +776,6 @@ static const struct plugin_api rockbox_api = { | |||
780 | remove_array_ptr, | 776 | remove_array_ptr, |
781 | round_value_to_list32, | 777 | round_value_to_list32, |
782 | 778 | ||
783 | #ifdef HAVE_LCD_BITMAP | ||
784 | read_bmp_file, | 779 | read_bmp_file, |
785 | read_bmp_fd, | 780 | read_bmp_fd, |
786 | #ifdef HAVE_JPEG | 781 | #ifdef HAVE_JPEG |
@@ -788,7 +783,6 @@ static const struct plugin_api rockbox_api = { | |||
788 | read_jpeg_fd, | 783 | read_jpeg_fd, |
789 | #endif | 784 | #endif |
790 | screen_dump_set_hook, | 785 | screen_dump_set_hook, |
791 | #endif | ||
792 | show_logo, | 786 | show_logo, |
793 | 787 | ||
794 | #ifdef HAVE_WHEEL_POSITION | 788 | #ifdef HAVE_WHEEL_POSITION |
@@ -927,7 +921,6 @@ int plugin_load(const char* plugin, const void* parameter) | |||
927 | touchscreen_set_mode(global_settings.touch_mode); | 921 | touchscreen_set_mode(global_settings.touch_mode); |
928 | #endif | 922 | #endif |
929 | 923 | ||
930 | #ifdef HAVE_LCD_BITMAP | ||
931 | screen_helper_setfont(FONT_UI); | 924 | screen_helper_setfont(FONT_UI); |
932 | #if LCD_DEPTH > 1 | 925 | #if LCD_DEPTH > 1 |
933 | #ifdef HAVE_LCD_COLOR | 926 | #ifdef HAVE_LCD_COLOR |
@@ -939,8 +932,6 @@ int plugin_load(const char* plugin, const void* parameter) | |||
939 | #else /* LCD_DEPTH == 1 */ | 932 | #else /* LCD_DEPTH == 1 */ |
940 | lcd_set_drawmode(DRMODE_SOLID); | 933 | lcd_set_drawmode(DRMODE_SOLID); |
941 | #endif /* LCD_DEPTH */ | 934 | #endif /* LCD_DEPTH */ |
942 | #endif /* HAVE_LCD_BITMAP */ | ||
943 | |||
944 | 935 | ||
945 | #ifdef HAVE_REMOTE_LCD | 936 | #ifdef HAVE_REMOTE_LCD |
946 | #if LCD_REMOTE_DEPTH > 1 | 937 | #if LCD_REMOTE_DEPTH > 1 |
diff --git a/apps/plugin.h b/apps/plugin.h index 41f65947a3..2fe40535ec 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -89,12 +89,10 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
89 | #include "settings.h" | 89 | #include "settings.h" |
90 | #include "timer.h" | 90 | #include "timer.h" |
91 | #include "playlist.h" | 91 | #include "playlist.h" |
92 | #ifdef HAVE_LCD_BITMAP | ||
93 | #include "screendump.h" | 92 | #include "screendump.h" |
94 | #include "scrollbar.h" | 93 | #include "scrollbar.h" |
95 | #include "jpeg_load.h" | 94 | #include "jpeg_load.h" |
96 | #include "../recorder/bmp.h" | 95 | #include "../recorder/bmp.h" |
97 | #endif | ||
98 | #include "statusbar.h" | 96 | #include "statusbar.h" |
99 | #include "menu.h" | 97 | #include "menu.h" |
100 | #include "rbunicode.h" | 98 | #include "rbunicode.h" |
@@ -156,12 +154,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
156 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 154 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
157 | 155 | ||
158 | /* increase this every time the api struct changes */ | 156 | /* increase this every time the api struct changes */ |
159 | #define PLUGIN_API_VERSION 238 | 157 | #define PLUGIN_API_VERSION 239 |
160 | 158 | ||
161 | /* update this to latest version if a change to the api struct breaks | 159 | /* update this to latest version if a change to the api struct breaks |
162 | backwards compatibility (and please take the opportunity to sort in any | 160 | backwards compatibility (and please take the opportunity to sort in any |
163 | new function which are "waiting" at the end of the function table) */ | 161 | new function which are "waiting" at the end of the function table) */ |
164 | #define PLUGIN_MIN_API_VERSION 238 | 162 | #define PLUGIN_MIN_API_VERSION 239 |
165 | 163 | ||
166 | /* plugin return codes */ | 164 | /* plugin return codes */ |
167 | /* internal returns start at 0x100 to make exit(1..255) work */ | 165 | /* internal returns start at 0x100 to make exit(1..255) work */ |
@@ -331,13 +329,11 @@ struct plugin_api { | |||
331 | 329 | ||
332 | void (*viewport_set_defaults)(struct viewport *vp, | 330 | void (*viewport_set_defaults)(struct viewport *vp, |
333 | const enum screen_type screen); | 331 | const enum screen_type screen); |
334 | #ifdef HAVE_LCD_BITMAP | ||
335 | void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable, | 332 | void (*viewportmanager_theme_enable)(enum screen_type screen, bool enable, |
336 | struct viewport *viewport); | 333 | struct viewport *viewport); |
337 | void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw); | 334 | void (*viewportmanager_theme_undo)(enum screen_type screen, bool force_redraw); |
338 | void (*viewport_set_fullscreen)(struct viewport *vp, | 335 | void (*viewport_set_fullscreen)(struct viewport *vp, |
339 | const enum screen_type screen); | 336 | const enum screen_type screen); |
340 | #endif | ||
341 | 337 | ||
342 | #ifdef HAVE_BACKLIGHT | 338 | #ifdef HAVE_BACKLIGHT |
343 | /* lcd backlight */ | 339 | /* lcd backlight */ |
@@ -597,7 +593,7 @@ struct plugin_api { | |||
597 | 593 | ||
598 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 594 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
599 | /* special simulator hooks */ | 595 | /* special simulator hooks */ |
600 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 | 596 | #if LCD_DEPTH < 8 |
601 | void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int)); | 597 | void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int)); |
602 | void (*sim_lcd_ex_update_rect)(int x, int y, int width, int height); | 598 | void (*sim_lcd_ex_update_rect)(int x, int y, int width, int height); |
603 | #endif | 599 | #endif |
@@ -900,7 +896,6 @@ struct plugin_api { | |||
900 | int count, | 896 | int count, |
901 | bool signd); | 897 | bool signd); |
902 | 898 | ||
903 | #ifdef HAVE_LCD_BITMAP | ||
904 | int (*read_bmp_file)(const char* filename, struct bitmap *bm, int maxsize, | 899 | int (*read_bmp_file)(const char* filename, struct bitmap *bm, int maxsize, |
905 | int format, const struct custom_format *cformat); | 900 | int format, const struct custom_format *cformat); |
906 | int (*read_bmp_fd)(int fd, struct bitmap *bm, int maxsize, | 901 | int (*read_bmp_fd)(int fd, struct bitmap *bm, int maxsize, |
@@ -912,7 +907,6 @@ struct plugin_api { | |||
912 | int format, const struct custom_format *cformat); | 907 | int format, const struct custom_format *cformat); |
913 | #endif | 908 | #endif |
914 | void (*screen_dump_set_hook)(void (*hook)(int fh)); | 909 | void (*screen_dump_set_hook)(void (*hook)(int fh)); |
915 | #endif | ||
916 | int (*show_logo)(void); | 910 | int (*show_logo)(void); |
917 | 911 | ||
918 | #ifdef HAVE_WHEEL_POSITION | 912 | #ifdef HAVE_WHEEL_POSITION |
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 @@ | |||
41 | #include "lib/pluginlib_actions.h" | 41 | #include "lib/pluginlib_actions.h" |
42 | #include "lib/pluginlib_exit.h" | 42 | #include "lib/pluginlib_exit.h" |
43 | 43 | ||
44 | #ifdef HAVE_LCD_BITMAP | ||
45 | #include "pluginbitmaps/_2048_background.h" | 44 | #include "pluginbitmaps/_2048_background.h" |
46 | #include "pluginbitmaps/_2048_tiles.h" | 45 | #include "pluginbitmaps/_2048_tiles.h" |
47 | #endif | ||
48 | 46 | ||
49 | /* some constants */ | 47 | /* some constants */ |
50 | 48 | ||
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 | |||
79 | #endif | 79 | #endif |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #if PLUGIN_BUFFER_SIZE <= 0x20000 && defined(HAVE_LCD_BITMAP) | 82 | #if PLUGIN_BUFFER_SIZE <= 0x20000 |
83 | 83 | ||
84 | #if CONFIG_KEYPAD != SANSA_M200_PAD \ | 84 | #if CONFIG_KEYPAD != SANSA_M200_PAD \ |
85 | && CONFIG_KEYPAD != HM60X_PAD | 85 | && CONFIG_KEYPAD != HM60X_PAD |
@@ -92,7 +92,7 @@ chessbox.c | |||
92 | goban.c | 92 | goban.c |
93 | pictureflow.c | 93 | pictureflow.c |
94 | 94 | ||
95 | #endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */ | 95 | #endif /* PLUGIN_BUFFER_SIZE <= 0x20000 */ |
96 | 96 | ||
97 | #if defined(IRIVER_H100_SERIES) | 97 | #if defined(IRIVER_H100_SERIES) |
98 | iriver_flash.c | 98 | iriver_flash.c |
@@ -106,8 +106,6 @@ crypt_firmware.c | |||
106 | 106 | ||
107 | metronome.c | 107 | metronome.c |
108 | 108 | ||
109 | #ifdef HAVE_LCD_BITMAP /* Not for the Archos Player */ | ||
110 | |||
111 | 2048.c | 109 | 2048.c |
112 | 110 | ||
113 | /* Lua needs at least 160 KB to work in */ | 111 | /* Lua needs at least 160 KB to work in */ |
@@ -173,8 +171,6 @@ rockpaint.c | |||
173 | 171 | ||
174 | rocklife.c | 172 | rocklife.c |
175 | 173 | ||
176 | #endif /* HAVE_LCD_BITMAP */ | ||
177 | |||
178 | #if LCD_DEPTH > 1 /* non-mono bitmap targets */ | 174 | #if LCD_DEPTH > 1 /* non-mono bitmap targets */ |
179 | 175 | ||
180 | matrix.c | 176 | matrix.c |
@@ -198,7 +194,6 @@ test_codec.c | |||
198 | test_core_jpeg.c | 194 | test_core_jpeg.c |
199 | #endif | 195 | #endif |
200 | test_disk.c | 196 | test_disk.c |
201 | #ifdef HAVE_LCD_BITMAP | ||
202 | test_fps.c | 197 | test_fps.c |
203 | test_gfx.c | 198 | test_gfx.c |
204 | #if LCD_DEPTH < 4 && !defined(SIMULATOR) | 199 | #if LCD_DEPTH < 4 && !defined(SIMULATOR) |
@@ -208,11 +203,8 @@ test_scanrate.c | |||
208 | test_grey.c | 203 | test_grey.c |
209 | test_greylib_bitmap_scale.c | 204 | test_greylib_bitmap_scale.c |
210 | #endif | 205 | #endif |
211 | #endif | ||
212 | test_mem.c | 206 | test_mem.c |
213 | #ifdef HAVE_LCD_BITMAP | ||
214 | test_mem_jpeg.c | 207 | test_mem_jpeg.c |
215 | #endif | ||
216 | #ifdef HAVE_LCD_COLOR | 208 | #ifdef HAVE_LCD_COLOR |
217 | test_resize.c | 209 | test_resize.c |
218 | #endif | 210 | #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 | |||
28 | test_core_jpeg.c | 28 | test_core_jpeg.c |
29 | #endif | 29 | #endif |
30 | test_disk.c | 30 | test_disk.c |
31 | #ifdef HAVE_LCD_BITMAP | ||
32 | #if LCD_DEPTH < 4 && !defined(SIMULATOR) | 31 | #if LCD_DEPTH < 4 && !defined(SIMULATOR) |
33 | test_scanrate.c | 32 | test_scanrate.c |
34 | #endif | 33 | #endif |
@@ -36,11 +35,8 @@ test_scanrate.c | |||
36 | test_grey.c | 35 | test_grey.c |
37 | test_greylib_bitmap_scale.c | 36 | test_greylib_bitmap_scale.c |
38 | #endif | 37 | #endif |
39 | #endif | ||
40 | test_mem.c | 38 | test_mem.c |
41 | #ifdef HAVE_LCD_BITMAP | ||
42 | test_mem_jpeg.c | 39 | test_mem_jpeg.c |
43 | #endif | ||
44 | #ifdef HAVE_LCD_COLOR | 40 | #ifdef HAVE_LCD_COLOR |
45 | test_resize.c | 41 | test_resize.c |
46 | #endif | 42 | #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 | |||
8 | clock | 8 | clock |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | /* For all targets with a bitmap display */ | ||
12 | #ifdef HAVE_LCD_BITMAP | ||
13 | |||
14 | /* color horizontal-stride LCDs */ | 11 | /* color horizontal-stride LCDs */ |
15 | #if defined(HAVE_LCD_COLOR) && \ | 12 | #if defined(HAVE_LCD_COLOR) && \ |
16 | (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) | 13 | (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) |
@@ -55,8 +52,6 @@ zxbox | |||
55 | #endif | 52 | #endif |
56 | #endif | 53 | #endif |
57 | 54 | ||
58 | #endif /* HAVE_LCD_BITMAP */ | ||
59 | |||
60 | /* For all big enough colour screens, iriver H1x0 and iAudio M5 */ | 55 | /* For all big enough colour screens, iriver H1x0 and iAudio M5 */ |
61 | #if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ | 56 | #if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ |
62 | || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \ | 57 | || (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 @@ | |||
8 | */ | 8 | */ |
9 | lua | 9 | lua |
10 | lua_scripts | 10 | lua_scripts |
11 | #ifdef HAVE_LCD_BITMAP | ||
12 | 11 | ||
13 | #if PLUGIN_BUFFER_SIZE > 0x20000 | 12 | #if PLUGIN_BUFFER_SIZE > 0x20000 |
14 | fft | 13 | fft |
@@ -20,8 +19,6 @@ reversi | |||
20 | pictureflow | 19 | pictureflow |
21 | #endif | 20 | #endif |
22 | 21 | ||
23 | #endif /* HAVE_LCD_BITMAP */ | ||
24 | |||
25 | /* For all the swcodec targets */ | 22 | /* For all the swcodec targets */ |
26 | #if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ | 23 | #if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ |
27 | mikmod | 24 | 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) | |||
329 | rb->lcd_clear_display(); | 329 | rb->lcd_clear_display(); |
330 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); | 330 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); |
331 | rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); | 331 | rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); |
332 | #ifdef HAVE_LCD_BITMAP | ||
333 | rb->lcd_puts_scroll(0, 2, "Anything else will resume"); | 332 | rb->lcd_puts_scroll(0, 2, "Anything else will resume"); |
334 | #endif | ||
335 | if(rb->global_settings->talk_menu) | 333 | if(rb->global_settings->talk_menu) |
336 | rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); | 334 | rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); |
337 | rb->lcd_update(); | 335 | rb->lcd_update(); |
@@ -488,11 +486,7 @@ static void thread(void) | |||
488 | exit = true; | 486 | exit = true; |
489 | break; | 487 | break; |
490 | case EV_EXIT: | 488 | case EV_EXIT: |
491 | #ifdef HAVE_LCD_BITMAP | ||
492 | rb->splash(HZ, "Exiting battery_bench..."); | 489 | rb->splash(HZ, "Exiting battery_bench..."); |
493 | #else | ||
494 | rb->splash(HZ, "bench exit"); | ||
495 | #endif | ||
496 | exit_reason = "plugin exit"; | 490 | exit_reason = "plugin exit"; |
497 | exit = true; | 491 | exit = true; |
498 | break; | 492 | break; |
@@ -516,7 +510,6 @@ static void thread(void) | |||
516 | } | 510 | } |
517 | 511 | ||
518 | 512 | ||
519 | #ifdef HAVE_LCD_BITMAP | ||
520 | typedef void (*plcdfunc)(int x, int y, const unsigned char *str); | 513 | typedef void (*plcdfunc)(int x, int y, const unsigned char *str); |
521 | 514 | ||
522 | static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line) | 515 | 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 | |||
525 | rb->lcd_getstringsize(str, &strwdt, &strhgt); | 518 | rb->lcd_getstringsize(str, &strwdt, &strhgt); |
526 | putsxy((lcd_width - strwdt)/2, line*(strhgt), str); | 519 | putsxy((lcd_width - strwdt)/2, line*(strhgt), str); |
527 | } | 520 | } |
528 | #endif | ||
529 | 521 | ||
530 | enum plugin_status plugin_start(const void* parameter) | 522 | enum plugin_status plugin_start(const void* parameter) |
531 | { | 523 | { |
@@ -533,27 +525,20 @@ enum plugin_status plugin_start(const void* parameter) | |||
533 | int button, fd; | 525 | int button, fd; |
534 | bool on = false; | 526 | bool on = false; |
535 | start_tick = *rb->current_tick; | 527 | start_tick = *rb->current_tick; |
536 | #ifdef HAVE_LCD_BITMAP | ||
537 | int i; | 528 | int i; |
538 | const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, | 529 | const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, |
539 | "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; | 530 | "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; |
540 | #endif | ||
541 | rb->lcd_clear_display(); | 531 | rb->lcd_clear_display(); |
542 | 532 | ||
543 | #ifdef HAVE_LCD_BITMAP | ||
544 | rb->lcd_clear_display(); | 533 | rb->lcd_clear_display(); |
545 | rb->lcd_setfont(FONT_SYSFIXED); | 534 | rb->lcd_setfont(FONT_SYSFIXED); |
546 | 535 | ||
547 | for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) | 536 | for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) |
548 | put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); | 537 | put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); |
549 | #else | ||
550 | rb->lcd_puts_scroll(0, 0, "Batt.Bench."); | ||
551 | rb->lcd_puts_scroll(0, 1, "PLAY/STOP"); | ||
552 | #endif | ||
553 | if(rb->global_settings->talk_menu) | 538 | if(rb->global_settings->talk_menu) |
554 | rb->talk_id(VOICE_BAT_BENCH_KEYS, true); | 539 | rb->talk_id(VOICE_BAT_BENCH_KEYS, true); |
555 | rb->lcd_update(); | 540 | rb->lcd_update(); |
556 | 541 | ||
557 | #ifdef HAVE_REMOTE_LCD | 542 | #ifdef HAVE_REMOTE_LCD |
558 | rb->lcd_remote_clear_display(); | 543 | rb->lcd_remote_clear_display(); |
559 | put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); | 544 | 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 @@ | |||
1 | #ifdef HAVE_LCD_BITMAP | ||
2 | |||
3 | /* Bubbles */ | 1 | /* Bubbles */ |
4 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) | 2 | #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) |
5 | bubbles_bubble.112x64x1.bmp | 3 | bubbles_bubble.112x64x1.bmp |
@@ -59,7 +57,6 @@ mpegplayer_status_icons_16x16x1.bmp | |||
59 | superdom_boarditems.160x128x1.bmp | 57 | superdom_boarditems.160x128x1.bmp |
60 | #endif | 58 | #endif |
61 | 59 | ||
62 | #endif /* HAVE_LCD_BITMAP */ | ||
63 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) | 60 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) |
64 | osx.dummy.bmp | 61 | osx.dummy.bmp |
65 | #endif | 62 | #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 @@ | |||
1 | #ifdef HAVE_LCD_BITMAP | ||
2 | |||
3 | /* 2048 */ | 1 | /* 2048 */ |
4 | 2 | ||
5 | #define MIN(x,y) ((x<y)?x:y) | 3 | #define MIN(x,y) ((x<y)?x:y) |
@@ -1004,5 +1002,3 @@ resistor.128x128x16.bmp | |||
1004 | #else | 1002 | #else |
1005 | resistor.68x20x16.bmp | 1003 | resistor.68x20x16.bmp |
1006 | #endif | 1004 | #endif |
1007 | |||
1008 | #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 @@ | |||
448 | 448 | ||
449 | 449 | ||
450 | /* leave first line blank on bitmap display, for pause icon */ | 450 | /* leave first line blank on bitmap display, for pause icon */ |
451 | #ifdef HAVE_LCD_BITMAP | ||
452 | #define FIRST_LINE 1 | 451 | #define FIRST_LINE 1 |
453 | #else | ||
454 | #define FIRST_LINE 0 | ||
455 | #endif | ||
456 | 452 | ||
457 | #define MAX_PLAYERS 10 | 453 | #define MAX_PLAYERS 10 |
458 | 454 | ||
@@ -597,7 +593,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
597 | return PLUGIN_OK; | 593 | return PLUGIN_OK; |
598 | } | 594 | } |
599 | 595 | ||
600 | #ifdef HAVE_LCD_BITMAP | ||
601 | static void show_pause_mode(bool enabled) | 596 | static void show_pause_mode(bool enabled) |
602 | { | 597 | { |
603 | static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; | 598 | static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; |
@@ -611,9 +606,6 @@ static void show_pause_mode(bool enabled) | |||
611 | rb->lcd_set_drawmode(DRMODE_SOLID); | 606 | rb->lcd_set_drawmode(DRMODE_SOLID); |
612 | } | 607 | } |
613 | } | 608 | } |
614 | #else | ||
615 | #define show_pause_mode(enabled) rb->lcd_icon(ICON_PAUSE, enabled) | ||
616 | #endif | ||
617 | 609 | ||
618 | static int run_timer(int nr) | 610 | static int run_timer(int nr) |
619 | { | 611 | { |
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 @@ | |||
451 | #endif | 451 | #endif |
452 | #endif | 452 | #endif |
453 | 453 | ||
454 | |||
455 | #ifdef HAVE_LCD_BITMAP | ||
456 | |||
457 | #define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16) | 454 | #define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16) |
458 | static int x_off = LCD_WIDTH/2; | 455 | static int x_off = LCD_WIDTH/2; |
459 | static int y_off = LCD_HEIGHT/2; | 456 | static int y_off = LCD_HEIGHT/2; |
@@ -486,16 +483,6 @@ static struct my_lcd *mylcd = &greyfuncs; | |||
486 | #define ASPECT 256 /* = 1.00 */ | 483 | #define ASPECT 256 /* = 1.00 */ |
487 | #endif | 484 | #endif |
488 | 485 | ||
489 | #else /* !LCD_BITMAP */ | ||
490 | |||
491 | #define MYLCD(fn) pgfx_ ## fn | ||
492 | #define DIST 9 | ||
493 | static int x_off = 10; | ||
494 | static int y_off = 7; | ||
495 | #define ASPECT 300 /* = 1.175 */ | ||
496 | |||
497 | #endif /* !LCD_BITMAP */ | ||
498 | |||
499 | struct point_3D { | 486 | struct point_3D { |
500 | long x, y, z; | 487 | long x, y, z; |
501 | }; | 488 | }; |
@@ -771,7 +758,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
771 | 758 | ||
772 | (void)(parameter); | 759 | (void)(parameter); |
773 | 760 | ||
774 | #ifdef HAVE_LCD_BITMAP | ||
775 | #if defined(USEGSLIB) | 761 | #if defined(USEGSLIB) |
776 | gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); | 762 | gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); |
777 | if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, | 763 | if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, |
@@ -794,7 +780,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
794 | grey_setfont(FONT_SYSFIXED); | 780 | grey_setfont(FONT_SYSFIXED); |
795 | #endif | 781 | #endif |
796 | rb->lcd_setfont(FONT_SYSFIXED); | 782 | rb->lcd_setfont(FONT_SYSFIXED); |
797 | #endif | ||
798 | 783 | ||
799 | atexit(cleanup); | 784 | atexit(cleanup); |
800 | while(!quit) | 785 | while(!quit) |
@@ -808,7 +793,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
808 | redraw = false; | 793 | redraw = false; |
809 | } | 794 | } |
810 | 795 | ||
811 | #ifdef HAVE_LCD_BITMAP | ||
812 | if (t_disp > 0) | 796 | if (t_disp > 0) |
813 | { | 797 | { |
814 | char buffer[30]; | 798 | char buffer[30]; |
@@ -821,24 +805,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
821 | if (t_disp == 0) | 805 | if (t_disp == 0) |
822 | redraw = true; | 806 | redraw = true; |
823 | } | 807 | } |
824 | #else | ||
825 | if (t_disp > 0) | ||
826 | { | ||
827 | if (t_disp == DISP_TIME) | ||
828 | { | ||
829 | rb->lcd_puts(5, 0, axes[curr].label); | ||
830 | rb->lcd_putsf(5, 1, "%d %c", | ||
831 | paused ? axes[curr].angle : axes[curr].speed, | ||
832 | highspeed ? 'H' : ' '); | ||
833 | } | ||
834 | t_disp--; | ||
835 | if (t_disp == 0) | ||
836 | { | ||
837 | rb->lcd_clear_display(); | ||
838 | pgfx_display(0, 0); | ||
839 | } | ||
840 | } | ||
841 | #endif | ||
842 | #ifdef USEGSLIB | 808 | #ifdef USEGSLIB |
843 | if (mode_switch) | 809 | if (mode_switch) |
844 | { | 810 | { |
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) | |||
343 | rb->lcd_clear_display(); | 343 | rb->lcd_clear_display(); |
344 | rb->lcd_puts(0, 0, "Working ..."); | 344 | rb->lcd_puts(0, 0, "Working ..."); |
345 | rb->lcd_puts(0, 1, name); | 345 | rb->lcd_puts(0, 1, name); |
346 | #ifdef HAVE_LCD_BITMAP | ||
347 | rb->lcd_putsf(0, 2, "Cleaned up %d items", | 346 | rb->lcd_putsf(0, 2, "Cleaned up %d items", |
348 | run_stats.files_removed + run_stats.dirs_removed); | 347 | run_stats.files_removed + run_stats.dirs_removed); |
349 | #endif | ||
350 | rb->lcd_update(); | 348 | rb->lcd_update(); |
351 | } | 349 | } |
352 | 350 | ||
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]; | |||
534 | static int toggle[20]; | 534 | static int toggle[20]; |
535 | static int cursor_pos, moves; | 535 | static int cursor_pos, moves; |
536 | 536 | ||
537 | #ifdef HAVE_LCD_BITMAP | ||
538 | |||
539 | #include "pluginbitmaps/flipit_cursor.h" | 537 | #include "pluginbitmaps/flipit_cursor.h" |
540 | #include "pluginbitmaps/flipit_tokens.h" | 538 | #include "pluginbitmaps/flipit_tokens.h" |
541 | 539 | ||
@@ -595,8 +593,6 @@ static void draw_info_panel(void) | |||
595 | GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); | 593 | GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); |
596 | } | 594 | } |
597 | 595 | ||
598 | #endif /* LCD */ | ||
599 | |||
600 | /* clear the cursor where it is */ | 596 | /* clear the cursor where it is */ |
601 | static inline void clear_cursor(void) | 597 | static inline void clear_cursor(void) |
602 | { | 598 | { |
@@ -829,7 +825,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
829 | 825 | ||
830 | rb->splash(HZ, "FlipIt!"); | 826 | rb->splash(HZ, "FlipIt!"); |
831 | 827 | ||
832 | #ifdef HAVE_LCD_BITMAP | ||
833 | /* print instructions */ | 828 | /* print instructions */ |
834 | rb->lcd_clear_display(); | 829 | rb->lcd_clear_display(); |
835 | rb->lcd_setfont(FONT_SYSFIXED); | 830 | rb->lcd_setfont(FONT_SYSFIXED); |
@@ -909,7 +904,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
909 | #endif | 904 | #endif |
910 | 905 | ||
911 | rb->lcd_update(); | 906 | rb->lcd_update(); |
912 | #endif | 907 | |
913 | rb->button_get_w_tmo(HZ*3); | 908 | rb->button_get_w_tmo(HZ*3); |
914 | 909 | ||
915 | rb->lcd_clear_display(); | 910 | 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 @@ | |||
24 | #include "plugin.h" | 24 | #include "plugin.h" |
25 | #include "lib/helper.h" | 25 | #include "lib/helper.h" |
26 | 26 | ||
27 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 27 | #if (LCD_DEPTH < 4) |
28 | #include "lib/grey.h" | 28 | #include "lib/grey.h" |
29 | 29 | ||
30 | 30 | ||
@@ -372,5 +372,5 @@ enum plugin_status plugin_start(const void* parameter) | |||
372 | return main(); | 372 | return main(); |
373 | } | 373 | } |
374 | 374 | ||
375 | #endif /* #ifdef HAVE_LCD_BITMAP */ | 375 | #endif /* #if LCD_DEPTH < 4 */ |
376 | 376 | ||
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}; | |||
30 | #define NB_PICTURES 9 | 30 | #define NB_PICTURES 9 |
31 | #define NB_SLOTS 3 | 31 | #define NB_SLOTS 3 |
32 | 32 | ||
33 | #ifdef HAVE_LCD_BITMAP | ||
34 | #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) | 33 | #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) |
35 | #if NB_SCREENS==1 | 34 | #if NB_SCREENS==1 |
36 | #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT | 35 | #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT |
@@ -55,7 +54,6 @@ const struct picture jackpot_pictures[]={ | |||
55 | }; | 54 | }; |
56 | 55 | ||
57 | #define SLEEP_TIME (HZ/200) | 56 | #define SLEEP_TIME (HZ/200) |
58 | #endif /* HAVE_LCD_BITMAP */ | ||
59 | 57 | ||
60 | struct jackpot | 58 | struct jackpot |
61 | { | 59 | { |
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 | |||
13 | strncpy.c | 13 | strncpy.c |
14 | stdio_compat.c | 14 | stdio_compat.c |
15 | 15 | ||
16 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 16 | #if (LCD_DEPTH < 4) |
17 | grey_core.c | 17 | grey_core.c |
18 | grey_draw.c | 18 | grey_draw.c |
19 | grey_parm.c | 19 | grey_parm.c |
@@ -23,7 +23,7 @@ grey_scroll.c | |||
23 | grey_coldfire.S | 23 | grey_coldfire.S |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #endif /* HAVE_LCD_BITMAP && LCD_DEPTH < 4 */ | 26 | #endif /* LCD_DEPTH < 4 */ |
27 | 27 | ||
28 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 28 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
29 | overlay.c | 29 | overlay.c |
@@ -33,8 +33,6 @@ overlay.c | |||
33 | profile_plugin.c | 33 | profile_plugin.c |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #ifdef HAVE_LCD_BITMAP | ||
37 | |||
38 | #ifdef CPU_ARM | 36 | #ifdef CPU_ARM |
39 | pluginlib_jpeg_idct_arm.S | 37 | pluginlib_jpeg_idct_arm.S |
40 | #endif | 38 | #endif |
@@ -65,8 +63,6 @@ pluginlib_albumart.c | |||
65 | 63 | ||
66 | kbd_helper.c | 64 | kbd_helper.c |
67 | 65 | ||
68 | #endif /* HAVE_LCD_BITMAP */ | ||
69 | |||
70 | #ifdef HAVE_TOUCHSCREEN | 66 | #ifdef HAVE_TOUCHSCREEN |
71 | pluginlib_touchscreen.c | 67 | pluginlib_touchscreen.c |
72 | #endif | 68 | #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 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | 23 | ||
24 | #ifdef HAVE_LCD_BITMAP | ||
25 | |||
26 | /* | 24 | /* |
27 | * Print a checkbox | 25 | * Print a checkbox |
28 | */ | 26 | */ |
29 | void checkbox(int x, int y, int width, int height, bool checked); | 27 | void checkbox(int x, int y, int width, int height, bool checked); |
30 | |||
31 | #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) | |||
39 | bool display_text(unsigned short words, char** text, struct style_text* style, | 39 | bool display_text(unsigned short words, char** text, struct style_text* style, |
40 | struct viewport* vp_text, bool wait_key) | 40 | struct viewport* vp_text, bool wait_key) |
41 | { | 41 | { |
42 | #ifdef HAVE_LCD_BITMAP | ||
43 | int prev_drawmode; | 42 | int prev_drawmode; |
44 | #endif | ||
45 | #ifdef HAVE_LCD_COLOR | 43 | #ifdef HAVE_LCD_COLOR |
46 | int standard_fgcolor; | 44 | int standard_fgcolor; |
47 | #endif | 45 | #endif |
@@ -55,10 +53,8 @@ bool display_text(unsigned short words, char** text, struct style_text* style, | |||
55 | vp_height = vp_text->height; | 53 | vp_height = vp_text->height; |
56 | } | 54 | } |
57 | rb->screens[SCREEN_MAIN]->set_viewport(vp_text); | 55 | rb->screens[SCREEN_MAIN]->set_viewport(vp_text); |
58 | #ifdef HAVE_LCD_BITMAP | ||
59 | prev_drawmode = rb->lcd_get_drawmode(); | 56 | prev_drawmode = rb->lcd_get_drawmode(); |
60 | rb->lcd_set_drawmode(DRMODE_SOLID); | 57 | rb->lcd_set_drawmode(DRMODE_SOLID); |
61 | #endif | ||
62 | #ifdef HAVE_LCD_COLOR | 58 | #ifdef HAVE_LCD_COLOR |
63 | standard_fgcolor = rb->lcd_get_foreground(); | 59 | standard_fgcolor = rb->lcd_get_foreground(); |
64 | #endif | 60 | #endif |
@@ -121,11 +117,9 @@ bool display_text(unsigned short words, char** text, struct style_text* style, | |||
121 | #endif | 117 | #endif |
122 | rb->lcd_putsxy(x, y, text[i]); | 118 | rb->lcd_putsxy(x, y, text[i]); |
123 | /* underline the word */ | 119 | /* underline the word */ |
124 | #ifdef HAVE_LCD_BITMAP | ||
125 | if (style[style_index].flags&TEXT_UNDERLINE) { | 120 | if (style[style_index].flags&TEXT_UNDERLINE) { |
126 | rb->lcd_hline(x, x+width, y+height-1); | 121 | rb->lcd_hline(x, x+width, y+height-1); |
127 | } | 122 | } |
128 | #endif | ||
129 | #ifdef HAVE_LCD_COLOR | 123 | #ifdef HAVE_LCD_COLOR |
130 | rb->lcd_set_foreground(standard_fgcolor); | 124 | rb->lcd_set_foreground(standard_fgcolor); |
131 | #endif | 125 | #endif |
@@ -134,9 +128,7 @@ bool display_text(unsigned short words, char** text, struct style_text* style, | |||
134 | x += width + space_w; | 128 | x += width + space_w; |
135 | } | 129 | } |
136 | rb->screens[SCREEN_MAIN]->update_viewport(); | 130 | rb->screens[SCREEN_MAIN]->update_viewport(); |
137 | #ifdef HAVE_LCD_BITMAP | ||
138 | rb->lcd_set_drawmode(prev_drawmode); | 131 | rb->lcd_set_drawmode(prev_drawmode); |
139 | #endif | ||
140 | if (wait_key) | 132 | if (wait_key) |
141 | { | 133 | { |
142 | if (wait_key_press()) | 134 | 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 @@ | |||
29 | 29 | ||
30 | #include "plugin.h" | 30 | #include "plugin.h" |
31 | 31 | ||
32 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 32 | #if (LCD_DEPTH < 4) |
33 | 33 | ||
34 | /* The greyscale lib uses 8 bit brightness values natively on input. */ | 34 | /* The greyscale lib uses 8 bit brightness values natively on input. */ |
35 | #define GREY_BRIGHTNESS(y) (y) | 35 | #define GREY_BRIGHTNESS(y) (y) |
@@ -201,5 +201,5 @@ struct _grey_info | |||
201 | /* Global variable, defined in the plugin */ | 201 | /* Global variable, defined in the plugin */ |
202 | extern struct _grey_info _grey_info; | 202 | extern struct _grey_info _grey_info; |
203 | 203 | ||
204 | #endif /* HAVE_LCD_BITMAP && (LCD_DEPTH < 4) */ | 204 | #endif /* (LCD_DEPTH < 4) */ |
205 | #endif /* __GREY_H__ */ | 205 | #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, | |||
119 | return (num_scores > 0) && (score > scores[num_scores-1].score); | 119 | return (num_scores > 0) && (score > scores[num_scores-1].score); |
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef HAVE_LCD_BITMAP | ||
123 | #define MARGIN 5 | 122 | #define MARGIN 5 |
124 | void highscore_show(int position, struct highscore *scores, int num_scores, | 123 | void highscore_show(int position, struct highscore *scores, int num_scores, |
125 | bool show_level) | 124 | bool show_level) |
@@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores, | |||
179 | rb->lcd_set_foreground(fgcolor); | 178 | rb->lcd_set_foreground(fgcolor); |
180 | #endif | 179 | #endif |
181 | } | 180 | } |
182 | #else | ||
183 | struct scoreinfo { | ||
184 | struct highscore *scores; | ||
185 | int position; | ||
186 | bool show_level; | ||
187 | }; | ||
188 | static const char* get_score(int selected, void * data, | ||
189 | char * buffer, size_t buffer_len) | ||
190 | { | ||
191 | struct scoreinfo *scoreinfo = (struct scoreinfo *) data; | ||
192 | int len; | ||
193 | len = rb->snprintf(buffer, buffer_len, "%c%d) %4d", | ||
194 | (scoreinfo->position == selected?'*':' '), | ||
195 | selected+1, scoreinfo->scores[selected].score); | ||
196 | |||
197 | if (scoreinfo->show_level) | ||
198 | rb->snprintf(buffer + len, buffer_len - len, " %d", | ||
199 | scoreinfo->scores[selected].level); | ||
200 | return buffer; | ||
201 | } | ||
202 | |||
203 | void highscore_show(int position, struct highscore *scores, int num_scores, | ||
204 | bool show_level) | ||
205 | { | ||
206 | struct simplelist_info info; | ||
207 | struct scoreinfo scoreinfo = {scores, position, show_level}; | ||
208 | rb->simplelist_info_init(&info, "High Scores", num_scores, &scoreinfo); | ||
209 | if (position >= 0) | ||
210 | info.selection = position; | ||
211 | info.hide_selection = true; | ||
212 | info.get_name = get_score; | ||
213 | rb->simplelist_show_list(&info); | ||
214 | } | ||
215 | #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 @@ | |||
35 | * lib/grey.h should be included before including this | 35 | * lib/grey.h should be included before including this |
36 | * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise. | 36 | * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise. |
37 | */ | 37 | */ |
38 | #if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__) | 38 | #if (LCD_DEPTH < 4) && defined(__GREY_H__) |
39 | #define MYLCD_CFG_GREYLIB /* using greylib */ | 39 | #define MYLCD_CFG_GREYLIB /* using greylib */ |
40 | #define mylcd_(fn) grey_##fn | 40 | #define mylcd_(fn) grey_##fn |
41 | #define myxlcd_(fn) grey_##fn | 41 | #define myxlcd_(fn) grey_##fn |
@@ -51,7 +51,8 @@ | |||
51 | #define MYLCD_DEFAULT_FG GREY_BLACK | 51 | #define MYLCD_DEFAULT_FG GREY_BLACK |
52 | #define MYLCD_DEFAULT_BG GREY_WHITE | 52 | #define MYLCD_DEFAULT_BG GREY_WHITE |
53 | 53 | ||
54 | #elif defined (HAVE_LCD_BITMAP) | 54 | #else |
55 | |||
55 | #define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */ | 56 | #define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */ |
56 | #define mylcd_(fn) rb->lcd_##fn | 57 | #define mylcd_(fn) rb->lcd_##fn |
57 | #define myxlcd_(fn) xlcd_##fn | 58 | #define myxlcd_(fn) xlcd_##fn |
@@ -67,18 +68,11 @@ | |||
67 | #define MYLCD_DEFAULT_FG LCD_DEFAULT_FG | 68 | #define MYLCD_DEFAULT_FG LCD_DEFAULT_FG |
68 | #define MYLCD_DEFAULT_BG LCD_DEFAULT_BG | 69 | #define MYLCD_DEFAULT_BG LCD_DEFAULT_BG |
69 | 70 | ||
70 | #else | ||
71 | #error Configuration not supported! Did you forget to include the correct lib header? | ||
72 | #endif /* end LCD type selection */ | 71 | #endif /* end LCD type selection */ |
73 | 72 | ||
74 | /* Update functions */ | 73 | /* Update functions */ |
75 | #define mylcd_update mylcd_(update) | 74 | #define mylcd_update mylcd_(update) |
76 | #ifdef HAVE_LCD_BITMAP | ||
77 | #define mylcd_update_rect mylcd_(update_rect) | 75 | #define mylcd_update_rect mylcd_(update_rect) |
78 | #else | ||
79 | static inline void mylcd_update_rect(int x, int y, int w, int h) | ||
80 | { (void)x; (void)y; (void)w; (void)h; pgfx_update(); } | ||
81 | #endif /* HAVE_LCD_BITMAP */ | ||
82 | 76 | ||
83 | /* Update functions - unbuffered : special handling for these | 77 | /* Update functions - unbuffered : special handling for these |
84 | * It is desirable to still evaluate arguments even if there will | 78 | * 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) | |||
104 | #define mylcd_set_drawmode mylcd_(set_drawmode) | 98 | #define mylcd_set_drawmode mylcd_(set_drawmode) |
105 | #define mylcd_get_drawmode mylcd_(get_drawmode) | 99 | #define mylcd_get_drawmode mylcd_(get_drawmode) |
106 | 100 | ||
107 | #ifdef HAVE_LCD_BITMAP | ||
108 | #define mylcd_set_foreground mylcd_(set_foreground) | 101 | #define mylcd_set_foreground mylcd_(set_foreground) |
109 | #define mylcd_get_foreground mylcd_(get_foreground) | 102 | #define mylcd_get_foreground mylcd_(get_foreground) |
110 | #define mylcd_set_background mylcd_(set_background) | 103 | #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) | |||
112 | #define mylcd_set_drawinfo mylcd_(set_drawinfo) | 105 | #define mylcd_set_drawinfo mylcd_(set_drawinfo) |
113 | #define mylcd_setfont mylcd_(setfont) | 106 | #define mylcd_setfont mylcd_(setfont) |
114 | #define mylcd_getstringsize mylcd_(getstringsize) | 107 | #define mylcd_getstringsize mylcd_(getstringsize) |
115 | #endif /* HAVE_LCD_BITMAP */ | ||
116 | 108 | ||
117 | /* Whole display */ | 109 | /* Whole display */ |
118 | #define mylcd_clear_display mylcd_(clear_display) | 110 | #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) | |||
131 | 123 | ||
132 | /* Filled Primitives */ | 124 | /* Filled Primitives */ |
133 | #define mylcd_fillrect mylcd_(fillrect) | 125 | #define mylcd_fillrect mylcd_(fillrect) |
134 | #ifdef HAVE_LCD_BITMAP | ||
135 | #define mylcd_filltriangle myxlcd_(filltriangle) | 126 | #define mylcd_filltriangle myxlcd_(filltriangle) |
136 | #endif /* HAVE_LCD_BITMAP */ | ||
137 | 127 | ||
138 | /* Bitmaps */ | 128 | /* Bitmaps */ |
139 | #define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part) | 129 | #define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part) |
140 | #define mylcd_mono_bitmap mylcd_(mono_bitmap) | 130 | #define mylcd_mono_bitmap mylcd_(mono_bitmap) |
141 | 131 | ||
142 | #ifdef HAVE_LCD_BITMAP | ||
143 | #define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part) | 132 | #define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part) |
144 | #define mylcd_gray_bitmap myxlcd_(gray_bitmap) | 133 | #define mylcd_gray_bitmap myxlcd_(gray_bitmap) |
145 | #if 0 /* possible, but not implemented in greylib */ | 134 | #if 0 /* possible, but not implemented in greylib */ |
146 | #define mylcd_color_bitmap_part myxlcd_(color_bitmap_part) | 135 | #define mylcd_color_bitmap_part myxlcd_(color_bitmap_part) |
147 | #define mylcd_color_bitmap myxlcd_(color_bitmap) | 136 | #define mylcd_color_bitmap myxlcd_(color_bitmap) |
148 | #endif | 137 | #endif |
149 | #endif /* HAVE_LCD_BITMAP */ | ||
150 | 138 | ||
151 | /* Bitmaps - unbuffered */ | 139 | /* Bitmaps - unbuffered */ |
152 | #ifdef HAVE_LCD_BITMAP | ||
153 | #define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part) | 140 | #define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part) |
154 | #define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap) | 141 | #define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap) |
155 | #endif /* HAVE_LCD_BITMAP */ | ||
156 | 142 | ||
157 | /* Text */ | 143 | /* Text */ |
158 | /* lcd_putsxyofs is static'ed in the core for now on color */ | 144 | /* lcd_putsxyofs is static'ed in the core for now on color */ |
159 | #ifdef HAVE_LCD_BITMAP | ||
160 | #define mylcd_putsxyofs mylcd_(putsxyofs) | 145 | #define mylcd_putsxyofs mylcd_(putsxyofs) |
161 | #define mylcd_putsxy mylcd_(putsxy) | 146 | #define mylcd_putsxy mylcd_(putsxy) |
162 | #endif /* HAVE_LCD_BITMAP */ | ||
163 | 147 | ||
164 | /* Scrolling */ | 148 | /* Scrolling */ |
165 | #ifdef HAVE_LCD_BITMAP | ||
166 | #define mylcd_scroll_left myxlcd_(scroll_left) | 149 | #define mylcd_scroll_left myxlcd_(scroll_left) |
167 | #define mylcd_scroll_right myxlcd_(scroll_right) | 150 | #define mylcd_scroll_right myxlcd_(scroll_right) |
168 | #define mylcd_scroll_up myxlcd_(scroll_up) | 151 | #define mylcd_scroll_up myxlcd_(scroll_up) |
169 | #define mylcd_scroll_down myxlcd_(scroll_down) | 152 | #define mylcd_scroll_down myxlcd_(scroll_down) |
170 | #endif /* HAVE_LCD_BITMAP */ | ||
171 | 153 | ||
172 | /* Scrolling - unbuffered */ | 154 | /* Scrolling - unbuffered */ |
173 | #ifdef HAVE_LCD_BITMAP | ||
174 | #define mylcd_ub_scroll_left myxlcd_ub_(scroll_left) | 155 | #define mylcd_ub_scroll_left myxlcd_ub_(scroll_left) |
175 | #define mylcd_ub_scroll_right myxlcd_ub_(scroll_right) | 156 | #define mylcd_ub_scroll_right myxlcd_ub_(scroll_right) |
176 | #define mylcd_ub_scroll_up myxlcd_ub_(scroll_up) | 157 | #define mylcd_ub_scroll_up myxlcd_ub_(scroll_up) |
177 | #define mylcd_ub_scroll_down myxlcd_ub_(scroll_down) | 158 | #define mylcd_ub_scroll_down myxlcd_ub_(scroll_down) |
178 | #endif /* HAVE_LCD_BITMAP */ | ||
179 | 159 | ||
180 | /* Viewports */ | 160 | /* Viewports */ |
181 | #ifdef HAVE_LCD_BITMAP | ||
182 | #define mylcd_clear_viewport mylcd_(clear_viewport) | 161 | #define mylcd_clear_viewport mylcd_(clear_viewport) |
183 | #define mylcd_set_viewport mylcd_(set_viewport) | 162 | #define mylcd_set_viewport mylcd_(set_viewport) |
184 | #define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen) | 163 | #define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen) |
185 | #endif /* HAVE_LCD_BITMAP */ | ||
186 | 164 | ||
187 | #endif /* MYLCD_H */ | 165 | #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 ); | |||
37 | */ | 37 | */ |
38 | void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst); | 38 | void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst); |
39 | 39 | ||
40 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 40 | #if (LCD_DEPTH < 4) |
41 | /** | 41 | /** |
42 | Same as simple_resize_bitmap except this is for use with greylib. | 42 | Same as simple_resize_bitmap except this is for use with greylib. |
43 | */ | 43 | */ |
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 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | struct view_info { | 29 | struct view_info { |
30 | #ifdef HAVE_LCD_BITMAP | ||
31 | struct font* pf; | 30 | struct font* pf; |
32 | struct viewport scrollbar_vp; /* viewport for scrollbar */ | 31 | struct viewport scrollbar_vp; /* viewport for scrollbar */ |
33 | #endif | ||
34 | struct viewport vp; | 32 | struct viewport vp; |
35 | const char *title; | 33 | const char *title; |
36 | const char *text; /* displayed text */ | 34 | const char *text; /* displayed text */ |
@@ -89,15 +87,12 @@ static void calc_line_count(struct view_info *info) | |||
89 | { | 87 | { |
90 | const char *ptr = info->text; | 88 | const char *ptr = info->text; |
91 | int i = 0; | 89 | int i = 0; |
92 | #ifdef HAVE_LCD_BITMAP | ||
93 | bool scrollbar = false; | 90 | bool scrollbar = false; |
94 | #endif | ||
95 | 91 | ||
96 | while (*ptr) | 92 | while (*ptr) |
97 | { | 93 | { |
98 | ptr = get_next_line(ptr, info); | 94 | ptr = get_next_line(ptr, info); |
99 | i++; | 95 | i++; |
100 | #ifdef HAVE_LCD_BITMAP | ||
101 | if (!scrollbar && i > info->display_lines) | 96 | if (!scrollbar && i > info->display_lines) |
102 | { | 97 | { |
103 | ptr = info->text; | 98 | ptr = info->text; |
@@ -111,7 +106,6 @@ static void calc_line_count(struct view_info *info) | |||
111 | info->scrollbar_vp.x = info->vp.width; | 106 | info->scrollbar_vp.x = info->vp.width; |
112 | scrollbar = true; | 107 | scrollbar = true; |
113 | } | 108 | } |
114 | #endif | ||
115 | } | 109 | } |
116 | info->line_count = i; | 110 | info->line_count = i; |
117 | } | 111 | } |
@@ -144,12 +138,8 @@ static int init_view(struct view_info *info, | |||
144 | const char *title, const char *text) | 138 | const char *title, const char *text) |
145 | { | 139 | { |
146 | rb->viewport_set_defaults(&info->vp, SCREEN_MAIN); | 140 | rb->viewport_set_defaults(&info->vp, SCREEN_MAIN); |
147 | #ifdef HAVE_LCD_BITMAP | ||
148 | info->pf = rb->font_get(FONT_UI); | 141 | info->pf = rb->font_get(FONT_UI); |
149 | info->display_lines = info->vp.height / info->pf->height; | 142 | info->display_lines = info->vp.height / info->pf->height; |
150 | #else | ||
151 | info->display_lines = info->vp.height; | ||
152 | #endif | ||
153 | 143 | ||
154 | info->title = title; | 144 | info->title = title; |
155 | info->text = text; | 145 | info->text = text; |
@@ -157,7 +147,6 @@ static int init_view(struct view_info *info, | |||
157 | info->line = 0; | 147 | info->line = 0; |
158 | info->start = 0; | 148 | info->start = 0; |
159 | 149 | ||
160 | #ifdef HAVE_LCD_BITMAP | ||
161 | /* no title for small screens. */ | 150 | /* no title for small screens. */ |
162 | if (info->display_lines < 4) | 151 | if (info->display_lines < 4) |
163 | { | 152 | { |
@@ -169,7 +158,6 @@ static int init_view(struct view_info *info, | |||
169 | info->vp.y += info->pf->height; | 158 | info->vp.y += info->pf->height; |
170 | info->vp.height -= info->pf->height; | 159 | info->vp.height -= info->pf->height; |
171 | } | 160 | } |
172 | #endif | ||
173 | 161 | ||
174 | calc_line_count(info); | 162 | calc_line_count(info); |
175 | return 0; | 163 | return 0; |
@@ -177,11 +165,7 @@ static int init_view(struct view_info *info, | |||
177 | 165 | ||
178 | static void draw_text(struct view_info *info) | 166 | static void draw_text(struct view_info *info) |
179 | { | 167 | { |
180 | #ifdef HAVE_LCD_BITMAP | ||
181 | #define OUTPUT_SIZE LCD_WIDTH+1 | 168 | #define OUTPUT_SIZE LCD_WIDTH+1 |
182 | #else | ||
183 | #define OUTPUT_SIZE LCD_WIDTH*3+1 | ||
184 | #endif | ||
185 | static char output[OUTPUT_SIZE]; | 169 | static char output[OUTPUT_SIZE]; |
186 | const char *text, *ptr; | 170 | const char *text, *ptr; |
187 | int max_show, line; | 171 | int max_show, line; |
@@ -190,14 +174,12 @@ static void draw_text(struct view_info *info) | |||
190 | /* clear screen */ | 174 | /* clear screen */ |
191 | display->clear_display(); | 175 | display->clear_display(); |
192 | 176 | ||
193 | #ifdef HAVE_LCD_BITMAP | ||
194 | /* display title. */ | 177 | /* display title. */ |
195 | if(info->title) | 178 | if(info->title) |
196 | { | 179 | { |
197 | display->set_viewport(NULL); | 180 | display->set_viewport(NULL); |
198 | display->puts(0, 0, info->title); | 181 | display->puts(0, 0, info->title); |
199 | } | 182 | } |
200 | #endif | ||
201 | 183 | ||
202 | max_show = MIN(info->line_count - info->line, info->display_lines); | 184 | max_show = MIN(info->line_count - info->line, info->display_lines); |
203 | text = info->text + info->start; | 185 | text = info->text + info->start; |
@@ -215,7 +197,6 @@ static void draw_text(struct view_info *info) | |||
215 | display->puts(0, line, output); | 197 | display->puts(0, line, output); |
216 | text = ptr; | 198 | text = ptr; |
217 | } | 199 | } |
218 | #ifdef HAVE_LCD_BITMAP | ||
219 | if (info->line_count > info->display_lines) | 200 | if (info->line_count > info->display_lines) |
220 | { | 201 | { |
221 | display->set_viewport(&info->scrollbar_vp); | 202 | display->set_viewport(&info->scrollbar_vp); |
@@ -224,7 +205,6 @@ static void draw_text(struct view_info *info) | |||
224 | info->line_count, info->line, info->line + max_show, | 205 | info->line_count, info->line, info->line + max_show, |
225 | VERTICAL); | 206 | VERTICAL); |
226 | } | 207 | } |
227 | #endif | ||
228 | 208 | ||
229 | display->set_viewport(NULL); | 209 | display->set_viewport(NULL); |
230 | display->update(); | 210 | 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 @@ | |||
26 | 26 | ||
27 | #include "plugin.h" | 27 | #include "plugin.h" |
28 | 28 | ||
29 | #ifdef HAVE_LCD_BITMAP | ||
30 | |||
31 | void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); | 29 | void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); |
32 | void xlcd_filltriangle_screen(struct screen* display, | 30 | void xlcd_filltriangle_screen(struct screen* display, |
33 | int x1, int y1, int x2, int y2, int x3, int y3); | 31 | int x1, int y1, int x2, int y2, int x3, int y3); |
@@ -54,6 +52,5 @@ void xlcd_scroll_right(int count); | |||
54 | void xlcd_scroll_up(int count); | 52 | void xlcd_scroll_up(int count); |
55 | void xlcd_scroll_down(int count); | 53 | void xlcd_scroll_down(int count); |
56 | 54 | ||
57 | #endif /* HAVE_LCD_BITMAP */ | ||
58 | #endif /* __XLCD_H__ */ | 55 | #endif /* __XLCD_H__ */ |
59 | 56 | ||
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 @@ | |||
24 | 24 | ||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | 26 | ||
27 | #ifdef HAVE_LCD_BITMAP | ||
28 | #include "xlcd.h" | 27 | #include "xlcd.h" |
29 | 28 | ||
30 | #endif /* HAVE_LCD_BITMAP */ | ||
31 | |||
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 @@ | |||
24 | 24 | ||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | 26 | ||
27 | #ifdef HAVE_LCD_BITMAP | ||
28 | #include "xlcd.h" | 27 | #include "xlcd.h" |
29 | 28 | ||
30 | /* sort the given coordinates by increasing x value */ | 29 | /* 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, | |||
486 | #endif /* HAVE_LCD_COLOR */ | 485 | #endif /* HAVE_LCD_COLOR */ |
487 | 486 | ||
488 | #endif /* LCD_DEPTH >= 8 */ | 487 | #endif /* LCD_DEPTH >= 8 */ |
489 | |||
490 | #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[] | |||
29 | #endif | 29 | #endif |
30 | }; | 30 | }; |
31 | 31 | ||
32 | #ifdef HAVE_LCD_BITMAP | ||
33 | #define DISPLAY_WIDTH LCD_WIDTH | 32 | #define DISPLAY_WIDTH LCD_WIDTH |
34 | #define DISPLAY_HEIGHT LCD_HEIGHT | 33 | #define DISPLAY_HEIGHT LCD_HEIGHT |
35 | #define RAND_SCALE 5 | 34 | #define RAND_SCALE 5 |
@@ -48,19 +47,6 @@ static const struct button_mapping *plugin_contexts[] | |||
48 | #define LOGO_WIDTH BMPWIDTH_rockboxlogo | 47 | #define LOGO_WIDTH BMPWIDTH_rockboxlogo |
49 | #define LOGO_HEIGHT BMPHEIGHT_rockboxlogo | 48 | #define LOGO_HEIGHT BMPHEIGHT_rockboxlogo |
50 | 49 | ||
51 | #else /* !LCD_BITMAP */ | ||
52 | #define DISPLAY_WIDTH 55 | ||
53 | #define DISPLAY_HEIGHT 14 | ||
54 | #define RAND_SCALE 2 | ||
55 | #define LOGO_WIDTH 16 | ||
56 | #define LOGO_HEIGHT 7 | ||
57 | #define LOGO rockbox16x7 | ||
58 | const unsigned char rockbox16x7[] = { | ||
59 | 0x47, 0x18, 0xa6, 0xd8, 0x66, 0xde, 0xb7, 0x9b, | ||
60 | 0x76, 0xdb, 0x26, 0xdb, 0x66, 0xde, | ||
61 | }; | ||
62 | #endif /* !LCD_BITMAP */ | ||
63 | |||
64 | /* We use PLA */ | 50 | /* We use PLA */ |
65 | #define LP_QUIT PLA_EXIT | 51 | #define LP_QUIT PLA_EXIT |
66 | #define LP_QUIT2 PLA_CANCEL | 52 | #define LP_QUIT2 PLA_CANCEL |
@@ -88,7 +74,6 @@ enum plugin_status plugin_start(const void* parameter) { | |||
88 | dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; | 74 | dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; |
89 | 75 | ||
90 | while (1) { | 76 | while (1) { |
91 | #ifdef HAVE_LCD_BITMAP | ||
92 | rb->lcd_clear_display(); | 77 | rb->lcd_clear_display(); |
93 | rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); | 78 | rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); |
94 | #ifdef REMOTE_LOGO | 79 | #ifdef REMOTE_LOGO |
@@ -98,12 +83,6 @@ enum plugin_status plugin_start(const void* parameter) { | |||
98 | (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), | 83 | (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), |
99 | REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); | 84 | REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); |
100 | #endif | 85 | #endif |
101 | #else | ||
102 | pgfx_clear_display(); | ||
103 | pgfx_mono_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT); | ||
104 | cpos = x / 5; | ||
105 | #endif | ||
106 | |||
107 | x += dx; | 86 | x += dx; |
108 | if (x < 0) { | 87 | if (x < 0) { |
109 | dx = -dx; | 88 | dx = -dx; |
@@ -124,19 +103,10 @@ enum plugin_status plugin_start(const void* parameter) { | |||
124 | y = DISPLAY_HEIGHT - LOGO_HEIGHT; | 103 | y = DISPLAY_HEIGHT - LOGO_HEIGHT; |
125 | } | 104 | } |
126 | 105 | ||
127 | #ifdef HAVE_LCD_BITMAP | ||
128 | rb->lcd_update(); | 106 | rb->lcd_update(); |
129 | #ifdef REMOTE_LOGO | 107 | #ifdef REMOTE_LOGO |
130 | rb->lcd_remote_update(); | 108 | rb->lcd_remote_update(); |
131 | #endif | 109 | #endif |
132 | #else | ||
133 | if (cpos != old_cpos) { | ||
134 | rb->lcd_clear_display(); | ||
135 | pgfx_display(cpos, 0); | ||
136 | old_cpos = cpos; | ||
137 | } | ||
138 | pgfx_update(); | ||
139 | #endif | ||
140 | rb->sleep(HZ/timer); | 110 | rb->sleep(HZ/timer); |
141 | 111 | ||
142 | 112 | ||
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 { | |||
71 | unsigned active_color; | 71 | unsigned active_color; |
72 | unsigned inactive_color; | 72 | unsigned inactive_color; |
73 | #endif | 73 | #endif |
74 | #ifdef HAVE_LCD_BITMAP | ||
75 | bool wrap; | 74 | bool wrap; |
76 | bool wipe; | 75 | bool wipe; |
77 | bool active_one_line; | 76 | bool active_one_line; |
78 | int align; /* 0: left, 1: center, 2: right */ | 77 | int align; /* 0: left, 1: center, 2: right */ |
79 | bool statusbar_on; | 78 | bool statusbar_on; |
80 | bool display_title; | 79 | bool display_title; |
81 | #endif | ||
82 | bool display_time; | 80 | bool display_time; |
83 | bool backlight_on; | 81 | bool backlight_on; |
84 | 82 | ||
@@ -118,16 +116,12 @@ static struct lrc_info { | |||
118 | bool loaded_lrc; | 116 | bool loaded_lrc; |
119 | bool changed_lrc; | 117 | bool changed_lrc; |
120 | bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ | 118 | bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ |
121 | #ifdef HAVE_LCD_BITMAP | ||
122 | bool wipe; /* false if lyrics is unsynched */ | 119 | bool wipe; /* false if lyrics is unsynched */ |
123 | #endif | ||
124 | } current; | 120 | } current; |
125 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; | 121 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; |
126 | #ifdef HAVE_LCD_BITMAP | ||
127 | static int uifont = -1; | 122 | static int uifont = -1; |
128 | static int font_ui_height = 1; | 123 | static int font_ui_height = 1; |
129 | static struct viewport vp_info[NB_SCREENS]; | 124 | static struct viewport vp_info[NB_SCREENS]; |
130 | #endif | ||
131 | static struct viewport vp_lyrics[NB_SCREENS]; | 125 | static struct viewport vp_lyrics[NB_SCREENS]; |
132 | 126 | ||
133 | #define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE) | 127 | #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, | |||
221 | { | 215 | { |
222 | /* draw cursor */ | 216 | /* draw cursor */ |
223 | buffer[p_end-1] = 0; | 217 | buffer[p_end-1] = 0; |
224 | #ifdef HAVE_LCD_BITMAP | ||
225 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 218 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
226 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); | 219 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); |
227 | rb->lcd_set_drawmode(DRMODE_SOLID); | 220 | rb->lcd_set_drawmode(DRMODE_SOLID); |
228 | #endif | ||
229 | } | 221 | } |
230 | rb->lcd_update(); | 222 | rb->lcd_update(); |
231 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); | 223 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); |
@@ -394,19 +386,16 @@ static int format_time_tag(char *buf, long t) | |||
394 | /* find start of next line */ | 386 | /* find start of next line */ |
395 | static const char *lrc_skip_space(const char *str) | 387 | static const char *lrc_skip_space(const char *str) |
396 | { | 388 | { |
397 | #ifdef HAVE_LCD_BITMAP | ||
398 | if (prefs.wrap) | 389 | if (prefs.wrap) |
399 | { | 390 | { |
400 | while (*str && *str != '\n' && isspace(*str)) | 391 | while (*str && *str != '\n' && isspace(*str)) |
401 | str++; | 392 | str++; |
402 | } | 393 | } |
403 | #endif | ||
404 | if (*str == '\n') | 394 | if (*str == '\n') |
405 | str++; | 395 | str++; |
406 | return str; | 396 | return str; |
407 | } | 397 | } |
408 | 398 | ||
409 | #ifdef HAVE_LCD_BITMAP | ||
410 | static bool isbrchr(const unsigned char *str, int len) | 399 | static bool isbrchr(const unsigned char *str, int len) |
411 | { | 400 | { |
412 | const unsigned char *p = "!,-.:;? 、。!,.:;?―"; | 401 | const unsigned char *p = "!,-.:;? 、。!,.:;?―"; |
@@ -422,7 +411,6 @@ static bool isbrchr(const unsigned char *str, int len) | |||
422 | } | 411 | } |
423 | return false; | 412 | return false; |
424 | } | 413 | } |
425 | #endif | ||
426 | 414 | ||
427 | /* calculate how many lines is needed to display and store it. | 415 | /* calculate how many lines is needed to display and store it. |
428 | * create cache if there is enough space in lrc_buffer. */ | 416 | * 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) | |||
431 | struct lrc_brpos *lrc_brpos; | 419 | struct lrc_brpos *lrc_brpos; |
432 | struct lrc_word *lrc_word; | 420 | struct lrc_word *lrc_word; |
433 | int nlrcbrpos = 0, max_lrcbrpos; | 421 | int nlrcbrpos = 0, max_lrcbrpos; |
434 | #ifdef HAVE_LCD_BITMAP | ||
435 | uifont = rb->screens[0]->getuifont(); | 422 | uifont = rb->screens[0]->getuifont(); |
436 | struct font* pf = rb->font_get(uifont); | 423 | struct font* pf = rb->font_get(uifont); |
437 | unsigned short ch; | 424 | unsigned short ch; |
438 | #endif | ||
439 | struct snap { | 425 | struct snap { |
440 | int count, width; | 426 | int count, width; |
441 | int nword; | 427 | int nword; |
@@ -1559,7 +1545,6 @@ static void display_state(void) | |||
1559 | str = "No lyrics"; | 1545 | str = "No lyrics"; |
1560 | } | 1546 | } |
1561 | 1547 | ||
1562 | #ifdef HAVE_LCD_BITMAP | ||
1563 | const char *info = NULL; | 1548 | const char *info = NULL; |
1564 | 1549 | ||
1565 | if (AUDIO_PLAY && prefs.display_title) | 1550 | if (AUDIO_PLAY && prefs.display_title) |
@@ -1605,13 +1590,6 @@ static void display_state(void) | |||
1605 | display->update_viewport(); | 1590 | display->update_viewport(); |
1606 | display->set_viewport(NULL); | 1591 | display->set_viewport(NULL); |
1607 | } | 1592 | } |
1608 | #else | ||
1609 | /* there is no place to display title or artist. */ | ||
1610 | rb->lcd_clear_display(); | ||
1611 | if (str) | ||
1612 | rb->lcd_puts_scroll(0, 0, str); | ||
1613 | rb->lcd_update(); | ||
1614 | #endif /* HAVE_LCD_BITMAP */ | ||
1615 | } | 1593 | } |
1616 | 1594 | ||
1617 | static void display_time(void) | 1595 | static void display_time(void) |
@@ -1619,7 +1597,6 @@ static void display_time(void) | |||
1619 | rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", | 1597 | rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", |
1620 | current.elapsed/60000, (current.elapsed/1000)%60, | 1598 | current.elapsed/60000, (current.elapsed/1000)%60, |
1621 | current.length/60000, (current.length)/1000%60); | 1599 | current.length/60000, (current.length)/1000%60); |
1622 | #ifdef HAVE_LCD_BITMAP | ||
1623 | int y = (prefs.display_title? font_ui_height:0); | 1600 | int y = (prefs.display_title? font_ui_height:0); |
1624 | FOR_NB_SCREENS(i) | 1601 | FOR_NB_SCREENS(i) |
1625 | { | 1602 | { |
@@ -1634,16 +1611,11 @@ static void display_time(void) | |||
1634 | display->setfont(uifont); | 1611 | display->setfont(uifont); |
1635 | display->set_viewport(NULL); | 1612 | display->set_viewport(NULL); |
1636 | } | 1613 | } |
1637 | #else | ||
1638 | rb->lcd_puts(0, 0, temp_buf); | ||
1639 | rb->lcd_update(); | ||
1640 | #endif /* HAVE_LCD_BITMAP */ | ||
1641 | } | 1614 | } |
1642 | 1615 | ||
1643 | /******************************* | 1616 | /******************************* |
1644 | * Display lyrics | 1617 | * Display lyrics |
1645 | *******************************/ | 1618 | *******************************/ |
1646 | #ifdef HAVE_LCD_BITMAP | ||
1647 | static inline void set_to_default(struct screen *display) | 1619 | static inline void set_to_default(struct screen *display) |
1648 | { | 1620 | { |
1649 | #if (LCD_DEPTH > 1) | 1621 | #if (LCD_DEPTH > 1) |
@@ -1817,7 +1789,6 @@ static int display_lrc_line(struct lrc_line *lrc_line, int ypos, int i) | |||
1817 | set_to_default(display); | 1789 | set_to_default(display); |
1818 | return ypos; | 1790 | return ypos; |
1819 | } | 1791 | } |
1820 | #endif /* HAVE_LCD_BITMAP */ | ||
1821 | 1792 | ||
1822 | static void display_lrcs(void) | 1793 | static void display_lrcs(void) |
1823 | { | 1794 | { |
@@ -1848,7 +1819,7 @@ static void display_lrcs(void) | |||
1848 | /* display current line at the center of the viewport */ | 1819 | /* display current line at the center of the viewport */ |
1849 | display->set_viewport(&vp_lyrics[i]); | 1820 | display->set_viewport(&vp_lyrics[i]); |
1850 | display->clear_viewport(); | 1821 | display->clear_viewport(); |
1851 | #ifdef HAVE_LCD_BITMAP | 1822 | |
1852 | struct lrc_line *lrc_line; | 1823 | struct lrc_line *lrc_line; |
1853 | int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; | 1824 | int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; |
1854 | y = (nblines-1)/2; | 1825 | y = (nblines-1)/2; |
@@ -1895,7 +1866,7 @@ static void display_lrcs(void) | |||
1895 | } | 1866 | } |
1896 | if (!lrc_line && ypos < vp_lyrics[i].height) | 1867 | if (!lrc_line && ypos < vp_lyrics[i].height) |
1897 | display->putsxy(0, ypos, "[end]"); | 1868 | display->putsxy(0, ypos, "[end]"); |
1898 | #endif /* HAVE_LCD_BITMAP */ | 1869 | |
1899 | display->update_viewport(); | 1870 | display->update_viewport(); |
1900 | display->set_viewport(NULL); | 1871 | display->set_viewport(NULL); |
1901 | } | 1872 | } |
@@ -2191,7 +2162,6 @@ static void load_or_save_settings(bool save) | |||
2191 | { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, | 2162 | { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, |
2192 | "inactive color", NULL }, | 2163 | "inactive color", NULL }, |
2193 | #endif | 2164 | #endif |
2194 | #ifdef HAVE_LCD_BITMAP | ||
2195 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, | 2165 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, |
2196 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, | 2166 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, |
2197 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, | 2167 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, |
@@ -2201,7 +2171,6 @@ static void load_or_save_settings(bool save) | |||
2201 | "statusbar on", NULL }, | 2171 | "statusbar on", NULL }, |
2202 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, | 2172 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, |
2203 | "display title", NULL }, | 2173 | "display title", NULL }, |
2204 | #endif | ||
2205 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, | 2174 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, |
2206 | "display time", NULL }, | 2175 | "display time", NULL }, |
2207 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, | 2176 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, |
@@ -2223,14 +2192,12 @@ static void load_or_save_settings(bool save) | |||
2223 | prefs.active_color = rb->lcd_get_foreground(); | 2192 | prefs.active_color = rb->lcd_get_foreground(); |
2224 | prefs.inactive_color = LCD_LIGHTGRAY; | 2193 | prefs.inactive_color = LCD_LIGHTGRAY; |
2225 | #endif | 2194 | #endif |
2226 | #ifdef HAVE_LCD_BITMAP | ||
2227 | prefs.wrap = true; | 2195 | prefs.wrap = true; |
2228 | prefs.wipe = true; | 2196 | prefs.wipe = true; |
2229 | prefs.active_one_line = false; | 2197 | prefs.active_one_line = false; |
2230 | prefs.align = 1; /* center */ | 2198 | prefs.align = 1; /* center */ |
2231 | prefs.statusbar_on = false; | 2199 | prefs.statusbar_on = false; |
2232 | prefs.display_title = true; | 2200 | prefs.display_title = true; |
2233 | #endif | ||
2234 | prefs.display_time = true; | 2201 | prefs.display_time = true; |
2235 | prefs.backlight_on = false; | 2202 | prefs.backlight_on = false; |
2236 | #ifdef LRC_SUPPORT_ID3 | 2203 | #ifdef LRC_SUPPORT_ID3 |
@@ -2252,10 +2219,8 @@ static void load_or_save_settings(bool save) | |||
2252 | static bool lrc_theme_menu(void) | 2219 | static bool lrc_theme_menu(void) |
2253 | { | 2220 | { |
2254 | enum { | 2221 | enum { |
2255 | #ifdef HAVE_LCD_BITMAP | ||
2256 | LRC_MENU_STATUSBAR, | 2222 | LRC_MENU_STATUSBAR, |
2257 | LRC_MENU_DISP_TITLE, | 2223 | LRC_MENU_DISP_TITLE, |
2258 | #endif | ||
2259 | LRC_MENU_DISP_TIME, | 2224 | LRC_MENU_DISP_TIME, |
2260 | #ifdef HAVE_LCD_COLOR | 2225 | #ifdef HAVE_LCD_COLOR |
2261 | LRC_MENU_INACTIVE_COLOR, | 2226 | LRC_MENU_INACTIVE_COLOR, |
@@ -2267,9 +2232,7 @@ static bool lrc_theme_menu(void) | |||
2267 | bool exit = false, usb = false; | 2232 | bool exit = false, usb = false; |
2268 | 2233 | ||
2269 | MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, | 2234 | MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, |
2270 | #ifdef HAVE_LCD_BITMAP | ||
2271 | "Show Statusbar", "Display Title", | 2235 | "Show Statusbar", "Display Title", |
2272 | #endif | ||
2273 | "Display Time", | 2236 | "Display Time", |
2274 | #ifdef HAVE_LCD_COLOR | 2237 | #ifdef HAVE_LCD_COLOR |
2275 | "Inactive Colour", | 2238 | "Inactive Colour", |
@@ -2280,14 +2243,12 @@ static bool lrc_theme_menu(void) | |||
2280 | { | 2243 | { |
2281 | switch (rb->do_menu(&menu, &selected, NULL, false)) | 2244 | switch (rb->do_menu(&menu, &selected, NULL, false)) |
2282 | { | 2245 | { |
2283 | #ifdef HAVE_LCD_BITMAP | ||
2284 | case LRC_MENU_STATUSBAR: | 2246 | case LRC_MENU_STATUSBAR: |
2285 | usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); | 2247 | usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); |
2286 | break; | 2248 | break; |
2287 | case LRC_MENU_DISP_TITLE: | 2249 | case LRC_MENU_DISP_TITLE: |
2288 | usb = rb->set_bool("Display Title", &prefs.display_title); | 2250 | usb = rb->set_bool("Display Title", &prefs.display_title); |
2289 | break; | 2251 | break; |
2290 | #endif | ||
2291 | case LRC_MENU_DISP_TIME: | 2252 | case LRC_MENU_DISP_TIME: |
2292 | usb = rb->set_bool("Display Time", &prefs.display_time); | 2253 | usb = rb->set_bool("Display Time", &prefs.display_time); |
2293 | break; | 2254 | break; |
@@ -2312,7 +2273,6 @@ static bool lrc_theme_menu(void) | |||
2312 | return usb; | 2273 | return usb; |
2313 | } | 2274 | } |
2314 | 2275 | ||
2315 | #ifdef HAVE_LCD_BITMAP | ||
2316 | static bool lrc_display_menu(void) | 2276 | static bool lrc_display_menu(void) |
2317 | { | 2277 | { |
2318 | enum { | 2278 | enum { |
@@ -2362,7 +2322,6 @@ static bool lrc_display_menu(void) | |||
2362 | 2322 | ||
2363 | return usb; | 2323 | return usb; |
2364 | } | 2324 | } |
2365 | #endif /* HAVE_LCD_BITMAP */ | ||
2366 | 2325 | ||
2367 | static bool lrc_lyrics_menu(void) | 2326 | static bool lrc_lyrics_menu(void) |
2368 | { | 2327 | { |
@@ -2489,9 +2448,7 @@ static int lrc_menu(void) | |||
2489 | { | 2448 | { |
2490 | enum { | 2449 | enum { |
2491 | LRC_MENU_THEME, | 2450 | LRC_MENU_THEME, |
2492 | #ifdef HAVE_LCD_BITMAP | ||
2493 | LRC_MENU_DISPLAY, | 2451 | LRC_MENU_DISPLAY, |
2494 | #endif | ||
2495 | LRC_MENU_LYRICS, | 2452 | LRC_MENU_LYRICS, |
2496 | LRC_MENU_PLAYBACK, | 2453 | LRC_MENU_PLAYBACK, |
2497 | #ifdef LRC_DEBUG | 2454 | #ifdef LRC_DEBUG |
@@ -2504,9 +2461,7 @@ static int lrc_menu(void) | |||
2504 | 2461 | ||
2505 | MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, | 2462 | MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, |
2506 | "Theme Settings", | 2463 | "Theme Settings", |
2507 | #ifdef HAVE_LCD_BITMAP | ||
2508 | "Display Settings", | 2464 | "Display Settings", |
2509 | #endif | ||
2510 | "Lyrics Settings", | 2465 | "Lyrics Settings", |
2511 | "Playback Control", | 2466 | "Playback Control", |
2512 | #ifdef LRC_DEBUG | 2467 | #ifdef LRC_DEBUG |
@@ -2524,11 +2479,9 @@ static int lrc_menu(void) | |||
2524 | case LRC_MENU_THEME: | 2479 | case LRC_MENU_THEME: |
2525 | usb = lrc_theme_menu(); | 2480 | usb = lrc_theme_menu(); |
2526 | break; | 2481 | break; |
2527 | #ifdef HAVE_LCD_BITMAP | ||
2528 | case LRC_MENU_DISPLAY: | 2482 | case LRC_MENU_DISPLAY: |
2529 | usb = lrc_display_menu(); | 2483 | usb = lrc_display_menu(); |
2530 | break; | 2484 | break; |
2531 | #endif | ||
2532 | case LRC_MENU_LYRICS: | 2485 | case LRC_MENU_LYRICS: |
2533 | usb = lrc_lyrics_menu(); | 2486 | usb = lrc_lyrics_menu(); |
2534 | break; | 2487 | break; |
@@ -2720,40 +2673,27 @@ static int lrc_main(void) | |||
2720 | long id3_timeout = 0; | 2673 | long id3_timeout = 0; |
2721 | bool update_display_state = true; | 2674 | bool update_display_state = true; |
2722 | 2675 | ||
2723 | #ifdef HAVE_LCD_BITMAP | ||
2724 | /* y offset of vp_lyrics */ | 2676 | /* y offset of vp_lyrics */ |
2725 | int h = (prefs.display_title?font_ui_height:0)+ | 2677 | int h = (prefs.display_title?font_ui_height:0)+ |
2726 | (prefs.display_time?SYSFONT_HEIGHT*2:0); | 2678 | (prefs.display_time?SYSFONT_HEIGHT*2:0); |
2727 | 2679 | ||
2728 | #endif | ||
2729 | 2680 | ||
2730 | FOR_NB_SCREENS(i) | 2681 | FOR_NB_SCREENS(i) |
2731 | { | 2682 | { |
2732 | #ifdef HAVE_LCD_BITMAP | ||
2733 | rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); | 2683 | rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); |
2734 | vp_lyrics[i] = vp_info[i]; | 2684 | vp_lyrics[i] = vp_info[i]; |
2735 | vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; | 2685 | vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; |
2736 | vp_lyrics[i].y += h; | 2686 | vp_lyrics[i].y += h; |
2737 | vp_lyrics[i].height -= h; | 2687 | vp_lyrics[i].height -= h; |
2738 | #else | ||
2739 | rb->viewport_set_defaults(&vp_lyrics[i], i); | ||
2740 | if (prefs.display_time) | ||
2741 | { | ||
2742 | vp_lyrics[i].y += 1; /* time */ | ||
2743 | vp_lyrics[i].height -= 1; | ||
2744 | } | ||
2745 | #endif | ||
2746 | } | 2688 | } |
2747 | 2689 | ||
2748 | if (prefs.backlight_on) | 2690 | if (prefs.backlight_on) |
2749 | backlight_ignore_timeout(); | 2691 | backlight_ignore_timeout(); |
2750 | 2692 | ||
2751 | #ifdef HAVE_LCD_BITMAP | 2693 | /* in case settings that may affect break position |
2752 | /* in case settings that may affect break position | ||
2753 | * are changed (statusbar_on and wrap). */ | 2694 | * are changed (statusbar_on and wrap). */ |
2754 | if (!current.too_many_lines) | 2695 | if (!current.too_many_lines) |
2755 | calc_brpos(NULL, 0); | 2696 | calc_brpos(NULL, 0); |
2756 | #endif | ||
2757 | 2697 | ||
2758 | while (ret == LRC_GOTO_MAIN) | 2698 | while (ret == LRC_GOTO_MAIN) |
2759 | { | 2699 | { |
@@ -2819,12 +2759,10 @@ static int lrc_main(void) | |||
2819 | } | 2759 | } |
2820 | if (update_display_state) | 2760 | if (update_display_state) |
2821 | { | 2761 | { |
2822 | #ifdef HAVE_LCD_BITMAP | ||
2823 | if (current.type == TXT || current.type == ID3_USLT) | 2762 | if (current.type == TXT || current.type == ID3_USLT) |
2824 | current.wipe = false; | 2763 | current.wipe = false; |
2825 | else | 2764 | else |
2826 | current.wipe = prefs.wipe; | 2765 | current.wipe = prefs.wipe; |
2827 | #endif | ||
2828 | display_state(); | 2766 | display_state(); |
2829 | update_display_state = false; | 2767 | update_display_state = false; |
2830 | } | 2768 | } |
@@ -2839,10 +2777,9 @@ static int lrc_main(void) | |||
2839 | ret = handle_button(); | 2777 | ret = handle_button(); |
2840 | } | 2778 | } |
2841 | 2779 | ||
2842 | #ifdef HAVE_LCD_BITMAP | ||
2843 | FOR_NB_SCREENS(i) | 2780 | FOR_NB_SCREENS(i) |
2844 | rb->viewportmanager_theme_undo(i, false); | 2781 | rb->viewportmanager_theme_undo(i, false); |
2845 | #endif | 2782 | |
2846 | if (prefs.backlight_on) | 2783 | if (prefs.backlight_on) |
2847 | backlight_use_settings(); | 2784 | backlight_use_settings(); |
2848 | 2785 | ||
@@ -2857,10 +2794,8 @@ enum plugin_status plugin_start(const void* parameter) | |||
2857 | /* initialize settings. */ | 2794 | /* initialize settings. */ |
2858 | load_or_save_settings(false); | 2795 | load_or_save_settings(false); |
2859 | 2796 | ||
2860 | #ifdef HAVE_LCD_BITMAP | ||
2861 | uifont = rb->screens[0]->getuifont(); | 2797 | uifont = rb->screens[0]->getuifont(); |
2862 | font_ui_height = rb->font_get(uifont)->height; | 2798 | font_ui_height = rb->font_get(uifont)->height; |
2863 | #endif | ||
2864 | 2799 | ||
2865 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); | 2800 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); |
2866 | lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ | 2801 | 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, | |||
1331 | vp->y = check_tablevalue(L, "y", narg); | 1331 | vp->y = check_tablevalue(L, "y", narg); |
1332 | vp->width = check_tablevalue(L, "width", narg); | 1332 | vp->width = check_tablevalue(L, "width", narg); |
1333 | vp->height = check_tablevalue(L, "height", narg); | 1333 | vp->height = check_tablevalue(L, "height", narg); |
1334 | #ifdef HAVE_LCD_BITMAP | ||
1335 | vp->font = check_tablevalue(L, "font", narg); | 1334 | vp->font = check_tablevalue(L, "font", narg); |
1336 | vp->drawmode = check_tablevalue(L, "drawmode", narg); | 1335 | vp->drawmode = check_tablevalue(L, "drawmode", narg); |
1337 | #endif | ||
1338 | #if LCD_DEPTH > 1 | 1336 | #if LCD_DEPTH > 1 |
1339 | vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg); | 1337 | vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg); |
1340 | vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg); | 1338 | vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg); |
@@ -1379,7 +1377,6 @@ RB_WRAP(font_getstringsize) | |||
1379 | return 3; | 1377 | return 3; |
1380 | } | 1378 | } |
1381 | 1379 | ||
1382 | #ifdef HAVE_LCD_BITMAP | ||
1383 | RB_WRAP(lcd_framebuffer) | 1380 | RB_WRAP(lcd_framebuffer) |
1384 | { | 1381 | { |
1385 | rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); | 1382 | rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); |
@@ -1620,8 +1617,6 @@ RB_WRAP(lcd_drawpixel) | |||
1620 | return 0; | 1617 | return 0; |
1621 | } | 1618 | } |
1622 | 1619 | ||
1623 | #endif /* defined(LCD_BITMAP) */ | ||
1624 | |||
1625 | #ifdef HAVE_LCD_COLOR | 1620 | #ifdef HAVE_LCD_COLOR |
1626 | RB_WRAP(lcd_rgbpack) | 1621 | RB_WRAP(lcd_rgbpack) |
1627 | { | 1622 | { |
@@ -1690,7 +1685,6 @@ static const luaL_Reg rocklib_img[] = | |||
1690 | R(set_viewport), | 1685 | R(set_viewport), |
1691 | R(clear_viewport), | 1686 | R(clear_viewport), |
1692 | R(font_getstringsize), | 1687 | R(font_getstringsize), |
1693 | #ifdef HAVE_LCD_BITMAP | ||
1694 | R(lcd_framebuffer), | 1688 | R(lcd_framebuffer), |
1695 | R(lcd_setfont), | 1689 | R(lcd_setfont), |
1696 | R(gui_scrollbar_draw), | 1690 | R(gui_scrollbar_draw), |
@@ -1721,7 +1715,6 @@ static const luaL_Reg rocklib_img[] = | |||
1721 | R(lcd_vline), | 1715 | R(lcd_vline), |
1722 | R(lcd_drawpixel), | 1716 | R(lcd_drawpixel), |
1723 | 1717 | ||
1724 | #endif /*HAVE_LCD_BITMAP*/ | ||
1725 | #ifdef HAVE_LCD_COLOR | 1718 | #ifdef HAVE_LCD_COLOR |
1726 | R(lcd_rgbpack), | 1719 | R(lcd_rgbpack), |
1727 | R(lcd_rgbunpack), | 1720 | 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 @@ | |||
22 | #ifndef _ROCKLIB_IMG_H_ | 22 | #ifndef _ROCKLIB_IMG_H_ |
23 | #define _ROCKLIB_IMG_H_ | 23 | #define _ROCKLIB_IMG_H_ |
24 | 24 | ||
25 | #ifdef HAVE_LCD_BITMAP | ||
26 | #define RLI_EXTENDED | 25 | #define RLI_EXTENDED |
27 | #endif | ||
28 | 26 | ||
29 | LUALIB_API int (luaopen_rock_img) (lua_State *L); | 27 | LUALIB_API int (luaopen_rock_img) (lua_State *L); |
30 | 28 | ||
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) | |||
840 | int textlen = display->lcdwidth / display->getcharwidth(); | 840 | int textlen = display->lcdwidth / display->getcharwidth(); |
841 | ps = part; | 841 | ps = part; |
842 | display->clear_display(); | 842 | display->clear_display(); |
843 | #ifdef HAVE_LCD_BITMAP | ||
844 | display->setfont(FONT_SYSFIXED); | 843 | display->setfont(FONT_SYSFIXED); |
845 | #endif | ||
846 | switch(state) | 844 | switch(state) |
847 | { | 845 | { |
848 | #ifdef HAVE_LCD_BITMAP | ||
849 | case 0: | 846 | case 0: |
850 | if(sound_paused) | 847 | if(sound_paused) |
851 | { | 848 | { |
@@ -876,49 +873,17 @@ static void metronome_draw(struct screen* display, int state) | |||
876 | case 3: | 873 | case 3: |
877 | display->puts((textlen-3)/2,0, "o.O"); | 874 | display->puts((textlen-3)/2,0, "o.O"); |
878 | break; | 875 | break; |
879 | #else /* Much simpler on 2-line text display, but same thing. */ | ||
880 | case 1: | ||
881 | if((beat+1) % 2 == 0) | ||
882 | beat1 = '/'; | ||
883 | else | ||
884 | beat1 = '\\'; | ||
885 | break; | ||
886 | case 2: | ||
887 | if((beat+1) % 2 == 0) | ||
888 | beat2 = '/'; | ||
889 | else | ||
890 | beat2 = '\\'; | ||
891 | break; | ||
892 | case 3: | ||
893 | beat1 = '.'; | ||
894 | break; | ||
895 | #endif | ||
896 | } | 876 | } |
897 | 877 | ||
898 | if(track_mode) | 878 | if(track_mode) |
899 | { | 879 | { |
900 | 880 | ||
901 | #ifdef HAVE_LCD_BITMAP | ||
902 | /* One line in several. */ | 881 | /* One line in several. */ |
903 | rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d" | 882 | rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d" |
904 | , ps->beats_per_bar, ps->base_beat | 883 | , ps->beats_per_bar, ps->base_beat |
905 | , bpm, rb->global_settings->volume ); | 884 | , bpm, rb->global_settings->volume ); |
906 | display->puts(0,4, buffer); | 885 | display->puts(0,4, buffer); |
907 | #else | 886 | |
908 | /* Just two short lines with integrated beat indicator. */ | ||
909 | rb->snprintf( buffer, sizeof(buffer), "%c %u/%u@%u" | ||
910 | , beat1 | ||
911 | , ps->beats_per_bar, ps->base_beat | ||
912 | , bpm ); | ||
913 | display->puts(0,0, buffer); | ||
914 | /* Simulator prints format %+02d ... real Rockbox doesn't. */ | ||
915 | rb->snprintf( buffer, sizeof(buffer), "%c V%d" | ||
916 | , beat2 | ||
917 | , rb->global_settings->volume ); | ||
918 | display->puts(0,1, buffer); | ||
919 | #endif /* HAVE_LCD_BITMAP */ | ||
920 | |||
921 | #ifdef HAVE_LCD_BITMAP | ||
922 | /* Would it hurt to draw a 3rd line to 2-line display? | 887 | /* Would it hurt to draw a 3rd line to 2-line display? |
923 | I guess there are 3-line displays out there. */ | 888 | I guess there are 3-line displays out there. */ |
924 | if(ps->label && rb->strlen(ps->label)) | 889 | if(ps->label && rb->strlen(ps->label)) |
@@ -935,13 +900,11 @@ static void metronome_draw(struct screen* display, int state) | |||
935 | rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u" | 900 | rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u" |
936 | , part->id+1, parts, bar+1, beat+1 ); | 901 | , part->id+1, parts, bar+1, beat+1 ); |
937 | display->puts(0, 5, buffer); | 902 | display->puts(0, 5, buffer); |
938 | #endif /* HAVE_LCD_BITMAP */ | ||
939 | 903 | ||
940 | } | 904 | } |
941 | else /* track mode */ | 905 | else /* track mode */ |
942 | { | 906 | { |
943 | 907 | ||
944 | #ifdef HAVE_LCD_BITMAP | ||
945 | if(display->screen_type==SCREEN_MAIN) | 908 | if(display->screen_type==SCREEN_MAIN) |
946 | { | 909 | { |
947 | #ifdef MET_SYNC | 910 | #ifdef MET_SYNC |
@@ -960,32 +923,18 @@ static void metronome_draw(struct screen* display, int state) | |||
960 | #endif | 923 | #endif |
961 | } | 924 | } |
962 | #endif | 925 | #endif |
963 | #endif /* HAVE_LCD_BITMAP */ | ||
964 | 926 | ||
965 | #ifdef HAVE_LCD_BITMAP | ||
966 | rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d" | 927 | rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d" |
967 | , bpm, rb->global_settings->volume ); | 928 | , bpm, rb->global_settings->volume ); |
968 | display->puts(0,3, buffer); | 929 | display->puts(0,3, buffer); |
969 | #else | 930 | |
970 | rb->snprintf( buffer, sizeof(buffer), "%c BPM: %d " | ||
971 | , beat1, bpm ); | ||
972 | display->puts(0,0, buffer); | ||
973 | rb->snprintf( buffer, sizeof(buffer), "%c Vol: %d" | ||
974 | , beat2, rb->global_settings->volume ); | ||
975 | display->puts(0,1, buffer); | ||
976 | #endif /* HAVE_LCD_BITMAP */ | ||
977 | |||
978 | #ifdef HAVE_LCD_BITMAP | ||
979 | display->hline(0, 111, 12); | 931 | display->hline(0, 111, 12); |
980 | if(sound_paused) display->puts(0,2,"start: hold select"); | 932 | if(sound_paused) display->puts(0,2,"start: hold select"); |
981 | else display->puts(0,2,"stop : cancel"); | 933 | else display->puts(0,2,"stop : cancel"); |
982 | #endif /* HAVE_LCD_BITMAP */ | ||
983 | 934 | ||
984 | } /* !track_mode */ | 935 | } /* !track_mode */ |
985 | 936 | ||
986 | #ifdef HAVE_LCD_BITMAP | ||
987 | display->setfont(FONT_UI); | 937 | display->setfont(FONT_UI); |
988 | #endif /* HAVE_LCD_BITMAP */ | ||
989 | display->update(); | 938 | display->update(); |
990 | } | 939 | } |
991 | 940 | ||
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 @@ | |||
23 | #include "lib/pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
24 | 24 | ||
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | #define GFX_X (LCD_WIDTH/2-1) | 26 | #define GFX_X (LCD_WIDTH/2-1) |
28 | #define GFX_Y (LCD_HEIGHT/2-1) | 27 | #define GFX_Y (LCD_HEIGHT/2-1) |
29 | #if LCD_WIDTH != LCD_HEIGHT | 28 | #if LCD_WIDTH != LCD_HEIGHT |
@@ -33,12 +32,6 @@ | |||
33 | #define GFX_WIDTH GFX_X | 32 | #define GFX_WIDTH GFX_X |
34 | #define GFX_HEIGHT (4*GFX_Y/5) | 33 | #define GFX_HEIGHT (4*GFX_Y/5) |
35 | #endif | 34 | #endif |
36 | #else | ||
37 | #define GFX_X 9 | ||
38 | #define GFX_Y 6 | ||
39 | #define GFX_WIDTH 9 | ||
40 | #define GFX_HEIGHT 6 | ||
41 | #endif | ||
42 | 35 | ||
43 | /* this set the context to use with PLA */ | 36 | /* this set the context to use with PLA */ |
44 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | 37 | 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) | |||
1007 | rb->lcd_set_background(LCD_BLACK); | 1007 | rb->lcd_set_background(LCD_BLACK); |
1008 | #endif | 1008 | #endif |
1009 | 1009 | ||
1010 | #ifdef HAVE_LCD_BITMAP | ||
1011 | rb->lcd_setfont(FONT_UI); | 1010 | rb->lcd_setfont(FONT_UI); |
1012 | #endif | ||
1013 | 1011 | ||
1014 | static char *help_text[] = { "One-Time Password Manager", "", | 1012 | static char *help_text[] = { "One-Time Password Manager", "", |
1015 | "Introduction", "", | 1013 | "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) | |||
1462 | enum plugin_status plugin_start(const void* parameter) | 1462 | enum plugin_status plugin_start(const void* parameter) |
1463 | { | 1463 | { |
1464 | (void)parameter; | 1464 | (void)parameter; |
1465 | #ifdef HAVE_LCD_BITMAP | ||
1466 | rb->lcd_setfont(FONT_SYSFIXED); | 1465 | rb->lcd_setfont(FONT_SYSFIXED); |
1467 | #if LCD_DEPTH > 1 | 1466 | #if LCD_DEPTH > 1 |
1468 | rb->lcd_set_backdrop(NULL); | 1467 | rb->lcd_set_backdrop(NULL); |
@@ -1484,7 +1483,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
1484 | pegbox_main(&pb); | 1483 | pegbox_main(&pb); |
1485 | configfile_save(CONFIG_FILE_NAME,config,2,0); | 1484 | configfile_save(CONFIG_FILE_NAME,config,2,0); |
1486 | rb->lcd_setfont(FONT_UI); | 1485 | rb->lcd_setfont(FONT_UI); |
1487 | #endif /* HAVE_LCD_BITMAP */ | ||
1488 | 1486 | ||
1489 | return PLUGIN_OK; | 1487 | return PLUGIN_OK; |
1490 | } | 1488 | } |
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) | |||
411 | return PLUGIN_OK; | 411 | return PLUGIN_OK; |
412 | } | 412 | } |
413 | 413 | ||
414 | #ifdef HAVE_LCD_BITMAP | ||
415 | FOR_NB_SCREENS(i) | 414 | FOR_NB_SCREENS(i) |
416 | rb->viewportmanager_theme_enable(i, true, NULL); | 415 | rb->viewportmanager_theme_enable(i, true, NULL); |
417 | #endif | ||
418 | 416 | ||
419 | rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL); | 417 | rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL); |
420 | rb->gui_synclist_set_title(&properties_lists, rb->str(its_a_dir ? LANG_PROPERTIES_DIRECTORY_PROPERTIES : LANG_PROPERTIES_FILE_PROPERTIES), NOICON); | 418 | 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) | |||
448 | } | 446 | } |
449 | } | 447 | } |
450 | 448 | ||
451 | #ifdef HAVE_LCD_BITMAP | ||
452 | FOR_NB_SCREENS(i) | 449 | FOR_NB_SCREENS(i) |
453 | rb->viewportmanager_theme_undo(i, false); | 450 | rb->viewportmanager_theme_undo(i, false); |
454 | #endif | ||
455 | 451 | ||
456 | return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK; | 452 | return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK; |
457 | } | 453 | } |
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 @@ | |||
532 | 532 | ||
533 | #define BOARD_WIDTH 10 | 533 | #define BOARD_WIDTH 10 |
534 | 534 | ||
535 | #ifdef HAVE_LCD_BITMAP | ||
536 | |||
537 | #define BOARD_HEIGHT 20 | 535 | #define BOARD_HEIGHT 20 |
538 | 536 | ||
539 | #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) | 537 | #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) |
@@ -757,6 +755,9 @@ | |||
757 | #define LEVEL_X 58 | 755 | #define LEVEL_X 58 |
758 | #define LINES_Y 62 | 756 | #define LINES_Y 62 |
759 | #define LINES_X 58 | 757 | #define LINES_X 58 |
758 | |||
759 | #else | ||
760 | #error "lcd screen size not defined!" | ||
760 | #endif | 761 | #endif |
761 | 762 | ||
762 | #ifndef LEVEL_X | 763 | #ifndef LEVEL_X |
@@ -769,10 +770,6 @@ | |||
769 | 770 | ||
770 | extern const fb_data rockblox_background[]; | 771 | extern const fb_data rockblox_background[]; |
771 | 772 | ||
772 | #else | ||
773 | #error "lcd screen size not defined!" | ||
774 | #endif | ||
775 | |||
776 | #ifndef HIGHSCORE_SPACE | 773 | #ifndef HIGHSCORE_SPACE |
777 | #define HIGHSCORE_SPACE " " | 774 | #define HIGHSCORE_SPACE " " |
778 | #endif | 775 | #endif |
@@ -974,7 +971,6 @@ static void init_board (void) | |||
974 | /* show the score, level and lines */ | 971 | /* show the score, level and lines */ |
975 | static void show_details (void) | 972 | static void show_details (void) |
976 | { | 973 | { |
977 | #ifdef HAVE_LCD_BITMAP | ||
978 | #if LCD_DEPTH >= 2 | 974 | #if LCD_DEPTH >= 2 |
979 | rb->lcd_set_foreground (LCD_BLACK); | 975 | rb->lcd_set_foreground (LCD_BLACK); |
980 | rb->lcd_set_background (LCD_WHITE); | 976 | rb->lcd_set_background (LCD_WHITE); |
@@ -982,7 +978,6 @@ static void show_details (void) | |||
982 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); | 978 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); |
983 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); | 979 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); |
984 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); | 980 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); |
985 | #endif | ||
986 | } | 981 | } |
987 | 982 | ||
988 | #ifdef HIGH_SCORE_Y | 983 | #ifdef HIGH_SCORE_Y |
@@ -1050,9 +1045,7 @@ static void init_rockblox (bool resume) | |||
1050 | tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, | 1045 | tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, |
1051 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 1046 | tm->tm_hour, tm->tm_min, tm->tm_sec); |
1052 | 1047 | ||
1053 | #ifdef HAVE_LCD_BITMAP | ||
1054 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); | 1048 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); |
1055 | #endif | ||
1056 | if (!resume) | 1049 | if (!resume) |
1057 | { | 1050 | { |
1058 | rockblox_status.level = 1; | 1051 | rockblox_status.level = 1; |
@@ -1149,7 +1142,6 @@ static void refresh_board (void) | |||
1149 | for (j = 0; j < BOARD_HEIGHT; j++) { | 1142 | for (j = 0; j < BOARD_HEIGHT; j++) { |
1150 | block = rockblox_status.board[j][i]; | 1143 | block = rockblox_status.board[j][i]; |
1151 | if (block != EMPTY_BLOCK) { | 1144 | if (block != EMPTY_BLOCK) { |
1152 | #ifdef HAVE_LCD_BITMAP | ||
1153 | #if LCD_DEPTH >= 2 | 1145 | #if LCD_DEPTH >= 2 |
1154 | /* middle drawing */ | 1146 | /* middle drawing */ |
1155 | rb->lcd_set_foreground (figures[block].color[1]); | 1147 | rb->lcd_set_foreground (figures[block].color[1]); |
@@ -1177,7 +1169,6 @@ static void refresh_board (void) | |||
1177 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, | 1169 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, |
1178 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, | 1170 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, |
1179 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); | 1171 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); |
1180 | #endif | ||
1181 | } | 1172 | } |
1182 | } | 1173 | } |
1183 | 1174 | ||
@@ -1194,7 +1185,6 @@ static void refresh_board (void) | |||
1194 | + rockblox_status.cx; | 1185 | + rockblox_status.cx; |
1195 | y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) | 1186 | y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) |
1196 | + ghost_y; | 1187 | + ghost_y; |
1197 | #ifdef HAVE_LCD_BITMAP | ||
1198 | #if LCD_DEPTH >= 2 | 1188 | #if LCD_DEPTH >= 2 |
1199 | /* middle drawing */ | 1189 | /* middle drawing */ |
1200 | rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]); | 1190 | rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]); |
@@ -1221,7 +1211,6 @@ static void refresh_board (void) | |||
1221 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1211 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1222 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1212 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1223 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1213 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1224 | #endif | ||
1225 | } | 1214 | } |
1226 | 1215 | ||
1227 | /* draw current piece */ | 1216 | /* draw current piece */ |
@@ -1231,7 +1220,6 @@ static void refresh_board (void) | |||
1231 | + rockblox_status.cx; | 1220 | + rockblox_status.cx; |
1232 | y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) | 1221 | y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) |
1233 | + rockblox_status.cy; | 1222 | + rockblox_status.cy; |
1234 | #ifdef HAVE_LCD_BITMAP | ||
1235 | #if LCD_DEPTH >= 2 | 1223 | #if LCD_DEPTH >= 2 |
1236 | /* middle drawing */ | 1224 | /* middle drawing */ |
1237 | rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]); | 1225 | rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]); |
@@ -1258,7 +1246,6 @@ static void refresh_board (void) | |||
1258 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1246 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1259 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1247 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1260 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1248 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1261 | #endif | ||
1262 | } | 1249 | } |
1263 | 1250 | ||
1264 | mylcd_update (); | 1251 | mylcd_update (); |
@@ -1301,7 +1288,6 @@ static void draw_next_block (void) | |||
1301 | for (i = 0; i < 4; i++) { | 1288 | for (i = 0; i < 4; i++) { |
1302 | rx = getRelativeX (rockblox_status.nf, i, 0) + 2; | 1289 | rx = getRelativeX (rockblox_status.nf, i, 0) + 2; |
1303 | ry = getRelativeY (rockblox_status.nf, i, 0) + 2; | 1290 | ry = getRelativeY (rockblox_status.nf, i, 0) + 2; |
1304 | #ifdef HAVE_LCD_BITMAP | ||
1305 | #if LCD_DEPTH >= 2 | 1291 | #if LCD_DEPTH >= 2 |
1306 | rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */ | 1292 | rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */ |
1307 | #endif | 1293 | #endif |
@@ -1326,7 +1312,6 @@ static void draw_next_block (void) | |||
1326 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, | 1312 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, |
1327 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, | 1313 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, |
1328 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); | 1314 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); |
1329 | #endif | ||
1330 | } | 1315 | } |
1331 | 1316 | ||
1332 | } | 1317 | } |
@@ -1428,18 +1413,14 @@ static bool rockblox_help(void) | |||
1428 | LAST_STYLE_ITEM | 1413 | LAST_STYLE_ITEM |
1429 | }; | 1414 | }; |
1430 | 1415 | ||
1431 | #ifdef HAVE_LCD_BITMAP | ||
1432 | rb->lcd_setfont(FONT_UI); | 1416 | rb->lcd_setfont(FONT_UI); |
1433 | #endif | ||
1434 | #ifdef HAVE_LCD_COLOR | 1417 | #ifdef HAVE_LCD_COLOR |
1435 | rb->lcd_set_background(LCD_BLACK); | 1418 | rb->lcd_set_background(LCD_BLACK); |
1436 | rb->lcd_set_foreground(LCD_WHITE); | 1419 | rb->lcd_set_foreground(LCD_WHITE); |
1437 | #endif | 1420 | #endif |
1438 | if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true)) | 1421 | if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true)) |
1439 | return true; | 1422 | return true; |
1440 | #ifdef HAVE_LCD_BITMAP | ||
1441 | rb->lcd_setfont(FONT_SYSFIXED); | 1423 | rb->lcd_setfont(FONT_SYSFIXED); |
1442 | #endif | ||
1443 | 1424 | ||
1444 | return false; | 1425 | return false; |
1445 | } | 1426 | } |
@@ -1699,15 +1680,7 @@ enum plugin_status plugin_start (const void *parameter) | |||
1699 | rb->lcd_set_backdrop(NULL); | 1680 | rb->lcd_set_backdrop(NULL); |
1700 | #endif | 1681 | #endif |
1701 | 1682 | ||
1702 | #ifdef HAVE_LCD_BITMAP | ||
1703 | rb->lcd_setfont (FONT_SYSFIXED); | 1683 | rb->lcd_setfont (FONT_SYSFIXED); |
1704 | #else | ||
1705 | if (!pgfx_init(4, 2)) | ||
1706 | { | ||
1707 | rb->splash(HZ*2, "Old LCD :("); | ||
1708 | return PLUGIN_OK; | ||
1709 | } | ||
1710 | #endif | ||
1711 | 1684 | ||
1712 | /* Turn off backlight timeout */ | 1685 | /* Turn off backlight timeout */ |
1713 | backlight_ignore_timeout(); | 1686 | 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){ | |||
125 | fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666); | 125 | fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666); |
126 | 126 | ||
127 | if (fdw < 0) { | 127 | if (fdw < 0) { |
128 | #ifdef HAVE_LCD_BITMAP | ||
129 | rb->splash(HZ, "Failed to create result file!"); | 128 | rb->splash(HZ, "Failed to create result file!"); |
130 | #else | ||
131 | rb->splash(HZ, "File creation failed"); | ||
132 | #endif | ||
133 | rb->close(fd); | 129 | rb->close(fd); |
134 | return false; | 130 | return false; |
135 | } | 131 | } |
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 @@ | |||
25 | #include <autoconf.h> | 25 | #include <autoconf.h> |
26 | 26 | ||
27 | extern int w, h, y; | 27 | extern int w, h, y; |
28 | #ifdef HAVE_LCD_BITMAP | ||
29 | #define PUTS(str) do { \ | 28 | #define PUTS(str) do { \ |
30 | rb->lcd_putsxy(1, y, str); \ | 29 | rb->lcd_putsxy(1, y, str); \ |
31 | rb->lcd_getstringsize(str, &w, &h); \ | 30 | rb->lcd_getstringsize(str, &w, &h); \ |
32 | y += h + 1; \ | 31 | y += h + 1; \ |
33 | } while (0); \ | 32 | } while (0); \ |
34 | rb->lcd_update() | 33 | rb->lcd_update() |
35 | #else | ||
36 | #define PUTS(str) do { \ | ||
37 | rb->lcd_puts(0, y, str); \ | ||
38 | y = (y + 1) % 2; \ | ||
39 | } while (0); \ | ||
40 | rb->lcd_update() | ||
41 | #endif | ||
42 | 34 | ||
43 | void *my_malloc(size_t size); | 35 | void *my_malloc(size_t size); |
44 | void setmallocpos(void *pointer); | 36 | 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) | |||
223 | return PLUGIN_OK; | 223 | return PLUGIN_OK; |
224 | } | 224 | } |
225 | 225 | ||
226 | #ifdef HAVE_LCD_BITMAP | ||
227 | FOR_NB_SCREENS(i) | 226 | FOR_NB_SCREENS(i) |
228 | rb->viewportmanager_theme_enable(i, true, NULL); | 227 | rb->viewportmanager_theme_enable(i, true, NULL); |
229 | #endif | ||
230 | 228 | ||
231 | do { | 229 | do { |
232 | /* Display a menu to choose between the entries */ | 230 | /* Display a menu to choose between the entries */ |
233 | leave_loop = list_sc(); | 231 | leave_loop = list_sc(); |
234 | } while (!leave_loop); | 232 | } while (!leave_loop); |
235 | 233 | ||
236 | #ifdef HAVE_LCD_BITMAP | ||
237 | FOR_NB_SCREENS(i) | 234 | FOR_NB_SCREENS(i) |
238 | rb->viewportmanager_theme_undo(i, false); | 235 | rb->viewportmanager_theme_undo(i, false); |
239 | #endif | ||
240 | 236 | ||
241 | return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK; | 237 | return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK; |
242 | } | 238 | } |
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 @@ | |||
22 | #include "lib/mylcd.h" | 22 | #include "lib/mylcd.h" |
23 | #include "lib/pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
24 | 24 | ||
25 | #ifdef HAVE_LCD_BITMAP | ||
26 | #define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) | 25 | #define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) |
27 | #define SNOW_HEIGHT LCD_HEIGHT | 26 | #define SNOW_HEIGHT LCD_HEIGHT |
28 | #define SNOW_WIDTH LCD_WIDTH | 27 | #define SNOW_WIDTH LCD_WIDTH |
29 | #else | ||
30 | #define NUM_PARTICLES 10 | ||
31 | #define SNOW_HEIGHT 14 | ||
32 | #define SNOW_WIDTH 20 | ||
33 | #endif | ||
34 | 28 | ||
35 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | 29 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; |
36 | 30 | ||
@@ -40,7 +34,6 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | |||
40 | 34 | ||
41 | static short particles[NUM_PARTICLES][2]; | 35 | static short particles[NUM_PARTICLES][2]; |
42 | 36 | ||
43 | #ifdef HAVE_LCD_BITMAP | ||
44 | #if LCD_WIDTH >= 160 | 37 | #if LCD_WIDTH >= 160 |
45 | #define FLAKE_WIDTH 5 | 38 | #define FLAKE_WIDTH 5 |
46 | static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; | 39 | static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; |
@@ -48,7 +41,6 @@ static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; | |||
48 | #define FLAKE_WIDTH 3 | 41 | #define FLAKE_WIDTH 3 |
49 | static const unsigned char flake[] = {0x02,0x07,0x02}; | 42 | static const unsigned char flake[] = {0x02,0x07,0x02}; |
50 | #endif | 43 | #endif |
51 | #endif | ||
52 | 44 | ||
53 | static bool particle_exists(int particle) | 45 | static bool particle_exists(int particle) |
54 | { | 46 | { |
@@ -83,12 +75,8 @@ static void snow_move(void) | |||
83 | for (i=0; i<NUM_PARTICLES; i++) { | 75 | for (i=0; i<NUM_PARTICLES; i++) { |
84 | if (particle_exists(i)) { | 76 | if (particle_exists(i)) { |
85 | mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 77 | mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
86 | #ifdef HAVE_LCD_BITMAP | ||
87 | rb->lcd_fillrect(particles[i][0],particles[i][1], | 78 | rb->lcd_fillrect(particles[i][0],particles[i][1], |
88 | FLAKE_WIDTH,FLAKE_WIDTH); | 79 | FLAKE_WIDTH,FLAKE_WIDTH); |
89 | #else | ||
90 | pgfx_drawpixel(particles[i][0],particles[i][1]); | ||
91 | #endif | ||
92 | mylcd_set_drawmode(DRMODE_SOLID); | 80 | mylcd_set_drawmode(DRMODE_SOLID); |
93 | #ifdef HAVE_REMOTE_LCD | 81 | #ifdef HAVE_REMOTE_LCD |
94 | if (particles[i][0] <= LCD_REMOTE_WIDTH | 82 | if (particles[i][0] <= LCD_REMOTE_WIDTH |
@@ -116,12 +104,8 @@ static void snow_move(void) | |||
116 | break; | 104 | break; |
117 | } | 105 | } |
118 | if (particle_exists(i)) | 106 | if (particle_exists(i)) |
119 | #ifdef HAVE_LCD_BITMAP | ||
120 | rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], | 107 | rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], |
121 | FLAKE_WIDTH,FLAKE_WIDTH); | 108 | FLAKE_WIDTH,FLAKE_WIDTH); |
122 | #else | ||
123 | pgfx_drawpixel(particles[i][0],particles[i][1]); | ||
124 | #endif | ||
125 | #ifdef HAVE_REMOTE_LCD | 109 | #ifdef HAVE_REMOTE_LCD |
126 | if (particles[i][0] <= LCD_REMOTE_WIDTH | 110 | if (particles[i][0] <= LCD_REMOTE_WIDTH |
127 | && particles[i][1] <= LCD_REMOTE_HEIGHT) { | 111 | && 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) | |||
56 | rb->lcd_remote_clear_display(); | 56 | rb->lcd_remote_clear_display(); |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #ifdef HAVE_LCD_BITMAP | ||
60 | rb->snprintf(buf, sizeof(buf), "Total Files: %d", files); | 59 | rb->snprintf(buf, sizeof(buf), "Total Files: %d", files); |
61 | prn(buf,0); | 60 | prn(buf,0); |
62 | rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles); | 61 | rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles); |
@@ -71,12 +70,6 @@ static void update_screen(void) | |||
71 | prn(buf,5); | 70 | prn(buf,5); |
72 | rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir); | 71 | rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir); |
73 | prn(buf,6); | 72 | prn(buf,6); |
74 | #else | ||
75 | rb->snprintf(buf, sizeof(buf), "Files:%5d", files); | ||
76 | prn(buf,0); | ||
77 | rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs); | ||
78 | prn(buf,1); | ||
79 | #endif | ||
80 | 73 | ||
81 | rb->lcd_update(); | 74 | rb->lcd_update(); |
82 | #ifdef HAVE_REMOTE_LCD | 75 | #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 @@ | |||
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | #define TIMER_Y 1 | 26 | #define TIMER_Y 1 |
28 | #else | ||
29 | #define TIMER_Y 0 | ||
30 | #endif | ||
31 | 27 | ||
32 | #define LAP_Y TIMER_Y+1 | 28 | #define LAP_Y TIMER_Y+1 |
33 | #define MAX_LAPS 64 | 29 | #define MAX_LAPS 64 |
@@ -481,14 +477,10 @@ enum plugin_status plugin_start(const void* parameter) | |||
481 | 477 | ||
482 | (void)parameter; | 478 | (void)parameter; |
483 | 479 | ||
484 | #ifdef HAVE_LCD_BITMAP | ||
485 | int h; | 480 | int h; |
486 | rb->lcd_setfont(FONT_UI); | 481 | rb->lcd_setfont(FONT_UI); |
487 | rb->lcd_getstringsize("M", NULL, &h); | 482 | rb->lcd_getstringsize("M", NULL, &h); |
488 | lines = (LCD_HEIGHT / h) - (LAP_Y); | 483 | lines = (LCD_HEIGHT / h) - (LAP_Y); |
489 | #else | ||
490 | lines = 1; | ||
491 | #endif | ||
492 | 484 | ||
493 | load_stopwatch(); | 485 | load_stopwatch(); |
494 | 486 | ||
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) | |||
206 | #endif | 206 | #endif |
207 | int count = 0; | 207 | int count = 0; |
208 | 208 | ||
209 | #ifdef HAVE_LCD_BITMAP | ||
210 | rb->lcd_setfont(FONT_SYSFIXED); | 209 | rb->lcd_setfont(FONT_SYSFIXED); |
211 | #endif | 210 | |
212 | |||
213 | rb->screens[0]->clear_display(); | 211 | rb->screens[0]->clear_display(); |
214 | TEST_MEM_PRINTF("patience, may take some seconds..."); | 212 | TEST_MEM_PRINTF("patience, may take some seconds..."); |
215 | rb->screens[0]->update(); | 213 | 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 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | 23 | ||
24 | |||
25 | |||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | |||
28 | #ifdef HAVE_LCD_COLOR | 24 | #ifdef HAVE_LCD_COLOR |
29 | #define BGCOLOR_1 LCD_RGBPACK(255,255,0) | 25 | #define BGCOLOR_1 LCD_RGBPACK(255,255,0) |
30 | #define BGCOLOR_2 LCD_RGBPACK(0,255,0) | 26 | #define BGCOLOR_2 LCD_RGBPACK(0,255,0) |
@@ -207,61 +203,3 @@ enum plugin_status plugin_start(const void* parameter) | |||
207 | 203 | ||
208 | return PLUGIN_OK; | 204 | return PLUGIN_OK; |
209 | } | 205 | } |
210 | |||
211 | |||
212 | #else | ||
213 | |||
214 | /* Charcell version of plugin */ | ||
215 | |||
216 | static struct viewport vp0 = | ||
217 | { | ||
218 | .x = 0, | ||
219 | .y = 0, | ||
220 | .width = 5, | ||
221 | .height = 1, | ||
222 | }; | ||
223 | |||
224 | static struct viewport vp1 = | ||
225 | { | ||
226 | .x = 6, | ||
227 | .y = 0, | ||
228 | .width = 5, | ||
229 | .height = 1, | ||
230 | }; | ||
231 | |||
232 | static struct viewport vp2 = | ||
233 | { | ||
234 | .x = 0, | ||
235 | .y = 1, | ||
236 | .width = LCD_WIDTH, | ||
237 | .height = 1, | ||
238 | }; | ||
239 | |||
240 | |||
241 | enum plugin_status plugin_start(const void* parameter) | ||
242 | { | ||
243 | (void)parameter; | ||
244 | |||
245 | rb->screens[SCREEN_MAIN]->set_viewport(&vp0); | ||
246 | rb->screens[SCREEN_MAIN]->clear_viewport(); | ||
247 | rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Rockbox"); | ||
248 | |||
249 | rb->screens[SCREEN_MAIN]->set_viewport(&vp1); | ||
250 | rb->screens[SCREEN_MAIN]->clear_viewport(); | ||
251 | rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Viewports"); | ||
252 | |||
253 | rb->screens[SCREEN_MAIN]->set_viewport(&vp2); | ||
254 | rb->screens[SCREEN_MAIN]->clear_viewport(); | ||
255 | rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Demonstration"); | ||
256 | |||
257 | rb->screens[SCREEN_MAIN]->update(); | ||
258 | |||
259 | rb->button_get(true); | ||
260 | |||
261 | /* Restore the default viewport */ | ||
262 | rb->screens[SCREEN_MAIN]->set_viewport(NULL); | ||
263 | |||
264 | return PLUGIN_OK; | ||
265 | } | ||
266 | |||
267 | #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) | |||
61 | 61 | ||
62 | atexit(tv_exit); | 62 | atexit(tv_exit); |
63 | while (!done) { | 63 | while (!done) { |
64 | #ifdef HAVE_LCD_BITMAP | ||
65 | if (preferences->statusbar) | 64 | if (preferences->statusbar) |
66 | rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL); | 65 | rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL); |
67 | #endif | ||
68 | 66 | ||
69 | if (display_update) | 67 | if (display_update) |
70 | tv_draw(); | 68 | 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) | |||
100 | (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) | 100 | (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) |
101 | { | 101 | { |
102 | offset_page--; | 102 | offset_page--; |
103 | #ifdef HAVE_LCD_BITMAP | ||
104 | offset_line = (preferences->overlap_page_mode)? 1:0; | 103 | offset_line = (preferences->overlap_page_mode)? 1:0; |
105 | #endif | ||
106 | } | 104 | } |
107 | tv_move_screen(offset_page, offset_line, SEEK_CUR); | 105 | tv_move_screen(offset_page, offset_line, SEEK_CUR); |
108 | scrolled = true; | 106 | scrolled = true; |
@@ -117,9 +115,7 @@ void tv_scroll_down(unsigned mode) | |||
117 | (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) | 115 | (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) |
118 | { | 116 | { |
119 | offset_page++; | 117 | offset_page++; |
120 | #ifdef HAVE_LCD_BITMAP | ||
121 | offset_line = (preferences->overlap_page_mode)? -1:0; | 118 | offset_line = (preferences->overlap_page_mode)? -1:0; |
122 | #endif | ||
123 | } | 119 | } |
124 | tv_move_screen(offset_page, offset_line, SEEK_CUR); | 120 | tv_move_screen(offset_page, offset_line, SEEK_CUR); |
125 | scrolled = true; | 121 | 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, | |||
182 | (void)data; | 182 | (void)data; |
183 | struct tv_bookmark_info *bookmark = &bookmarks[selected]; | 183 | struct tv_bookmark_info *bookmark = &bookmarks[selected]; |
184 | rb->snprintf(buffer, buffer_len, | 184 | rb->snprintf(buffer, buffer_len, |
185 | #ifdef HAVE_LCD_BITMAP | ||
186 | "%cPage: %d Line: %d", | 185 | "%cPage: %d Line: %d", |
187 | #else | ||
188 | "%cP:%d L:%d", | ||
189 | #endif | ||
190 | (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ', | 186 | (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ', |
191 | bookmark->pos.page + 1, bookmark->pos.line + 1); | 187 | bookmark->pos.page + 1, bookmark->pos.line + 1); |
192 | return buffer; | 188 | 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 @@ | |||
25 | /* | 25 | /* |
26 | * display layout | 26 | * display layout |
27 | * | 27 | * |
28 | * when is defined HAVE_LCD_BITMAP | ||
29 | * +-------------------------+ | 28 | * +-------------------------+ |
30 | * |statusbar (1) | | 29 | * |statusbar (1) | |
31 | * +-------------------------+ | 30 | * +-------------------------+ |
@@ -56,14 +55,6 @@ | |||
56 | * (5) displays when preferences->footer_mode is FT_PAGE. | 55 | * (5) displays when preferences->footer_mode is FT_PAGE. |
57 | * (6) displays when rb->global_settings->statusbar == STATUSBAR_BOTTOM. | 56 | * (6) displays when rb->global_settings->statusbar == STATUSBAR_BOTTOM. |
58 | * | 57 | * |
59 | * | ||
60 | * when isn't defined HAVE_LCD_BITMAP | ||
61 | * +---+---------------------+ | ||
62 | * | | | | ||
63 | * |(7)| draw area | | ||
64 | * | | | | ||
65 | * +---+---------------------+ | ||
66 | * (7) bookmark | ||
67 | */ | 58 | */ |
68 | 59 | ||
69 | #define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width | 60 | #define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width |
@@ -83,14 +74,10 @@ static bool is_initialized_vp = false; | |||
83 | static struct screen* display; | 74 | static struct screen* display; |
84 | 75 | ||
85 | /* layout */ | 76 | /* layout */ |
86 | #ifdef HAVE_LCD_BITMAP | ||
87 | static struct tv_rect header; | 77 | static struct tv_rect header; |
88 | static struct tv_rect footer; | 78 | static struct tv_rect footer; |
89 | static struct tv_rect horizontal_scrollbar; | 79 | static struct tv_rect horizontal_scrollbar; |
90 | static struct tv_rect vertical_scrollbar; | 80 | static struct tv_rect vertical_scrollbar; |
91 | #else | ||
92 | static struct tv_rect bookmark; | ||
93 | #endif | ||
94 | 81 | ||
95 | static bool show_horizontal_scrollbar; | 82 | static bool show_horizontal_scrollbar; |
96 | static bool show_vertical_scrollbar; | 83 | static bool show_vertical_scrollbar; |
@@ -103,8 +90,6 @@ static int row_height = 1; | |||
103 | 90 | ||
104 | static int totalsize; | 91 | static int totalsize; |
105 | 92 | ||
106 | #ifdef HAVE_LCD_BITMAP | ||
107 | |||
108 | static void tv_show_header(void) | 93 | static void tv_show_header(void) |
109 | { | 94 | { |
110 | if (preferences->header_mode) | 95 | if (preferences->header_mode) |
@@ -156,8 +141,6 @@ static void tv_show_scrollbar(int window, int col, off_t cur_pos, int size) | |||
156 | } | 141 | } |
157 | } | 142 | } |
158 | 143 | ||
159 | #endif | ||
160 | |||
161 | void tv_init_scrollbar(off_t total, bool show_scrollbar) | 144 | void tv_init_scrollbar(off_t total, bool show_scrollbar) |
162 | { | 145 | { |
163 | totalsize = total; | 146 | totalsize = total; |
@@ -167,38 +150,23 @@ void tv_init_scrollbar(off_t total, bool show_scrollbar) | |||
167 | 150 | ||
168 | void tv_show_bookmarks(const int *rows, int count) | 151 | void tv_show_bookmarks(const int *rows, int count) |
169 | { | 152 | { |
170 | #ifdef HAVE_LCD_BITMAP | ||
171 | display->set_viewport(&vp_text); | 153 | display->set_viewport(&vp_text); |
172 | display->set_drawmode(DRMODE_COMPLEMENT); | 154 | display->set_drawmode(DRMODE_COMPLEMENT); |
173 | #endif | ||
174 | 155 | ||
175 | while (count--) | 156 | while (count--) |
176 | { | 157 | { |
177 | #ifdef HAVE_LCD_BITMAP | ||
178 | display->fillrect(0, rows[count] * row_height, | 158 | display->fillrect(0, rows[count] * row_height, |
179 | vp_text.width, row_height); | 159 | vp_text.width, row_height); |
180 | #else | ||
181 | display->putchar(bookmark.x, bookmark.y + rows[count], TV_BOOKMARK_ICON); | ||
182 | #endif | ||
183 | } | 160 | } |
184 | #ifdef HAVE_LCD_BITMAP | ||
185 | display->set_drawmode(DRMODE_SOLID); | 161 | display->set_drawmode(DRMODE_SOLID); |
186 | display->set_viewport(&vp_info); | 162 | display->set_viewport(&vp_info); |
187 | #endif | ||
188 | } | 163 | } |
189 | 164 | ||
190 | void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size) | 165 | void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size) |
191 | { | 166 | { |
192 | #ifdef HAVE_LCD_BITMAP | ||
193 | tv_show_scrollbar(window, col, pos->file_pos, size); | 167 | tv_show_scrollbar(window, col, pos->file_pos, size); |
194 | tv_show_header(); | 168 | tv_show_header(); |
195 | tv_show_footer(pos); | 169 | tv_show_footer(pos); |
196 | #else | ||
197 | (void)window; | ||
198 | (void)col; | ||
199 | (void)pos; | ||
200 | (void)size; | ||
201 | #endif | ||
202 | } | 170 | } |
203 | 171 | ||
204 | void tv_draw_text(int row, const unsigned char *text, int offset) | 172 | 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) | |||
217 | 185 | ||
218 | display->set_viewport(&vp_text); | 186 | display->set_viewport(&vp_text); |
219 | tv_night_mode(); | 187 | tv_night_mode(); |
220 | #ifdef HAVE_LCD_BITMAP | ||
221 | display->putsxy(xpos, row * row_height, text); | 188 | display->putsxy(xpos, row * row_height, text); |
222 | #else | ||
223 | display->puts(xpos, row, text); | ||
224 | #endif | ||
225 | display->set_viewport(&vp_info); | 189 | display->set_viewport(&vp_info); |
226 | } | 190 | } |
227 | 191 | ||
@@ -229,9 +193,7 @@ void tv_start_display(void) | |||
229 | { | 193 | { |
230 | display->set_viewport(&vp_info); | 194 | display->set_viewport(&vp_info); |
231 | tv_night_mode(); | 195 | tv_night_mode(); |
232 | #ifdef HAVE_LCD_BITMAP | ||
233 | display->set_drawmode(DRMODE_SOLID); | 196 | display->set_drawmode(DRMODE_SOLID); |
234 | #endif | ||
235 | 197 | ||
236 | #if LCD_DEPTH > 1 | 198 | #if LCD_DEPTH > 1 |
237 | rb->lcd_set_backdrop(NULL); | 199 | rb->lcd_set_backdrop(NULL); |
@@ -248,7 +210,6 @@ void tv_end_display(void) | |||
248 | 210 | ||
249 | void tv_set_layout(bool show_scrollbar) | 211 | void tv_set_layout(bool show_scrollbar) |
250 | { | 212 | { |
251 | #ifdef HAVE_LCD_BITMAP | ||
252 | int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)? | 213 | int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)? |
253 | TV_SCROLLBAR_WIDTH + 1 : 0; | 214 | TV_SCROLLBAR_WIDTH + 1 : 0; |
254 | int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)? | 215 | int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)? |
@@ -282,20 +243,6 @@ void tv_set_layout(bool show_scrollbar) | |||
282 | vp_text.y += vertical_scrollbar.y; | 243 | vp_text.y += vertical_scrollbar.y; |
283 | vp_text.width = horizontal_scrollbar.w; | 244 | vp_text.width = horizontal_scrollbar.w; |
284 | vp_text.height = vertical_scrollbar.h; | 245 | vp_text.height = vertical_scrollbar.h; |
285 | #else | ||
286 | (void) show_scrollbar; | ||
287 | |||
288 | row_height = 1; | ||
289 | |||
290 | bookmark.x = 0; | ||
291 | bookmark.y = 0; | ||
292 | bookmark.w = 1; | ||
293 | bookmark.h = vp_info.height; | ||
294 | |||
295 | vp_text = vp_info; | ||
296 | vp_text.x += 1; | ||
297 | vp_text.width -= 1; | ||
298 | #endif | ||
299 | 246 | ||
300 | display_columns = vp_text.width / col_width; | 247 | display_columns = vp_text.width / col_width; |
301 | display_rows = vp_text.height / row_height; | 248 | display_rows = vp_text.height / row_height; |
@@ -310,7 +257,6 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows) | |||
310 | 257 | ||
311 | static void tv_change_viewport(void) | 258 | static void tv_change_viewport(void) |
312 | { | 259 | { |
313 | #ifdef HAVE_LCD_BITMAP | ||
314 | bool show_statusbar = preferences->statusbar; | 260 | bool show_statusbar = preferences->statusbar; |
315 | 261 | ||
316 | if (is_initialized_vp) | 262 | if (is_initialized_vp) |
@@ -321,16 +267,8 @@ static void tv_change_viewport(void) | |||
321 | rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info); | 267 | rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info); |
322 | vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK; | 268 | vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK; |
323 | display->set_viewport(&vp_info); | 269 | display->set_viewport(&vp_info); |
324 | #else | ||
325 | if (!is_initialized_vp) | ||
326 | { | ||
327 | rb->viewport_set_defaults(&vp_info, SCREEN_MAIN); | ||
328 | is_initialized_vp = true; | ||
329 | } | ||
330 | #endif | ||
331 | } | 270 | } |
332 | 271 | ||
333 | #ifdef HAVE_LCD_BITMAP | ||
334 | static bool tv_set_font(const unsigned char *font) | 272 | static bool tv_set_font(const unsigned char *font) |
335 | { | 273 | { |
336 | unsigned char path[MAX_PATH]; | 274 | unsigned char path[MAX_PATH]; |
@@ -350,11 +288,9 @@ static bool tv_set_font(const unsigned char *font) | |||
350 | vp_text.font = preferences->font_id; | 288 | vp_text.font = preferences->font_id; |
351 | return true; | 289 | return true; |
352 | } | 290 | } |
353 | #endif | ||
354 | 291 | ||
355 | static int tv_change_preferences(const struct tv_preferences *oldp) | 292 | static int tv_change_preferences(const struct tv_preferences *oldp) |
356 | { | 293 | { |
357 | #ifdef HAVE_LCD_BITMAP | ||
358 | static bool font_changing = false; | 294 | static bool font_changing = false; |
359 | const unsigned char *font_str; | 295 | const unsigned char *font_str; |
360 | struct tv_preferences new_prefs; | 296 | struct tv_preferences new_prefs; |
@@ -382,9 +318,6 @@ static int tv_change_preferences(const struct tv_preferences *oldp) | |||
382 | col_width = 2 * rb->font_get_width(rb->font_get(preferences->font_id), ' '); | 318 | col_width = 2 * rb->font_get_width(rb->font_get(preferences->font_id), ' '); |
383 | font_changing = false; | 319 | font_changing = false; |
384 | } | 320 | } |
385 | #else | ||
386 | (void)oldp; | ||
387 | #endif | ||
388 | tv_change_viewport(); | 321 | tv_change_viewport(); |
389 | return TV_CALLBACK_OK; | 322 | return TV_CALLBACK_OK; |
390 | } | 323 | } |
@@ -419,7 +352,6 @@ void tv_night_mode(void) | |||
419 | 352 | ||
420 | void tv_finalize_display(void) | 353 | void tv_finalize_display(void) |
421 | { | 354 | { |
422 | #ifdef HAVE_LCD_BITMAP | ||
423 | /* restore font */ | 355 | /* restore font */ |
424 | if (preferences->font_id >= 0 && | 356 | if (preferences->font_id >= 0 && |
425 | (preferences->font_id != rb->global_status->font_id[SCREEN_MAIN])) | 357 | (preferences->font_id != rb->global_status->font_id[SCREEN_MAIN])) |
@@ -430,14 +362,9 @@ void tv_finalize_display(void) | |||
430 | /* undo viewport */ | 362 | /* undo viewport */ |
431 | if (is_initialized_vp) | 363 | if (is_initialized_vp) |
432 | rb->viewportmanager_theme_undo(SCREEN_MAIN, false); | 364 | rb->viewportmanager_theme_undo(SCREEN_MAIN, false); |
433 | #endif | ||
434 | } | 365 | } |
435 | 366 | ||
436 | bool tv_exist_scrollbar(void) | 367 | bool tv_exist_scrollbar(void) |
437 | { | 368 | { |
438 | #ifdef HAVE_LCD_BITMAP | ||
439 | return true; | 369 | return true; |
440 | #else | ||
441 | return false; | ||
442 | #endif | ||
443 | } | 370 | } |
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; | |||
34 | /* horizontal scroll settings menu */ | 34 | /* horizontal scroll settings menu */ |
35 | /* */ | 35 | /* */ |
36 | 36 | ||
37 | #ifdef HAVE_LCD_BITMAP | ||
38 | static bool tv_horizontal_scrollbar_setting(void) | 37 | static bool tv_horizontal_scrollbar_setting(void) |
39 | { | 38 | { |
40 | return rb->set_bool("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar); | 39 | return rb->set_bool("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar); |
41 | } | 40 | } |
42 | #endif | ||
43 | 41 | ||
44 | static bool tv_horizontal_scroll_mode_setting(void) | 42 | static bool tv_horizontal_scroll_mode_setting(void) |
45 | { | 43 | { |
@@ -52,30 +50,24 @@ static bool tv_horizontal_scroll_mode_setting(void) | |||
52 | names, 2, NULL); | 50 | names, 2, NULL); |
53 | } | 51 | } |
54 | 52 | ||
55 | #ifdef HAVE_LCD_BITMAP | ||
56 | MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Scrollbar", | 53 | MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Scrollbar", |
57 | tv_horizontal_scrollbar_setting, | 54 | tv_horizontal_scrollbar_setting, |
58 | NULL, NULL, Icon_NOICON); | 55 | NULL, NULL, Icon_NOICON); |
59 | #endif | ||
60 | MENUITEM_FUNCTION(horizontal_scroll_mode_item, 0, "Scroll Mode", | 56 | MENUITEM_FUNCTION(horizontal_scroll_mode_item, 0, "Scroll Mode", |
61 | tv_horizontal_scroll_mode_setting, NULL, NULL, Icon_NOICON); | 57 | tv_horizontal_scroll_mode_setting, NULL, NULL, Icon_NOICON); |
62 | 58 | ||
63 | MAKE_MENU(horizontal_scroll_menu, "Horizontal", NULL, Icon_NOICON, | 59 | MAKE_MENU(horizontal_scroll_menu, "Horizontal", NULL, Icon_NOICON, |
64 | #ifdef HAVE_LCD_BITMAP | ||
65 | &horizontal_scrollbar_item, | 60 | &horizontal_scrollbar_item, |
66 | #endif | ||
67 | &horizontal_scroll_mode_item); | 61 | &horizontal_scroll_mode_item); |
68 | 62 | ||
69 | /* */ | 63 | /* */ |
70 | /* vertical scroll settings menu */ | 64 | /* vertical scroll settings menu */ |
71 | /* */ | 65 | /* */ |
72 | 66 | ||
73 | #ifdef HAVE_LCD_BITMAP | ||
74 | static bool tv_vertical_scrollbar_setting(void) | 67 | static bool tv_vertical_scrollbar_setting(void) |
75 | { | 68 | { |
76 | return rb->set_bool("Vertical Scrollbar", &new_prefs.vertical_scrollbar); | 69 | return rb->set_bool("Vertical Scrollbar", &new_prefs.vertical_scrollbar); |
77 | } | 70 | } |
78 | #endif | ||
79 | 71 | ||
80 | static bool tv_vertical_scroll_mode_setting(void) | 72 | static bool tv_vertical_scroll_mode_setting(void) |
81 | { | 73 | { |
@@ -110,11 +102,9 @@ static bool tv_narrow_mode_setting(void) | |||
110 | names, 2, NULL); | 102 | names, 2, NULL); |
111 | } | 103 | } |
112 | 104 | ||
113 | #ifdef HAVE_LCD_BITMAP | ||
114 | MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Scrollbar", | 105 | MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Scrollbar", |
115 | tv_vertical_scrollbar_setting, | 106 | tv_vertical_scrollbar_setting, |
116 | NULL, NULL, Icon_NOICON); | 107 | NULL, NULL, Icon_NOICON); |
117 | #endif | ||
118 | MENUITEM_FUNCTION(vertical_scroll_mode_item, 0, "Scroll Mode", | 108 | MENUITEM_FUNCTION(vertical_scroll_mode_item, 0, "Scroll Mode", |
119 | tv_vertical_scroll_mode_setting, NULL, NULL, Icon_NOICON); | 109 | tv_vertical_scroll_mode_setting, NULL, NULL, Icon_NOICON); |
120 | MENUITEM_FUNCTION(overlap_page_mode_item, 0, "Overlap Pages", tv_overlap_page_mode_setting, | 110 | 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)", | |||
125 | tv_narrow_mode_setting, NULL, NULL, Icon_NOICON); | 115 | tv_narrow_mode_setting, NULL, NULL, Icon_NOICON); |
126 | 116 | ||
127 | MAKE_MENU(vertical_scroll_menu, "Vertical", NULL, Icon_NOICON, | 117 | MAKE_MENU(vertical_scroll_menu, "Vertical", NULL, Icon_NOICON, |
128 | #ifdef HAVE_LCD_BITMAP | ||
129 | &vertical_scrollbar_item, | 118 | &vertical_scrollbar_item, |
130 | #endif | ||
131 | &vertical_scroll_mode_item, &overlap_page_mode_item, &autoscroll_speed_item, | 119 | &vertical_scroll_mode_item, &overlap_page_mode_item, &autoscroll_speed_item, |
132 | &narrow_mode_item); | 120 | &narrow_mode_item); |
133 | 121 | ||
@@ -198,7 +186,6 @@ static bool tv_alignment_setting(void) | |||
198 | names , 2, NULL); | 186 | names , 2, NULL); |
199 | } | 187 | } |
200 | 188 | ||
201 | #ifdef HAVE_LCD_BITMAP | ||
202 | static bool tv_header_setting(void) | 189 | static bool tv_header_setting(void) |
203 | { | 190 | { |
204 | return rb->set_bool("Show Header", &new_prefs.header_mode); | 191 | return rb->set_bool("Show Header", &new_prefs.header_mode); |
@@ -239,7 +226,6 @@ static bool tv_font_setting(void) | |||
239 | 226 | ||
240 | return false; | 227 | return false; |
241 | } | 228 | } |
242 | #endif | ||
243 | 229 | ||
244 | static bool tv_indent_spaces_setting(void) | 230 | static bool tv_indent_spaces_setting(void) |
245 | { | 231 | { |
@@ -264,7 +250,6 @@ MENUITEM_FUNCTION(windows_item, 0, "Screens Per Page", tv_windows_setting, | |||
264 | NULL, NULL, Icon_NOICON); | 250 | NULL, NULL, Icon_NOICON); |
265 | MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, | 251 | MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, |
266 | NULL, NULL, Icon_NOICON); | 252 | NULL, NULL, Icon_NOICON); |
267 | #ifdef HAVE_LCD_BITMAP | ||
268 | MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, | 253 | MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, |
269 | NULL, NULL, Icon_NOICON); | 254 | NULL, NULL, Icon_NOICON); |
270 | MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, | 255 | MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, |
@@ -273,7 +258,6 @@ MENUITEM_FUNCTION(statusbar_item, 0, "Show Statusbar", tv_statusbar_setting, | |||
273 | NULL, NULL, Icon_NOICON); | 258 | NULL, NULL, Icon_NOICON); |
274 | MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, | 259 | MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, |
275 | NULL, NULL, Icon_NOICON); | 260 | NULL, NULL, Icon_NOICON); |
276 | #endif | ||
277 | MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting, | 261 | MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting, |
278 | NULL, NULL, Icon_NOICON); | 262 | NULL, NULL, Icon_NOICON); |
279 | #ifdef HAVE_LCD_COLOR | 263 | #ifdef HAVE_LCD_COLOR |
@@ -284,9 +268,7 @@ MENUITEM_FUNCTION(night_mode_item, 0, "Night Mode", tv_night_mode_setting, | |||
284 | MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, | 268 | MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, |
285 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, | 269 | &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, |
286 | &alignment_item, | 270 | &alignment_item, |
287 | #ifdef HAVE_LCD_BITMAP | ||
288 | &header_item, &footer_item, &font_item, &statusbar_item, | 271 | &header_item, &footer_item, &font_item, &statusbar_item, |
289 | #endif | ||
290 | &scroll_menu, &indent_spaces_item | 272 | &scroll_menu, &indent_spaces_item |
291 | #ifdef HAVE_LCD_COLOR | 273 | #ifdef HAVE_LCD_COLOR |
292 | , &night_mode_item | 274 | , &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) | |||
59 | (oldp->vertical_scrollbar != preferences->vertical_scrollbar) || | 59 | (oldp->vertical_scrollbar != preferences->vertical_scrollbar) || |
60 | (oldp->encoding != preferences->encoding) || | 60 | (oldp->encoding != preferences->encoding) || |
61 | (oldp->indent_spaces != preferences->indent_spaces) || | 61 | (oldp->indent_spaces != preferences->indent_spaces) || |
62 | #ifdef HAVE_LCD_BITMAP | ||
63 | (oldp->header_mode != preferences->header_mode) || | 62 | (oldp->header_mode != preferences->header_mode) || |
64 | (oldp->footer_mode != preferences->footer_mode) || | 63 | (oldp->footer_mode != preferences->footer_mode) || |
65 | (oldp->statusbar != preferences->statusbar) || | 64 | (oldp->statusbar != preferences->statusbar) || |
66 | (rb->strcmp(oldp->font_name, preferences->font_name)) || | 65 | (rb->strcmp(oldp->font_name, preferences->font_name)) || |
67 | #endif | ||
68 | (rb->strcmp(oldp->file_name, preferences->file_name))) | 66 | (rb->strcmp(oldp->file_name, preferences->file_name))) |
69 | { | 67 | { |
70 | /* callback functions are called as FILO */ | 68 | /* callback functions are called as FILO */ |
@@ -110,17 +108,11 @@ void tv_set_default_preferences(struct tv_preferences *p) | |||
110 | p->overlap_page_mode = false; | 108 | p->overlap_page_mode = false; |
111 | p->horizontal_scrollbar = false; | 109 | p->horizontal_scrollbar = false; |
112 | p->vertical_scrollbar = false; | 110 | p->vertical_scrollbar = false; |
113 | #ifdef HAVE_LCD_BITMAP | ||
114 | p->header_mode = true; | 111 | p->header_mode = true; |
115 | p->footer_mode = true; | 112 | p->footer_mode = true; |
116 | p->statusbar = true; | 113 | p->statusbar = true; |
117 | rb->strlcpy(p->font_name, rb->global_settings->font_file, MAX_PATH); | 114 | rb->strlcpy(p->font_name, rb->global_settings->font_file, MAX_PATH); |
118 | p->font_id = rb->global_status->font_id[SCREEN_MAIN]; | 115 | p->font_id = rb->global_status->font_id[SCREEN_MAIN]; |
119 | #else | ||
120 | p->header_mode = false; | ||
121 | p->footer_mode = false; | ||
122 | p->statusbar = false; | ||
123 | #endif | ||
124 | p->autoscroll_speed = 10; | 116 | p->autoscroll_speed = 10; |
125 | p->night_mode = false; | 117 | p->night_mode = false; |
126 | p->narrow_mode = NM_PAGE; | 118 | p->narrow_mode = NM_PAGE; |
@@ -139,7 +131,5 @@ void tv_add_preferences_change_listner(int (*listner)(const struct tv_preference | |||
139 | void tv_change_fontid(int id) | 131 | void tv_change_fontid(int id) |
140 | { | 132 | { |
141 | (void)id; | 133 | (void)id; |
142 | #ifdef HAVE_LCD_BITMAP | ||
143 | prefs.font_id = id; | 134 | prefs.font_id = id; |
144 | #endif | ||
145 | } | 135 | } |
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 { | |||
95 | 95 | ||
96 | bool night_mode; | 96 | bool night_mode; |
97 | 97 | ||
98 | #ifdef HAVE_LCD_BITMAP | ||
99 | unsigned char font_name[MAX_PATH]; | 98 | unsigned char font_name[MAX_PATH]; |
100 | int font_id; | 99 | int font_id; |
101 | #endif | 100 | |
102 | unsigned char file_name[MAX_PATH]; | 101 | unsigned char file_name[MAX_PATH]; |
103 | }; | 102 | }; |
104 | 103 | ||
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 | |||
219 | if (version > 6) | 219 | if (version > 6) |
220 | prefs->night_mode = (*p++ != 0); | 220 | prefs->night_mode = (*p++ != 0); |
221 | 221 | ||
222 | #ifdef HAVE_LCD_BITMAP | ||
223 | rb->strlcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH); | 222 | rb->strlcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH); |
224 | 223 | ||
225 | prefs->font_id = rb->global_status->font_id[SCREEN_MAIN]; | 224 | prefs->font_id = rb->global_status->font_id[SCREEN_MAIN]; |
226 | #endif | ||
227 | 225 | ||
228 | return true; | 226 | return true; |
229 | } | 227 | } |
@@ -253,9 +251,7 @@ static void tv_serialize_preferences(unsigned char *buf, const struct tv_prefere | |||
253 | *p++ = prefs->statusbar; | 251 | *p++ = prefs->statusbar; |
254 | *p++ = prefs->night_mode; | 252 | *p++ = prefs->night_mode; |
255 | 253 | ||
256 | #ifdef HAVE_LCD_BITMAP | ||
257 | rb->strlcpy(buf + 28, prefs->font_name, MAX_PATH); | 254 | rb->strlcpy(buf + 28, prefs->font_name, MAX_PATH); |
258 | #endif | ||
259 | } | 255 | } |
260 | 256 | ||
261 | static bool tv_write_preferences(int pfd, const struct tv_preferences *prefs) | 257 | 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{ | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* the max characters of each blocks */ | 35 | /* the max characters of each blocks */ |
36 | #ifdef HAVE_LCD_BITMAP | ||
37 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) | 36 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) |
38 | #else | ||
39 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH + 1) | ||
40 | #endif | ||
41 | 37 | ||
42 | #define TV_MAX_BLOCKS 5 | 38 | #define TV_MAX_BLOCKS 5 |
43 | 39 | ||
@@ -90,15 +86,11 @@ static int tv_glyph_width(int ch) | |||
90 | if (ch == 0) | 86 | if (ch == 0) |
91 | ch = ' '; | 87 | ch = ' '; |
92 | 88 | ||
93 | #ifdef HAVE_LCD_BITMAP | ||
94 | /* the width of the diacritics charcter is 0 */ | 89 | /* the width of the diacritics charcter is 0 */ |
95 | if (rb->is_diacritic(ch, NULL)) | 90 | if (rb->is_diacritic(ch, NULL)) |
96 | return 0; | 91 | return 0; |
97 | 92 | ||
98 | return rb->font_get_width(rb->font_get(preferences->font_id), ch); | 93 | return rb->font_get_width(rb->font_get(preferences->font_id), ch); |
99 | #else | ||
100 | return 1; | ||
101 | #endif | ||
102 | } | 94 | } |
103 | 95 | ||
104 | static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) | 96 | 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) | |||
138 | if (preferences->encoding == UTF_8) | 130 | if (preferences->encoding == UTF_8) |
139 | return (unsigned char*)rb->utf8decode(str, ch); | 131 | return (unsigned char*)rb->utf8decode(str, ch); |
140 | 132 | ||
141 | #ifdef HAVE_LCD_BITMAP | ||
142 | if ((*str >= 0x80) && | 133 | if ((*str >= 0x80) && |
143 | ((preferences->encoding > SJIS) || | 134 | ((preferences->encoding > SJIS) || |
144 | (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) | 135 | (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) |
@@ -151,7 +142,7 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) | |||
151 | } | 142 | } |
152 | count = 2; | 143 | count = 2; |
153 | } | 144 | } |
154 | #endif | 145 | |
155 | rb->iso_decode(str, utf8_tmp, preferences->encoding, count); | 146 | rb->iso_decode(str, utf8_tmp, preferences->encoding, count); |
156 | rb->utf8decode(utf8_tmp, ch); | 147 | rb->utf8decode(utf8_tmp, ch); |
157 | return (unsigned char *)str + count; | 148 | 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 { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | static int remove_wps(struct remove_setting *); | 50 | static int remove_wps(struct remove_setting *); |
51 | #ifdef HAVE_LCD_BITMAP | ||
52 | static int remove_icons(struct remove_setting *setting); | 51 | static int remove_icons(struct remove_setting *setting); |
53 | #endif | ||
54 | 52 | ||
55 | enum remove_settings { | 53 | enum remove_settings { |
56 | #ifdef HAVE_LCD_BITMAP | ||
57 | REMOVE_FONT, | 54 | REMOVE_FONT, |
58 | #endif | ||
59 | REMOVE_WPS, | 55 | REMOVE_WPS, |
60 | #ifdef HAVE_LCD_BITMAP | ||
61 | REMOVE_SBS, | 56 | REMOVE_SBS, |
62 | #endif | ||
63 | #ifdef HAVE_REMOTE_LCD | 57 | #ifdef HAVE_REMOTE_LCD |
64 | REMOVE_RWPS, | 58 | REMOVE_RWPS, |
65 | REMOVE_RSBS, | 59 | REMOVE_RSBS, |
@@ -67,10 +61,8 @@ enum remove_settings { | |||
67 | #if LCD_DEPTH > 1 | 61 | #if LCD_DEPTH > 1 |
68 | REMOVE_BACKDROP, | 62 | REMOVE_BACKDROP, |
69 | #endif | 63 | #endif |
70 | #ifdef HAVE_LCD_BITMAP | ||
71 | REMOVE_ICON, | 64 | REMOVE_ICON, |
72 | REMOVE_VICON, | 65 | REMOVE_VICON, |
73 | #endif | ||
74 | #ifdef HAVE_REMOTE_LCD | 66 | #ifdef HAVE_REMOTE_LCD |
75 | REMOVE_RICON, | 67 | REMOVE_RICON, |
76 | REMOVE_RVICON, | 68 | REMOVE_RVICON, |
@@ -83,16 +75,12 @@ enum remove_settings { | |||
83 | 75 | ||
84 | static bool create_log = true; | 76 | static bool create_log = true; |
85 | static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { | 77 | static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { |
86 | #ifdef HAVE_LCD_BITMAP | ||
87 | [REMOVE_FONT] = { "font", FONT_DIR "/", ".fnt", "", | 78 | [REMOVE_FONT] = { "font", FONT_DIR "/", ".fnt", "", |
88 | ASK_FOR_REMOVAL, NULL, false }, | 79 | ASK_FOR_REMOVAL, NULL, false }, |
89 | #endif | ||
90 | [REMOVE_WPS] = { "wps", WPS_DIR "/", ".wps", "", | 80 | [REMOVE_WPS] = { "wps", WPS_DIR "/", ".wps", "", |
91 | REMOVE_IF_NOT_USED, remove_wps, false }, | 81 | REMOVE_IF_NOT_USED, remove_wps, false }, |
92 | #ifdef HAVE_LCD_BITMAP | ||
93 | [REMOVE_SBS] = { "sbs", SBS_DIR "/", ".sbs", "", | 82 | [REMOVE_SBS] = { "sbs", SBS_DIR "/", ".sbs", "", |
94 | REMOVE_IF_NOT_USED, remove_wps, false }, | 83 | REMOVE_IF_NOT_USED, remove_wps, false }, |
95 | #endif | ||
96 | #ifdef HAVE_REMOTE_LCD | 84 | #ifdef HAVE_REMOTE_LCD |
97 | [REMOVE_RWPS] = { "rwps", WPS_DIR "/", ".rwps", "", | 85 | [REMOVE_RWPS] = { "rwps", WPS_DIR "/", ".rwps", "", |
98 | REMOVE_IF_NOT_USED, remove_wps, false }, | 86 | REMOVE_IF_NOT_USED, remove_wps, false }, |
@@ -103,12 +91,10 @@ static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { | |||
103 | [REMOVE_BACKDROP] = { "backdrop", BACKDROP_DIR "/", ".bmp", "", | 91 | [REMOVE_BACKDROP] = { "backdrop", BACKDROP_DIR "/", ".bmp", "", |
104 | REMOVE_IF_NOT_USED, NULL, false }, | 92 | REMOVE_IF_NOT_USED, NULL, false }, |
105 | #endif | 93 | #endif |
106 | #ifdef HAVE_LCD_BITMAP | ||
107 | [REMOVE_ICON] = { "iconset", ICON_DIR "/", ".bmp", "", | 94 | [REMOVE_ICON] = { "iconset", ICON_DIR "/", ".bmp", "", |
108 | ASK_FOR_REMOVAL, NULL, false }, | 95 | ASK_FOR_REMOVAL, NULL, false }, |
109 | [REMOVE_VICON] = { "viewers iconset", ICON_DIR "/", ".bmp", "", | 96 | [REMOVE_VICON] = { "viewers iconset", ICON_DIR "/", ".bmp", "", |
110 | ASK_FOR_REMOVAL, remove_icons, false }, | 97 | ASK_FOR_REMOVAL, remove_icons, false }, |
111 | #endif | ||
112 | #ifdef HAVE_REMOTE_LCD | 98 | #ifdef HAVE_REMOTE_LCD |
113 | [REMOVE_RICON] = { "remote iconset", ICON_DIR "/", ".bmp", "", | 99 | [REMOVE_RICON] = { "remote iconset", ICON_DIR "/", ".bmp", "", |
114 | ASK_FOR_REMOVAL, NULL, false }, | 100 | ASK_FOR_REMOVAL, NULL, false }, |
@@ -124,19 +110,15 @@ static char *option_names[NUM_REMOVE_OPTION] = { | |||
124 | "always", "never", "not used", "ask", | 110 | "always", "never", "not used", "ask", |
125 | }; | 111 | }; |
126 | static struct configdata config[] = { | 112 | static struct configdata config[] = { |
127 | #ifdef HAVE_LCD_BITMAP | ||
128 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 113 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
129 | { .int_p = &remove_list[REMOVE_FONT].option }, | 114 | { .int_p = &remove_list[REMOVE_FONT].option }, |
130 | "remove font", option_names }, | 115 | "remove font", option_names }, |
131 | #endif | ||
132 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 116 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
133 | { .int_p = &remove_list[REMOVE_WPS].option }, | 117 | { .int_p = &remove_list[REMOVE_WPS].option }, |
134 | "remove wps", option_names }, | 118 | "remove wps", option_names }, |
135 | #ifdef HAVE_LCD_BITMAP | ||
136 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 119 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
137 | { .int_p = &remove_list[REMOVE_SBS].option }, | 120 | { .int_p = &remove_list[REMOVE_SBS].option }, |
138 | "remove sbs", option_names }, | 121 | "remove sbs", option_names }, |
139 | #endif | ||
140 | #ifdef HAVE_REMOTE_LCD | 122 | #ifdef HAVE_REMOTE_LCD |
141 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 123 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
142 | { .int_p = &remove_list[REMOVE_RWPS].option }, | 124 | { .int_p = &remove_list[REMOVE_RWPS].option }, |
@@ -150,14 +132,12 @@ static struct configdata config[] = { | |||
150 | { .int_p = &remove_list[REMOVE_BACKDROP].option }, | 132 | { .int_p = &remove_list[REMOVE_BACKDROP].option }, |
151 | "remove backdrop", option_names }, | 133 | "remove backdrop", option_names }, |
152 | #endif | 134 | #endif |
153 | #ifdef HAVE_LCD_BITMAP | ||
154 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 135 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
155 | { .int_p = &remove_list[REMOVE_ICON].option }, | 136 | { .int_p = &remove_list[REMOVE_ICON].option }, |
156 | "remove iconset", option_names }, | 137 | "remove iconset", option_names }, |
157 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 138 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
158 | { .int_p = &remove_list[REMOVE_VICON].option }, | 139 | { .int_p = &remove_list[REMOVE_VICON].option }, |
159 | "remove viconset", option_names }, | 140 | "remove viconset", option_names }, |
160 | #endif | ||
161 | #ifdef HAVE_REMOTE_LCD | 141 | #ifdef HAVE_REMOTE_LCD |
162 | { TYPE_INT, 0, NUM_REMOVE_OPTION, | 142 | { TYPE_INT, 0, NUM_REMOVE_OPTION, |
163 | { .int_p = &remove_list[REMOVE_RICON].option }, | 143 | { .int_p = &remove_list[REMOVE_RICON].option }, |
@@ -285,7 +265,6 @@ static int remove_wps(struct remove_setting *setting) | |||
285 | return remove_dir(bmpdir, MAX_PATH); | 265 | return remove_dir(bmpdir, MAX_PATH); |
286 | } | 266 | } |
287 | 267 | ||
288 | #ifdef HAVE_LCD_BITMAP | ||
289 | static int remove_icons(struct remove_setting *setting) | 268 | static int remove_icons(struct remove_setting *setting) |
290 | { | 269 | { |
291 | char path[MAX_PATH]; | 270 | char path[MAX_PATH]; |
@@ -306,19 +285,15 @@ static int remove_icons(struct remove_setting *setting) | |||
306 | show_mess("Removed", path); | 285 | show_mess("Removed", path); |
307 | return 0; | 286 | return 0; |
308 | } | 287 | } |
309 | #endif | ||
310 | 288 | ||
311 | #ifdef HAVE_LCD_BITMAP | ||
312 | static char font_file[MAX_PATH]; | 289 | static char font_file[MAX_PATH]; |
313 | #endif | 290 | |
314 | static bool is_deny_file(const char *file) | 291 | static bool is_deny_file(const char *file) |
315 | { | 292 | { |
316 | const char *deny_files[] = { | 293 | const char *deny_files[] = { |
317 | WPS_DEFAULTCFG, | 294 | WPS_DEFAULTCFG, |
318 | RWPS_DEFAULTCFG, | 295 | RWPS_DEFAULTCFG, |
319 | #ifdef HAVE_LCD_BITMAP | ||
320 | font_file, | 296 | font_file, |
321 | #endif | ||
322 | NULL | 297 | NULL |
323 | }; | 298 | }; |
324 | const char **p = deny_files; | 299 | const char **p = deny_files; |
@@ -334,13 +309,9 @@ static bool is_deny_file(const char *file) | |||
334 | static void check_whether_used_in_setting(void) | 309 | static void check_whether_used_in_setting(void) |
335 | { | 310 | { |
336 | const char *setting_files[] = { | 311 | const char *setting_files[] = { |
337 | #ifdef HAVE_LCD_BITMAP | ||
338 | rb->global_settings->font_file, | 312 | rb->global_settings->font_file, |
339 | #endif | ||
340 | rb->global_settings->wps_file, | 313 | rb->global_settings->wps_file, |
341 | #ifdef HAVE_LCD_BITMAP | ||
342 | rb->global_settings->sbs_file, | 314 | rb->global_settings->sbs_file, |
343 | #endif | ||
344 | #ifdef HAVE_REMOTE_LCD | 315 | #ifdef HAVE_REMOTE_LCD |
345 | rb->global_settings->rwps_file, | 316 | rb->global_settings->rwps_file, |
346 | rb->global_settings->rsbs_file, | 317 | rb->global_settings->rsbs_file, |
@@ -348,10 +319,8 @@ static void check_whether_used_in_setting(void) | |||
348 | #if LCD_DEPTH > 1 | 319 | #if LCD_DEPTH > 1 |
349 | rb->global_settings->backdrop_file, | 320 | rb->global_settings->backdrop_file, |
350 | #endif | 321 | #endif |
351 | #ifdef HAVE_LCD_BITMAP | ||
352 | rb->global_settings->icon_file, | 322 | rb->global_settings->icon_file, |
353 | rb->global_settings->viewers_icon_file, | 323 | rb->global_settings->viewers_icon_file, |
354 | #endif | ||
355 | #ifdef HAVE_REMOTE_LCD | 324 | #ifdef HAVE_REMOTE_LCD |
356 | rb->global_settings->remote_icon_file, | 325 | rb->global_settings->remote_icon_file, |
357 | rb->global_settings->remote_viewers_icon_file, | 326 | rb->global_settings->remote_viewers_icon_file, |
@@ -419,12 +388,10 @@ static void check_whether_used(void) | |||
419 | DIR *dir; | 388 | DIR *dir; |
420 | 389 | ||
421 | check_whether_used_in_setting(); | 390 | check_whether_used_in_setting(); |
422 | #ifdef HAVE_LCD_BITMAP | ||
423 | /* mark font files come from rockbox-font.zip as used and don't remove | 391 | /* mark font files come from rockbox-font.zip as used and don't remove |
424 | * them automatically as themes may depend on those fonts. */ | 392 | * them automatically as themes may depend on those fonts. */ |
425 | if (remove_list[REMOVE_FONT].option == REMOVE_IF_NOT_USED) | 393 | if (remove_list[REMOVE_FONT].option == REMOVE_IF_NOT_USED) |
426 | check_whether_used_in_file(RB_FONTS_CONFIG); | 394 | check_whether_used_in_file(RB_FONTS_CONFIG); |
427 | #endif | ||
428 | 395 | ||
429 | dir = rb->opendir(THEME_DIR); | 396 | dir = rb->opendir(THEME_DIR); |
430 | if (!dir) | 397 | if (!dir) |
@@ -591,13 +558,9 @@ static bool option_menu(void) | |||
591 | { | 558 | { |
592 | MENUITEM_STRINGLIST(option_menu, "Remove Options", NULL, | 559 | MENUITEM_STRINGLIST(option_menu, "Remove Options", NULL, |
593 | /* same order as remove_list */ | 560 | /* same order as remove_list */ |
594 | #ifdef HAVE_LCD_BITMAP | ||
595 | "Font", | 561 | "Font", |
596 | #endif | ||
597 | "WPS", | 562 | "WPS", |
598 | #ifdef HAVE_LCD_BITMAP | ||
599 | "Statusbar Skin", | 563 | "Statusbar Skin", |
600 | #endif | ||
601 | #ifdef HAVE_REMOTE_LCD | 564 | #ifdef HAVE_REMOTE_LCD |
602 | "Remote WPS", | 565 | "Remote WPS", |
603 | "Remote Statusbar Skin", | 566 | "Remote Statusbar Skin", |
@@ -605,9 +568,7 @@ static bool option_menu(void) | |||
605 | #if LCD_DEPTH > 1 | 568 | #if LCD_DEPTH > 1 |
606 | "Backdrop", | 569 | "Backdrop", |
607 | #endif | 570 | #endif |
608 | #ifdef HAVE_LCD_BITMAP | ||
609 | "Iconset", "Viewers Iconset", | 571 | "Iconset", "Viewers Iconset", |
610 | #endif | ||
611 | #ifdef HAVE_REMOTE_LCD | 572 | #ifdef HAVE_REMOTE_LCD |
612 | "Remote Iconset", "Remote Viewers Iconset", | 573 | "Remote Iconset", "Remote Viewers Iconset", |
613 | #endif | 574 | #endif |
@@ -669,10 +630,8 @@ enum plugin_status plugin_start(const void* parameter) | |||
669 | if((p = rb->strrchr(title, '.'))) | 630 | if((p = rb->strrchr(title, '.'))) |
670 | *p = 0; | 631 | *p = 0; |
671 | 632 | ||
672 | #ifdef HAVE_LCD_BITMAP | ||
673 | rb->snprintf(font_file, MAX_PATH, FONT_DIR "/%s.fnt", | 633 | rb->snprintf(font_file, MAX_PATH, FONT_DIR "/%s.fnt", |
674 | rb->global_settings->font_file); | 634 | rb->global_settings->font_file); |
675 | #endif | ||
676 | rb->strlcpy(themefile, parameter, MAX_PATH); | 635 | rb->strlcpy(themefile, parameter, MAX_PATH); |
677 | if (!rb->file_exists(themefile)) | 636 | if (!rb->file_exists(themefile)) |
678 | { | 637 | { |
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, | |||
77 | rb->lcd_putsf(0, 6, "realtime: %d%% ", realtime); | 77 | rb->lcd_putsf(0, 6, "realtime: %d%% ", realtime); |
78 | rb->lcd_putsf(0, 8, "compression: %d%% ", compression); | 78 | rb->lcd_putsf(0, 8, "compression: %d%% ", compression); |
79 | 79 | ||
80 | #ifdef HAVE_LCD_BITMAP | ||
81 | rb->lcd_update(); | 80 | rb->lcd_update(); |
82 | #endif | ||
83 | } | 81 | } |
84 | 82 | ||
85 | #define TEMP_SAMPLES 4096 | 83 | #define TEMP_SAMPLES 4096 |
@@ -102,9 +100,7 @@ static int wav2wv(const char *infile) | |||
102 | 100 | ||
103 | rb->lcd_clear_display(); | 101 | rb->lcd_clear_display(); |
104 | rb->lcd_puts_scroll(0, 0, (unsigned char *)infile); | 102 | rb->lcd_puts_scroll(0, 0, (unsigned char *)infile); |
105 | #ifdef HAVE_LCD_BITMAP | ||
106 | rb->lcd_update(); | 103 | rb->lcd_update(); |
107 | #endif | ||
108 | 104 | ||
109 | last_buttons = rb->button_status (); | 105 | last_buttons = rb->button_status (); |
110 | start_tick = *rb->current_tick; | 106 | start_tick = *rb->current_tick; |
diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 72e8c3bd65..0d3156b144 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c | |||
@@ -608,7 +608,6 @@ void presets_save(void) | |||
608 | } | 608 | } |
609 | 609 | ||
610 | #if 0 /* disabled in draw_progressbar() */ | 610 | #if 0 /* disabled in draw_progressbar() */ |
611 | #ifdef HAVE_LCD_BITMAP | ||
612 | static inline void draw_vertical_line_mark(struct screen * screen, | 611 | static inline void draw_vertical_line_mark(struct screen * screen, |
613 | int x, int y, int h) | 612 | int x, int y, int h) |
614 | { | 613 | { |
@@ -634,4 +633,3 @@ void presets_draw_markers(struct screen *screen, | |||
634 | } | 633 | } |
635 | } | 634 | } |
636 | #endif | 635 | #endif |
637 | #endif | ||
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index 4faa757184..66de36bcd0 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -26,8 +26,6 @@ | |||
26 | #include <lcd.h> | 26 | #include <lcd.h> |
27 | #include "metadata.h" | 27 | #include "metadata.h" |
28 | 28 | ||
29 | #ifdef HAVE_LCD_BITMAP | ||
30 | |||
31 | /* External bitmaps */ | 29 | /* External bitmaps */ |
32 | 30 | ||
33 | #include "bitmaps/rockboxlogo.h" | 31 | #include "bitmaps/rockboxlogo.h" |
@@ -125,6 +123,5 @@ extern const unsigned char bitmap_icon_disk[]; | |||
125 | #define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH | 123 | #define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH |
126 | #define TIME_X_END STATUSBAR_WIDTH-1 | 124 | #define TIME_X_END STATUSBAR_WIDTH-1 |
127 | 125 | ||
128 | #endif /* End HAVE_LCD_BITMAP */ | ||
129 | #endif /* PLUGIN */ | 126 | #endif /* PLUGIN */ |
130 | #endif /* _ICONS_H_ */ | 127 | #endif /* _ICONS_H_ */ |
diff --git a/apps/screen_access.c b/apps/screen_access.c index cdb02a6546..44e90742b0 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c | |||
@@ -39,43 +39,30 @@ | |||
39 | /* some helper functions to calculate metrics on the fly */ | 39 | /* some helper functions to calculate metrics on the fly */ |
40 | static int screen_helper_getcharwidth(void) | 40 | static int screen_helper_getcharwidth(void) |
41 | { | 41 | { |
42 | #ifdef HAVE_LCD_BITMAP | ||
43 | return font_get(lcd_getfont())->maxwidth; | 42 | return font_get(lcd_getfont())->maxwidth; |
44 | #else | ||
45 | return 1; | ||
46 | #endif | ||
47 | } | 43 | } |
48 | 44 | ||
49 | static int screen_helper_getcharheight(void) | 45 | static int screen_helper_getcharheight(void) |
50 | { | 46 | { |
51 | #ifdef HAVE_LCD_BITMAP | ||
52 | return font_get(lcd_getfont())->height; | 47 | return font_get(lcd_getfont())->height; |
53 | #else | ||
54 | return 1; | ||
55 | #endif | ||
56 | } | 48 | } |
57 | 49 | ||
58 | static int screen_helper_getnblines(void) | 50 | static int screen_helper_getnblines(void) |
59 | { | 51 | { |
60 | int height=screens[0].lcdheight; | 52 | int height=screens[0].lcdheight; |
61 | #ifdef HAVE_LCD_BITMAP | ||
62 | if(global_settings.statusbar != STATUSBAR_OFF) | 53 | if(global_settings.statusbar != STATUSBAR_OFF) |
63 | height -= STATUSBAR_HEIGHT; | 54 | height -= STATUSBAR_HEIGHT; |
64 | #endif | ||
65 | return height / screens[0].getcharheight(); | 55 | return height / screens[0].getcharheight(); |
66 | } | 56 | } |
67 | 57 | ||
68 | void screen_helper_setfont(int font) | 58 | void screen_helper_setfont(int font) |
69 | { | 59 | { |
70 | (void)font; | 60 | (void)font; |
71 | #ifdef HAVE_LCD_BITMAP | ||
72 | if (font == FONT_UI) | 61 | if (font == FONT_UI) |
73 | font = global_status.font_id[SCREEN_MAIN]; | 62 | font = global_status.font_id[SCREEN_MAIN]; |
74 | lcd_setfont(font); | 63 | lcd_setfont(font); |
75 | #endif | ||
76 | } | 64 | } |
77 | 65 | ||
78 | #ifdef HAVE_LCD_BITMAP | ||
79 | static int screen_helper_getuifont(void) | 66 | static int screen_helper_getuifont(void) |
80 | { | 67 | { |
81 | return global_status.font_id[SCREEN_MAIN]; | 68 | return global_status.font_id[SCREEN_MAIN]; |
@@ -85,15 +72,10 @@ static void screen_helper_setuifont(int font) | |||
85 | { | 72 | { |
86 | global_status.font_id[SCREEN_MAIN] = font; | 73 | global_status.font_id[SCREEN_MAIN] = font; |
87 | } | 74 | } |
88 | #endif | ||
89 | 75 | ||
90 | static void screen_helper_set_drawmode(int mode) | 76 | static void screen_helper_set_drawmode(int mode) |
91 | { | 77 | { |
92 | #ifdef HAVE_LCD_BITMAP | ||
93 | lcd_set_drawmode(mode); | 78 | lcd_set_drawmode(mode); |
94 | #else | ||
95 | (void) mode; | ||
96 | #endif | ||
97 | } | 79 | } |
98 | 80 | ||
99 | static void screen_helper_put_line(int x, int y, struct line_desc *line, | 81 | static void screen_helper_put_line(int x, int y, struct line_desc *line, |
@@ -108,29 +90,19 @@ static void screen_helper_put_line(int x, int y, struct line_desc *line, | |||
108 | #if NB_SCREENS == 2 | 90 | #if NB_SCREENS == 2 |
109 | static int screen_helper_remote_getcharwidth(void) | 91 | static int screen_helper_remote_getcharwidth(void) |
110 | { | 92 | { |
111 | #ifdef HAVE_LCD_BITMAP | ||
112 | return font_get(lcd_remote_getfont())->maxwidth; | 93 | return font_get(lcd_remote_getfont())->maxwidth; |
113 | #else | ||
114 | return 1; | ||
115 | #endif | ||
116 | } | 94 | } |
117 | 95 | ||
118 | static int screen_helper_remote_getcharheight(void) | 96 | static int screen_helper_remote_getcharheight(void) |
119 | { | 97 | { |
120 | #ifdef HAVE_LCD_BITMAP | ||
121 | return font_get(lcd_remote_getfont())->height; | 98 | return font_get(lcd_remote_getfont())->height; |
122 | #else | ||
123 | return 1; | ||
124 | #endif | ||
125 | } | 99 | } |
126 | 100 | ||
127 | static int screen_helper_remote_getnblines(void) | 101 | static int screen_helper_remote_getnblines(void) |
128 | { | 102 | { |
129 | int height=screens[1].lcdheight; | 103 | int height=screens[1].lcdheight; |
130 | #ifdef HAVE_LCD_BITMAP | ||
131 | if(global_settings.statusbar != STATUSBAR_OFF) | 104 | if(global_settings.statusbar != STATUSBAR_OFF) |
132 | height -= STATUSBAR_HEIGHT; | 105 | height -= STATUSBAR_HEIGHT; |
133 | #endif | ||
134 | return height / screens[1].getcharheight(); | 106 | return height / screens[1].getcharheight(); |
135 | } | 107 | } |
136 | 108 | ||
@@ -143,18 +115,12 @@ void screen_helper_remote_setfont(int font) | |||
143 | 115 | ||
144 | static int screen_helper_remote_getuifont(void) | 116 | static int screen_helper_remote_getuifont(void) |
145 | { | 117 | { |
146 | #ifdef HAVE_LCD_BITMAP | ||
147 | return global_status.font_id[SCREEN_REMOTE]; | 118 | return global_status.font_id[SCREEN_REMOTE]; |
148 | #else | ||
149 | return FONT_SYSFIXED; | ||
150 | #endif | ||
151 | } | 119 | } |
152 | 120 | ||
153 | static void screen_helper_remote_setuifont(int font) | 121 | static void screen_helper_remote_setuifont(int font) |
154 | { | 122 | { |
155 | #ifdef HAVE_LCD_BITMAP | ||
156 | global_status.font_id[SCREEN_REMOTE] = font; | 123 | global_status.font_id[SCREEN_REMOTE] = font; |
157 | #endif | ||
158 | } | 124 | } |
159 | 125 | ||
160 | static void screen_helper_remote_put_line(int x, int y, struct line_desc *line, | 126 | static void screen_helper_remote_put_line(int x, int y, struct line_desc *line, |
@@ -181,9 +147,7 @@ struct screen screens[NB_SCREENS] = | |||
181 | #else | 147 | #else |
182 | .is_color=false, | 148 | .is_color=false, |
183 | #endif | 149 | #endif |
184 | #ifdef HAVE_LCD_BITMAP | ||
185 | .pixel_format=LCD_PIXELFORMAT, | 150 | .pixel_format=LCD_PIXELFORMAT, |
186 | #endif | ||
187 | .getcharwidth=screen_helper_getcharwidth, | 151 | .getcharwidth=screen_helper_getcharwidth, |
188 | .getcharheight=screen_helper_getcharheight, | 152 | .getcharheight=screen_helper_getcharheight, |
189 | #if (CONFIG_LED == LED_VIRTUAL) | 153 | #if (CONFIG_LED == LED_VIRTUAL) |
@@ -196,7 +160,6 @@ struct screen screens[NB_SCREENS] = | |||
196 | .getwidth=&lcd_getwidth, | 160 | .getwidth=&lcd_getwidth, |
197 | .getheight=&lcd_getheight, | 161 | .getheight=&lcd_getheight, |
198 | .getstringsize=&lcd_getstringsize, | 162 | .getstringsize=&lcd_getstringsize, |
199 | #ifdef HAVE_LCD_BITMAP | ||
200 | .setfont=screen_helper_setfont, | 163 | .setfont=screen_helper_setfont, |
201 | .getuifont=screen_helper_getuifont, | 164 | .getuifont=screen_helper_getuifont, |
202 | .setuifont=screen_helper_setuifont, | 165 | .setuifont=screen_helper_setuifont, |
@@ -235,7 +198,6 @@ struct screen screens[NB_SCREENS] = | |||
235 | .vline=&lcd_vline, | 198 | .vline=&lcd_vline, |
236 | .hline=&lcd_hline, | 199 | .hline=&lcd_hline, |
237 | .scroll_step=&lcd_scroll_step, | 200 | .scroll_step=&lcd_scroll_step, |
238 | #endif /* HAVE_LCD_BITMAP */ | ||
239 | 201 | ||
240 | .putsxy=&lcd_putsxy, | 202 | .putsxy=&lcd_putsxy, |
241 | .puts=&lcd_puts, | 203 | .puts=&lcd_puts, |
@@ -259,13 +221,11 @@ struct screen screens[NB_SCREENS] = | |||
259 | .backdrop_load=&backdrop_load, | 221 | .backdrop_load=&backdrop_load, |
260 | .backdrop_show=&backdrop_show, | 222 | .backdrop_show=&backdrop_show, |
261 | #endif | 223 | #endif |
262 | #if defined(HAVE_LCD_BITMAP) | ||
263 | .set_framebuffer = (void*)lcd_set_framebuffer, | 224 | .set_framebuffer = (void*)lcd_set_framebuffer, |
264 | #if defined(HAVE_LCD_COLOR) | 225 | #if defined(HAVE_LCD_COLOR) |
265 | .gradient_fillrect = lcd_gradient_fillrect, | 226 | .gradient_fillrect = lcd_gradient_fillrect, |
266 | .gradient_fillrect_part = lcd_gradient_fillrect_part, | 227 | .gradient_fillrect_part = lcd_gradient_fillrect_part, |
267 | #endif | 228 | #endif |
268 | #endif | ||
269 | .put_line = screen_helper_put_line, | 229 | .put_line = screen_helper_put_line, |
270 | }, | 230 | }, |
271 | #if NB_SCREENS == 2 | 231 | #if NB_SCREENS == 2 |
@@ -347,15 +307,12 @@ struct screen screens[NB_SCREENS] = | |||
347 | .backdrop_load=&remote_backdrop_load, | 307 | .backdrop_load=&remote_backdrop_load, |
348 | .backdrop_show=&remote_backdrop_show, | 308 | .backdrop_show=&remote_backdrop_show, |
349 | #endif | 309 | #endif |
350 | #if defined(HAVE_LCD_BITMAP) | ||
351 | .set_framebuffer = (void*)lcd_remote_set_framebuffer, | 310 | .set_framebuffer = (void*)lcd_remote_set_framebuffer, |
352 | #endif | ||
353 | .put_line = screen_helper_remote_put_line, | 311 | .put_line = screen_helper_remote_put_line, |
354 | } | 312 | } |
355 | #endif /* NB_SCREENS == 2 */ | 313 | #endif /* NB_SCREENS == 2 */ |
356 | }; | 314 | }; |
357 | 315 | ||
358 | #ifdef HAVE_LCD_BITMAP | ||
359 | void screen_clear_area(struct screen * display, int xstart, int ystart, | 316 | void screen_clear_area(struct screen * display, int xstart, int ystart, |
360 | int width, int height) | 317 | int width, int height) |
361 | { | 318 | { |
@@ -363,4 +320,3 @@ void screen_clear_area(struct screen * display, int xstart, int ystart, | |||
363 | display->fillrect(xstart, ystart, width, height); | 320 | display->fillrect(xstart, ystart, width, height); |
364 | display->set_drawmode(DRMODE_SOLID); | 321 | display->set_drawmode(DRMODE_SOLID); |
365 | } | 322 | } |
366 | #endif | ||
diff --git a/apps/screen_access.h b/apps/screen_access.h index eab84c9129..79ad79c153 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h | |||
@@ -50,9 +50,7 @@ struct screen | |||
50 | int lcdwidth, lcdheight; | 50 | int lcdwidth, lcdheight; |
51 | int depth; | 51 | int depth; |
52 | int (*getnblines)(void); | 52 | int (*getnblines)(void); |
53 | #ifdef HAVE_LCD_BITMAP | ||
54 | int pixel_format; | 53 | int pixel_format; |
55 | #endif | ||
56 | int (*getcharwidth)(void); | 54 | int (*getcharwidth)(void); |
57 | int (*getcharheight)(void); | 55 | int (*getcharheight)(void); |
58 | bool is_color; | 56 | bool is_color; |
@@ -64,7 +62,6 @@ struct screen | |||
64 | int (*getwidth)(void); | 62 | int (*getwidth)(void); |
65 | int (*getheight)(void); | 63 | int (*getheight)(void); |
66 | int (*getstringsize)(const unsigned char *str, int *w, int *h); | 64 | int (*getstringsize)(const unsigned char *str, int *w, int *h); |
67 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */ | ||
68 | void (*setfont)(int newfont); | 65 | void (*setfont)(int newfont); |
69 | int (*getuifont)(void); | 66 | int (*getuifont)(void); |
70 | void (*setuifont)(int newfont); | 67 | void (*setuifont)(int newfont); |
@@ -104,7 +101,6 @@ struct screen | |||
104 | void (*drawline)(int x1, int y1, int x2, int y2); | 101 | void (*drawline)(int x1, int y1, int x2, int y2); |
105 | void (*vline)(int x, int y1, int y2); | 102 | void (*vline)(int x, int y1, int y2); |
106 | void (*hline)(int x1, int x2, int y); | 103 | void (*hline)(int x1, int x2, int y); |
107 | #endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ | ||
108 | 104 | ||
109 | void (*putsxy)(int x, int y, const unsigned char *str); | 105 | void (*putsxy)(int x, int y, const unsigned char *str); |
110 | void (*puts)(int x, int y, const unsigned char *str); | 106 | void (*puts)(int x, int y, const unsigned char *str); |
@@ -130,7 +126,6 @@ struct screen | |||
130 | bool (*backdrop_load)(const char *filename, char* backdrop_buffer); | 126 | bool (*backdrop_load)(const char *filename, char* backdrop_buffer); |
131 | void (*backdrop_show)(char* backdrop_buffer); | 127 | void (*backdrop_show)(char* backdrop_buffer); |
132 | #endif | 128 | #endif |
133 | #if defined(HAVE_LCD_BITMAP) | ||
134 | void (*set_framebuffer)(void *framebuffer); | 129 | void (*set_framebuffer)(void *framebuffer); |
135 | #if defined(HAVE_LCD_COLOR) | 130 | #if defined(HAVE_LCD_COLOR) |
136 | void (*gradient_fillrect)(int x, int y, int width, int height, | 131 | void (*gradient_fillrect)(int x, int y, int width, int height, |
@@ -138,15 +133,11 @@ struct screen | |||
138 | void (*gradient_fillrect_part)(int x, int y, int width, int height, | 133 | void (*gradient_fillrect_part)(int x, int y, int width, int height, |
139 | unsigned start, unsigned end, int src_height, int row_skip); | 134 | unsigned start, unsigned end, int src_height, int row_skip); |
140 | #endif | 135 | #endif |
141 | #endif | ||
142 | #if defined(HAVE_LCD_BITMAP) | ||
143 | void (*nine_segment_bmp)(const struct bitmap* bm, int x, int y, | 136 | void (*nine_segment_bmp)(const struct bitmap* bm, int x, int y, |
144 | int width, int height); | 137 | int width, int height); |
145 | #endif | ||
146 | void (*put_line)(int x, int y, struct line_desc *line, const char *fmt, ...); | 138 | void (*put_line)(int x, int y, struct line_desc *line, const char *fmt, ...); |
147 | }; | 139 | }; |
148 | 140 | ||
149 | #if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) | ||
150 | /* | 141 | /* |
151 | * Clear only a given area of the screen | 142 | * Clear only a given area of the screen |
152 | * - screen : the screen structure | 143 | * - screen : the screen structure |
@@ -155,7 +146,6 @@ struct screen | |||
155 | */ | 146 | */ |
156 | void screen_clear_area(struct screen * display, int xstart, int ystart, | 147 | void screen_clear_area(struct screen * display, int xstart, int ystart, |
157 | int width, int height); | 148 | int width, int height); |
158 | #endif | ||
159 | 149 | ||
160 | /* | 150 | /* |
161 | * exported screens array that should be used | 151 | * exported screens array that should be used |
diff --git a/apps/screens.c b/apps/screens.c index 47f110efd9..020d0a3021 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -66,7 +66,7 @@ void charging_splash(void) | |||
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | 68 | ||
69 | #if defined(HAVE_LCD_BITMAP) && (CONFIG_RTC != 0) | 69 | #if (CONFIG_RTC != 0) |
70 | 70 | ||
71 | /* little helper function for voice output */ | 71 | /* little helper function for voice output */ |
72 | static void say_time(int cursorpos, const struct tm *tm) | 72 | static void say_time(int cursorpos, const struct tm *tm) |
@@ -360,7 +360,7 @@ bool set_time_screen(const char* title, struct tm *tm) | |||
360 | #endif | 360 | #endif |
361 | return usb; | 361 | return usb; |
362 | } | 362 | } |
363 | #endif /* defined(HAVE_LCD_BITMAP) && (CONFIG_RTC != 0) */ | 363 | #endif /* (CONFIG_RTC != 0) */ |
364 | 364 | ||
365 | static const int id3_headers[]= | 365 | static const int id3_headers[]= |
366 | { | 366 | { |
diff --git a/apps/settings.c b/apps/settings.c index 17e200812e..6cecffcb91 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -47,11 +47,9 @@ | |||
47 | #include "system.h" | 47 | #include "system.h" |
48 | #include "general.h" | 48 | #include "general.h" |
49 | #include "misc.h" | 49 | #include "misc.h" |
50 | #ifdef HAVE_LCD_BITMAP | ||
51 | #include "icons.h" | 50 | #include "icons.h" |
52 | #include "font.h" | 51 | #include "font.h" |
53 | #include "peakmeter.h" | 52 | #include "peakmeter.h" |
54 | #endif | ||
55 | #include "lang.h" | 53 | #include "lang.h" |
56 | #include "language.h" | 54 | #include "language.h" |
57 | #include "powermgmt.h" | 55 | #include "powermgmt.h" |
@@ -91,11 +89,7 @@ struct system_status global_status; | |||
91 | #define NVRAM_BLOCK_SIZE (sizeof(struct system_status) + NVRAM_DATA_START) | 89 | #define NVRAM_BLOCK_SIZE (sizeof(struct system_status) + NVRAM_DATA_START) |
92 | #endif | 90 | #endif |
93 | 91 | ||
94 | #ifdef HAVE_LCD_BITMAP | ||
95 | #define MAX_LINES 10 | 92 | #define MAX_LINES 10 |
96 | #else | ||
97 | #define MAX_LINES 2 | ||
98 | #endif | ||
99 | 93 | ||
100 | #ifdef HAVE_REMOTE_LCD | 94 | #ifdef HAVE_REMOTE_LCD |
101 | #include "lcd-remote.h" | 95 | #include "lcd-remote.h" |
@@ -706,8 +700,6 @@ bool settings_save_config(int options) | |||
706 | 700 | ||
707 | /** Apply and Reset settings **/ | 701 | /** Apply and Reset settings **/ |
708 | 702 | ||
709 | |||
710 | #ifdef HAVE_LCD_BITMAP | ||
711 | /* | 703 | /* |
712 | * Applies the range infos stored in global_settings to | 704 | * Applies the range infos stored in global_settings to |
713 | * the peak meter. | 705 | * the peak meter. |
@@ -734,7 +726,6 @@ void settings_apply_pm_range(void) | |||
734 | /* apply the range */ | 726 | /* apply the range */ |
735 | peak_meter_init_range(global_settings.peak_meter_dbfs, pm_min, pm_max); | 727 | peak_meter_init_range(global_settings.peak_meter_dbfs, pm_min, pm_max); |
736 | } | 728 | } |
737 | #endif /* HAVE_LCD_BITMAP */ | ||
738 | 729 | ||
739 | void sound_settings_apply(void) | 730 | void sound_settings_apply(void) |
740 | { | 731 | { |
@@ -786,9 +777,7 @@ void sound_settings_apply(void) | |||
786 | 777 | ||
787 | void settings_apply(bool read_disk) | 778 | void settings_apply(bool read_disk) |
788 | { | 779 | { |
789 | #ifdef HAVE_LCD_BITMAP | ||
790 | int rc; | 780 | int rc; |
791 | #endif | ||
792 | CHART(">set_codepage"); | 781 | CHART(">set_codepage"); |
793 | set_codepage(global_settings.default_codepage); | 782 | set_codepage(global_settings.default_codepage); |
794 | CHART("<set_codepage"); | 783 | CHART("<set_codepage"); |
@@ -864,7 +853,6 @@ void settings_apply(bool read_disk) | |||
864 | set_battery_type(global_settings.battery_type); | 853 | set_battery_type(global_settings.battery_type); |
865 | #endif | 854 | #endif |
866 | 855 | ||
867 | #ifdef HAVE_LCD_BITMAP | ||
868 | #ifdef HAVE_LCD_INVERT | 856 | #ifdef HAVE_LCD_INVERT |
869 | lcd_set_invert_display(global_settings.invert); | 857 | lcd_set_invert_display(global_settings.invert); |
870 | #endif | 858 | #endif |
@@ -877,7 +865,6 @@ void settings_apply(bool read_disk) | |||
877 | peak_meter_init_times( | 865 | peak_meter_init_times( |
878 | global_settings.peak_meter_release, global_settings.peak_meter_hold, | 866 | global_settings.peak_meter_release, global_settings.peak_meter_hold, |
879 | global_settings.peak_meter_clip_hold); | 867 | global_settings.peak_meter_clip_hold); |
880 | #endif | ||
881 | 868 | ||
882 | #ifdef HAVE_SPEAKER | 869 | #ifdef HAVE_SPEAKER |
883 | audio_enable_speaker(global_settings.speaker_mode); | 870 | audio_enable_speaker(global_settings.speaker_mode); |
@@ -886,7 +873,6 @@ void settings_apply(bool read_disk) | |||
886 | if (read_disk) | 873 | if (read_disk) |
887 | { | 874 | { |
888 | char buf[MAX_PATH]; | 875 | char buf[MAX_PATH]; |
889 | #ifdef HAVE_LCD_BITMAP | ||
890 | /* fonts need to be loaded before the WPS */ | 876 | /* fonts need to be loaded before the WPS */ |
891 | if (global_settings.font_file[0] | 877 | if (global_settings.font_file[0] |
892 | && global_settings.font_file[0] != '-') { | 878 | && global_settings.font_file[0] != '-') { |
@@ -935,7 +921,6 @@ void settings_apply(bool read_disk) | |||
935 | } | 921 | } |
936 | else | 922 | else |
937 | load_kbd(NULL); | 923 | load_kbd(NULL); |
938 | #endif /* HAVE_LCD_BITMAP */ | ||
939 | if ( global_settings.lang_file[0]) { | 924 | if ( global_settings.lang_file[0]) { |
940 | snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", | 925 | snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", |
941 | global_settings.lang_file); | 926 | global_settings.lang_file); |
@@ -967,11 +952,9 @@ void settings_apply(bool read_disk) | |||
967 | screens[SCREEN_MAIN].set_background(global_settings.bg_color); | 952 | screens[SCREEN_MAIN].set_background(global_settings.bg_color); |
968 | #endif | 953 | #endif |
969 | 954 | ||
970 | #ifdef HAVE_LCD_BITMAP | ||
971 | lcd_scroll_step(global_settings.scroll_step); | 955 | lcd_scroll_step(global_settings.scroll_step); |
972 | gui_list_screen_scroll_step(global_settings.screen_scroll_step); | 956 | gui_list_screen_scroll_step(global_settings.screen_scroll_step); |
973 | gui_list_screen_scroll_out_of_view(global_settings.offset_out_of_view); | 957 | gui_list_screen_scroll_out_of_view(global_settings.offset_out_of_view); |
974 | #endif | ||
975 | lcd_bidir_scroll(global_settings.bidir_limit); | 958 | lcd_bidir_scroll(global_settings.bidir_limit); |
976 | lcd_scroll_delay(global_settings.scroll_delay); | 959 | lcd_scroll_delay(global_settings.scroll_delay); |
977 | 960 | ||
@@ -1063,12 +1046,10 @@ void settings_apply(bool read_disk) | |||
1063 | #if defined(HAVE_RECORDING) | 1046 | #if defined(HAVE_RECORDING) |
1064 | enc_global_settings_apply(); | 1047 | enc_global_settings_apply(); |
1065 | #endif | 1048 | #endif |
1066 | #ifdef HAVE_LCD_BITMAP | ||
1067 | /* already called with THEME_STATUSBAR in settings_apply_skins() */ | 1049 | /* already called with THEME_STATUSBAR in settings_apply_skins() */ |
1068 | CHART(">viewportmanager_theme_changed"); | 1050 | CHART(">viewportmanager_theme_changed"); |
1069 | viewportmanager_theme_changed(THEME_UI_VIEWPORT|THEME_LANGUAGE|THEME_BUTTONBAR); | 1051 | viewportmanager_theme_changed(THEME_UI_VIEWPORT|THEME_LANGUAGE|THEME_BUTTONBAR); |
1070 | CHART("<viewportmanager_theme_changed"); | 1052 | CHART("<viewportmanager_theme_changed"); |
1071 | #endif | ||
1072 | } | 1053 | } |
1073 | 1054 | ||
1074 | 1055 | ||
@@ -1109,7 +1090,6 @@ void settings_reset(void) | |||
1109 | #if defined (HAVE_RECORDING) | 1090 | #if defined (HAVE_RECORDING) |
1110 | enc_global_settings_reset(); | 1091 | enc_global_settings_reset(); |
1111 | #endif | 1092 | #endif |
1112 | #ifdef HAVE_LCD_BITMAP | ||
1113 | FOR_NB_SCREENS(i) | 1093 | FOR_NB_SCREENS(i) |
1114 | { | 1094 | { |
1115 | if (screens[i].getuifont() > FONT_SYSFIXED) | 1095 | if (screens[i].getuifont() > FONT_SYSFIXED) |
@@ -1119,7 +1099,6 @@ void settings_reset(void) | |||
1119 | screens[i].setfont(FONT_SYSFIXED); | 1099 | screens[i].setfont(FONT_SYSFIXED); |
1120 | } | 1100 | } |
1121 | } | 1101 | } |
1122 | #endif | ||
1123 | } | 1102 | } |
1124 | 1103 | ||
1125 | /** Changing setting values **/ | 1104 | /** Changing setting values **/ |
diff --git a/apps/settings.h b/apps/settings.h index 3d3939695c..405a31d052 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -286,9 +286,7 @@ struct system_status | |||
286 | signed char last_screen; | 286 | signed char last_screen; |
287 | int viewer_icon_count; | 287 | int viewer_icon_count; |
288 | int last_volume_change; /* tick the last volume change happened. skins use this */ | 288 | int last_volume_change; /* tick the last volume change happened. skins use this */ |
289 | #ifdef HAVE_LCD_BITMAP | ||
290 | int font_id[NB_SCREENS]; /* font id of the settings font for each screen */ | 289 | int font_id[NB_SCREENS]; /* font id of the settings font for each screen */ |
291 | #endif | ||
292 | 290 | ||
293 | }; | 291 | }; |
294 | 292 | ||
@@ -494,9 +492,7 @@ struct user_settings | |||
494 | int peak_meter_max; /* range maximum */ | 492 | int peak_meter_max; /* range maximum */ |
495 | 493 | ||
496 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ | 494 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ |
497 | #ifdef HAVE_LCD_BITMAP | ||
498 | unsigned char sbs_file[MAX_FILENAME+1]; /* last statusbar skin */ | 495 | unsigned char sbs_file[MAX_FILENAME+1]; /* last statusbar skin */ |
499 | #endif | ||
500 | #ifdef HAVE_REMOTE_LCD | 496 | #ifdef HAVE_REMOTE_LCD |
501 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ | 497 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ |
502 | unsigned char rsbs_file[MAX_FILENAME+1]; /* last remote statusbar skin */ | 498 | unsigned char rsbs_file[MAX_FILENAME+1]; /* last remote statusbar skin */ |
@@ -514,7 +510,6 @@ struct user_settings | |||
514 | int remote_statusbar; | 510 | int remote_statusbar; |
515 | #endif | 511 | #endif |
516 | 512 | ||
517 | #ifdef HAVE_LCD_BITMAP | ||
518 | int scrollbar; /* SCROLLBAR_* enum values */ | 513 | int scrollbar; /* SCROLLBAR_* enum values */ |
519 | int scrollbar_width; | 514 | int scrollbar_width; |
520 | 515 | ||
@@ -525,7 +520,6 @@ struct user_settings | |||
525 | int list_separator_height; /* -1=auto (== 1 currently), 0=disabled, X=height in pixels */ | 520 | int list_separator_height; /* -1=auto (== 1 currently), 0=disabled, X=height in pixels */ |
526 | int list_separator_color; | 521 | int list_separator_color; |
527 | #endif | 522 | #endif |
528 | #endif | ||
529 | /* goto current song when exiting WPS */ | 523 | /* goto current song when exiting WPS */ |
530 | bool browse_current; /* 1=goto current song, | 524 | bool browse_current; /* 1=goto current song, |
531 | 0=goto previous location */ | 525 | 0=goto previous location */ |
@@ -621,7 +615,6 @@ struct user_settings | |||
621 | int contrast; /* lcd contrast */ | 615 | int contrast; /* lcd contrast */ |
622 | #endif | 616 | #endif |
623 | 617 | ||
624 | #ifdef HAVE_LCD_BITMAP | ||
625 | #ifdef HAVE_LCD_INVERT | 618 | #ifdef HAVE_LCD_INVERT |
626 | bool invert; /* invert display */ | 619 | bool invert; /* invert display */ |
627 | #endif | 620 | #endif |
@@ -640,7 +633,6 @@ struct user_settings | |||
640 | unsigned char remote_font_file[MAX_FILENAME+1]; /* last font */ | 633 | unsigned char remote_font_file[MAX_FILENAME+1]; /* last font */ |
641 | #endif | 634 | #endif |
642 | unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ | 635 | unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ |
643 | #endif /* HAVE_LCD_BITMAP */ | ||
644 | int backlight_timeout; /* backlight off timeout: -1=never, | 636 | int backlight_timeout; /* backlight off timeout: -1=never, |
645 | 0=always, or time in seconds */ | 637 | 0=always, or time in seconds */ |
646 | bool caption_backlight; /* turn on backlight at end and start of track */ | 638 | bool caption_backlight; /* turn on backlight at end and start of track */ |
@@ -748,12 +740,10 @@ struct user_settings | |||
748 | bool usb_skip_first_drive; | 740 | bool usb_skip_first_drive; |
749 | #endif | 741 | #endif |
750 | 742 | ||
751 | #ifdef HAVE_LCD_BITMAP | ||
752 | unsigned char ui_vp_config[64]; /* viewport string for the lists */ | 743 | unsigned char ui_vp_config[64]; /* viewport string for the lists */ |
753 | #ifdef HAVE_REMOTE_LCD | 744 | #ifdef HAVE_REMOTE_LCD |
754 | unsigned char remote_ui_vp_config[64]; /* viewport string for the remote lists */ | 745 | unsigned char remote_ui_vp_config[64]; /* viewport string for the remote lists */ |
755 | #endif | 746 | #endif |
756 | #endif | ||
757 | 747 | ||
758 | struct compressor_settings compressor_settings; | 748 | struct compressor_settings compressor_settings; |
759 | 749 | ||
diff --git a/apps/settings_list.c b/apps/settings_list.c index 7f6f4fefc7..e5e523da93 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -43,9 +43,7 @@ | |||
43 | #endif | 43 | #endif |
44 | #include "list.h" | 44 | #include "list.h" |
45 | #include "rbunicode.h" | 45 | #include "rbunicode.h" |
46 | #ifdef HAVE_LCD_BITMAP | ||
47 | #include "peakmeter.h" | 46 | #include "peakmeter.h" |
48 | #endif | ||
49 | #include "menus/eq_menu.h" | 47 | #include "menus/eq_menu.h" |
50 | #if CONFIG_TUNER | 48 | #if CONFIG_TUNER |
51 | #include "radio.h" | 49 | #include "radio.h" |
@@ -219,17 +217,13 @@ static const int time_recording_trigger[] = {0,1,2,5,10,15,20,25,30,60,120,300,6 | |||
219 | static const int backlight_fade[] = {0,100,200,300,500,1000,2000,3000,5000,10000}; | 217 | static const int backlight_fade[] = {0,100,200,300,500,1000,2000,3000,5000,10000}; |
220 | #endif | 218 | #endif |
221 | 219 | ||
222 | #ifdef HAVE_LCD_BITMAP | ||
223 | static const char graphic_numeric[] = "graphic,numeric"; | 220 | static const char graphic_numeric[] = "graphic,numeric"; |
224 | #endif | ||
225 | 221 | ||
226 | /* Default theme settings */ | 222 | /* Default theme settings */ |
227 | #define DEFAULT_WPSNAME "cabbiev2" | 223 | #define DEFAULT_WPSNAME "cabbiev2" |
228 | #define DEFAULT_SBSNAME "-" | 224 | #define DEFAULT_SBSNAME "-" |
229 | #define DEFAULT_FMS_NAME "cabbiev2" | 225 | #define DEFAULT_FMS_NAME "cabbiev2" |
230 | 226 | ||
231 | #ifdef HAVE_LCD_BITMAP | ||
232 | |||
233 | #if LCD_HEIGHT <= 64 | 227 | #if LCD_HEIGHT <= 64 |
234 | #define DEFAULT_FONT_HEIGHT 8 | 228 | #define DEFAULT_FONT_HEIGHT 8 |
235 | #define DEFAULT_FONTNAME "08-Rockfont" | 229 | #define DEFAULT_FONTNAME "08-Rockfont" |
@@ -255,10 +249,6 @@ static const char graphic_numeric[] = "graphic,numeric"; | |||
255 | #define MIN_GLYPHS 50 | 249 | #define MIN_GLYPHS 50 |
256 | #define MAX_GLYPHS 65540 | 250 | #define MAX_GLYPHS 65540 |
257 | 251 | ||
258 | #else | ||
259 | #define DEFAULT_FONT_HEIGHT 12 | ||
260 | #endif | ||
261 | |||
262 | #ifndef DEFAULT_FONTNAME | 252 | #ifndef DEFAULT_FONTNAME |
263 | /* ugly expansion needed */ | 253 | /* ugly expansion needed */ |
264 | #define _EXPAND2(x) #x | 254 | #define _EXPAND2(x) #x |
@@ -438,7 +428,6 @@ static int32_t getlang_time_unit_0_is_skip_track(int value, int unit) | |||
438 | return talk_time_intervals(value, unit, false); | 428 | return talk_time_intervals(value, unit, false); |
439 | } | 429 | } |
440 | 430 | ||
441 | #ifdef HAVE_LCD_BITMAP | ||
442 | static const char* formatter_time_unit_0_is_eternal(char *buffer, | 431 | static const char* formatter_time_unit_0_is_eternal(char *buffer, |
443 | size_t buffer_size, int val, const char *unit) | 432 | size_t buffer_size, int val, const char *unit) |
444 | { | 433 | { |
@@ -455,7 +444,6 @@ static int32_t getlang_time_unit_0_is_eternal(int value, int unit) | |||
455 | else | 444 | else |
456 | return talk_time_intervals(value, unit, false); | 445 | return talk_time_intervals(value, unit, false); |
457 | } | 446 | } |
458 | #endif /* HAVE_LCD_BITMAP */ | ||
459 | 447 | ||
460 | #ifndef HAVE_WHEEL_ACCELERATION | 448 | #ifndef HAVE_WHEEL_ACCELERATION |
461 | static const char* scanaccel_formatter(char *buffer, size_t buffer_size, | 449 | static const char* scanaccel_formatter(char *buffer, size_t buffer_size, |
@@ -907,7 +895,6 @@ const struct settings_list settings[] = { | |||
907 | 23, timeout_sec_common), | 895 | 23, timeout_sec_common), |
908 | #endif | 896 | #endif |
909 | #endif /* HAVE_BACKLIGHT */ | 897 | #endif /* HAVE_BACKLIGHT */ |
910 | #ifdef HAVE_LCD_BITMAP | ||
911 | #ifdef HAVE_LCD_INVERT | 898 | #ifdef HAVE_LCD_INVERT |
912 | BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on, | 899 | BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on, |
913 | LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display), | 900 | LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display), |
@@ -972,7 +959,6 @@ const struct settings_list settings[] = { | |||
972 | CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0, | 959 | CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0, |
973 | "time format", "24hour,12hour", NULL, 2, | 960 | "time format", "24hour,12hour", NULL, 2, |
974 | ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)), | 961 | ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)), |
975 | #endif /* HAVE_LCD_BITMAP */ | ||
976 | OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL), | 962 | OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL), |
977 | /* system */ | 963 | /* system */ |
978 | INT_SETTING(F_TIME_SETTING, poweroff, LANG_POWEROFF_IDLE, 10, | 964 | INT_SETTING(F_TIME_SETTING, poweroff, LANG_POWEROFF_IDLE, 10, |
@@ -1170,7 +1156,6 @@ const struct settings_list settings[] = { | |||
1170 | "remote bidir limit", UNIT_PERCENT, 0, 200, 25, NULL, NULL, | 1156 | "remote bidir limit", UNIT_PERCENT, 0, 200, 25, NULL, NULL, |
1171 | lcd_remote_bidir_scroll), | 1157 | lcd_remote_bidir_scroll), |
1172 | #endif | 1158 | #endif |
1173 | #ifdef HAVE_LCD_BITMAP | ||
1174 | OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW, | 1159 | OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW, |
1175 | false, "Screen Scrolls Out Of View", | 1160 | false, "Screen Scrolls Out Of View", |
1176 | gui_list_screen_scroll_out_of_view), | 1161 | gui_list_screen_scroll_out_of_view), |
@@ -1179,7 +1164,6 @@ const struct settings_list settings[] = { | |||
1179 | INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16, | 1164 | INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16, |
1180 | "screen scroll step", UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, | 1165 | "screen scroll step", UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, |
1181 | gui_list_screen_scroll_step), | 1166 | gui_list_screen_scroll_step), |
1182 | #endif /* HAVE_LCD_BITMAP */ | ||
1183 | OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED, | 1167 | OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED, |
1184 | false,"scroll paginated",NULL), | 1168 | false,"scroll paginated",NULL), |
1185 | #ifdef HAVE_LCD_COLOR | 1169 | #ifdef HAVE_LCD_COLOR |
@@ -1274,7 +1258,6 @@ const struct settings_list settings[] = { | |||
1274 | ID2P(LANG_SET_BOOL_YES), | 1258 | ID2P(LANG_SET_BOOL_YES), |
1275 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_PLAYLIST), | 1259 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_PLAYLIST), |
1276 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_TRACK)), | 1260 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_TRACK)), |
1277 | #ifdef HAVE_LCD_BITMAP | ||
1278 | /* peak meter */ | 1261 | /* peak meter */ |
1279 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, peak_meter_clip_hold, | 1262 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, peak_meter_clip_hold, |
1280 | LANG_PM_CLIP_HOLD, 60, "peak meter clip hold", "eternal", | 1263 | LANG_PM_CLIP_HOLD, 60, "peak meter clip hold", "eternal", |
@@ -1297,7 +1280,6 @@ const struct settings_list settings[] = { | |||
1297 | OFFON_SETTING(0, peak_meter_clipcounter, LANG_PM_CLIPCOUNTER, false, | 1280 | OFFON_SETTING(0, peak_meter_clipcounter, LANG_PM_CLIPCOUNTER, false, |
1298 | "peak meter clipcounter", NULL), | 1281 | "peak meter clipcounter", NULL), |
1299 | #endif /* HAVE_RECORDING */ | 1282 | #endif /* HAVE_RECORDING */ |
1300 | #endif /* HAVE_LCD_BITMAP */ | ||
1301 | /* voice */ | 1283 | /* voice */ |
1302 | OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL), | 1284 | OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL), |
1303 | CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0, | 1285 | CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0, |
@@ -1755,7 +1737,6 @@ const struct settings_list settings[] = { | |||
1755 | #endif | 1737 | #endif |
1756 | CHOICE_SETTING(F_TEMPVAR, default_codepage, LANG_DEFAULT_CODEPAGE, 0, | 1738 | CHOICE_SETTING(F_TEMPVAR, default_codepage, LANG_DEFAULT_CODEPAGE, 0, |
1757 | "default codepage", | 1739 | "default codepage", |
1758 | #ifdef HAVE_LCD_BITMAP | ||
1759 | /* The order must match with that in unicode.c */ | 1740 | /* The order must match with that in unicode.c */ |
1760 | "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256," | 1741 | "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256," |
1761 | "iso8859-9,iso8859-2,cp1250,cp1252,sjis,gb2312,ksx1001,big5,utf-8", | 1742 | "iso8859-9,iso8859-2,cp1250,cp1252,sjis,gb2312,ksx1001,big5,utf-8", |
@@ -1771,17 +1752,6 @@ const struct settings_list settings[] = { | |||
1771 | ID2P(LANG_CODEPAGE_JAPANESE), | 1752 | ID2P(LANG_CODEPAGE_JAPANESE), |
1772 | ID2P(LANG_CODEPAGE_SIMPLIFIED), ID2P(LANG_CODEPAGE_KOREAN), | 1753 | ID2P(LANG_CODEPAGE_SIMPLIFIED), ID2P(LANG_CODEPAGE_KOREAN), |
1773 | ID2P(LANG_CODEPAGE_TRADITIONAL), ID2P(LANG_CODEPAGE_UTF8)), | 1754 | ID2P(LANG_CODEPAGE_TRADITIONAL), ID2P(LANG_CODEPAGE_UTF8)), |
1774 | #else /* !HAVE_LCD_BITMAP */ | ||
1775 | /* The order must match with that in unicode.c */ | ||
1776 | "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,cp1252,utf-8", | ||
1777 | NULL, 8, | ||
1778 | ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK), | ||
1779 | ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH), | ||
1780 | ID2P(LANG_CODEPAGE_LATIN_EXTENDED), | ||
1781 | ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN), | ||
1782 | ID2P(LANG_CODEPAGE_WESTERN_EUROPEAN), | ||
1783 | ID2P(LANG_CODEPAGE_UTF8)), | ||
1784 | #endif | ||
1785 | OFFON_SETTING(0, warnon_erase_dynplaylist, LANG_WARN_ERASEDYNPLAYLIST_MENU, | 1755 | OFFON_SETTING(0, warnon_erase_dynplaylist, LANG_WARN_ERASEDYNPLAYLIST_MENU, |
1786 | true, "warn when erasing dynamic playlist",NULL), | 1756 | true, "warn when erasing dynamic playlist",NULL), |
1787 | 1757 | ||
@@ -1805,12 +1775,10 @@ const struct settings_list settings[] = { | |||
1805 | 1775 | ||
1806 | OFFON_SETTING(0, hold_lr_for_scroll_in_list, -1, true, | 1776 | OFFON_SETTING(0, hold_lr_for_scroll_in_list, -1, true, |
1807 | "hold_lr_for_scroll_in_list",NULL), | 1777 | "hold_lr_for_scroll_in_list",NULL), |
1808 | #ifdef HAVE_LCD_BITMAP | ||
1809 | CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_CURRENT, | 1778 | CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_CURRENT, |
1810 | "show path in browser", "off,current directory,full path", | 1779 | "show path in browser", "off,current directory,full path", |
1811 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), | 1780 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), |
1812 | ID2P(LANG_DISPLAY_FULL_PATH)), | 1781 | ID2P(LANG_DISPLAY_FULL_PATH)), |
1813 | #endif | ||
1814 | 1782 | ||
1815 | #ifdef HAVE_AGC | 1783 | #ifdef HAVE_AGC |
1816 | {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORDING_AGC_PRESET, | 1784 | {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORDING_AGC_PRESET, |
@@ -1866,23 +1834,19 @@ const struct settings_list settings[] = { | |||
1866 | DEFAULT_FMS_NAME, SBS_DIR "/", ".rfms"), | 1834 | DEFAULT_FMS_NAME, SBS_DIR "/", ".rfms"), |
1867 | #endif | 1835 | #endif |
1868 | #endif /* CONFIG_TUNER */ | 1836 | #endif /* CONFIG_TUNER */ |
1869 | #ifdef HAVE_LCD_BITMAP | ||
1870 | TEXT_SETTING(F_THEMESETTING, font_file, "font", | 1837 | TEXT_SETTING(F_THEMESETTING, font_file, "font", |
1871 | DEFAULT_FONTNAME, FONT_DIR "/", ".fnt"), | 1838 | DEFAULT_FONTNAME, FONT_DIR "/", ".fnt"), |
1872 | INT_SETTING(0, glyphs_to_cache, LANG_GLYPHS, DEFAULT_GLYPHS, | 1839 | INT_SETTING(0, glyphs_to_cache, LANG_GLYPHS, DEFAULT_GLYPHS, |
1873 | "glyphs", UNIT_INT, MIN_GLYPHS, MAX_GLYPHS, 10, | 1840 | "glyphs", UNIT_INT, MIN_GLYPHS, MAX_GLYPHS, 10, |
1874 | NULL, NULL, NULL), | 1841 | NULL, NULL, NULL), |
1875 | #endif | ||
1876 | #ifdef HAVE_REMOTE_LCD | 1842 | #ifdef HAVE_REMOTE_LCD |
1877 | TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font", | 1843 | TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font", |
1878 | DEFAULT_REMOTE_FONTNAME, FONT_DIR "/", ".fnt"), | 1844 | DEFAULT_REMOTE_FONTNAME, FONT_DIR "/", ".fnt"), |
1879 | #endif | 1845 | #endif |
1880 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", | 1846 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", |
1881 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), | 1847 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), |
1882 | #ifdef HAVE_LCD_BITMAP | ||
1883 | TEXT_SETTING(F_THEMESETTING,sbs_file, "sbs", | 1848 | TEXT_SETTING(F_THEMESETTING,sbs_file, "sbs", |
1884 | DEFAULT_SBSNAME, SBS_DIR "/", ".sbs"), | 1849 | DEFAULT_SBSNAME, SBS_DIR "/", ".sbs"), |
1885 | #endif | ||
1886 | #ifdef HAVE_REMOTE_LCD | 1850 | #ifdef HAVE_REMOTE_LCD |
1887 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", | 1851 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", |
1888 | DEFAULT_WPSNAME, WPS_DIR "/", ".rwps"), | 1852 | DEFAULT_WPSNAME, WPS_DIR "/", ".rwps"), |
@@ -1894,9 +1858,7 @@ const struct settings_list settings[] = { | |||
1894 | TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop", | 1858 | TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop", |
1895 | DEFAULT_BACKDROP, NULL, NULL), | 1859 | DEFAULT_BACKDROP, NULL, NULL), |
1896 | #endif | 1860 | #endif |
1897 | #ifdef HAVE_LCD_BITMAP | ||
1898 | TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"), | 1861 | TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"), |
1899 | #endif | ||
1900 | #ifdef HAVE_USB_CHARGING_ENABLE | 1862 | #ifdef HAVE_USB_CHARGING_ENABLE |
1901 | CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging", | 1863 | CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging", |
1902 | "off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO), | 1864 | "off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO), |
@@ -1965,13 +1927,11 @@ const struct settings_list settings[] = { | |||
1965 | #endif /* HAVE_RTC_ALARM */ | 1927 | #endif /* HAVE_RTC_ALARM */ |
1966 | 1928 | ||
1967 | /* Customizable icons */ | 1929 | /* Customizable icons */ |
1968 | #ifdef HAVE_LCD_BITMAP | ||
1969 | TEXT_SETTING(F_THEMESETTING, icon_file, "iconset", DEFAULT_ICONSET, | 1930 | TEXT_SETTING(F_THEMESETTING, icon_file, "iconset", DEFAULT_ICONSET, |
1970 | ICON_DIR "/", ".bmp"), | 1931 | ICON_DIR "/", ".bmp"), |
1971 | TEXT_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset", | 1932 | TEXT_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset", |
1972 | DEFAULT_VIEWERS_ICONSET, | 1933 | DEFAULT_VIEWERS_ICONSET, |
1973 | ICON_DIR "/", ".bmp"), | 1934 | ICON_DIR "/", ".bmp"), |
1974 | #endif | ||
1975 | #ifdef HAVE_REMOTE_LCD | 1935 | #ifdef HAVE_REMOTE_LCD |
1976 | TEXT_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "-", | 1936 | TEXT_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "-", |
1977 | ICON_DIR "/", ".bmp"), | 1937 | ICON_DIR "/", ".bmp"), |
@@ -2128,12 +2088,10 @@ const struct settings_list settings[] = { | |||
2128 | #endif | 2088 | #endif |
2129 | 2089 | ||
2130 | /* Customizable list */ | 2090 | /* Customizable list */ |
2131 | #ifdef HAVE_LCD_BITMAP | ||
2132 | VIEWPORT_SETTING(ui_vp_config, "ui viewport"), | 2091 | VIEWPORT_SETTING(ui_vp_config, "ui viewport"), |
2133 | #ifdef HAVE_REMOTE_LCD | 2092 | #ifdef HAVE_REMOTE_LCD |
2134 | VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport"), | 2093 | VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport"), |
2135 | #endif | 2094 | #endif |
2136 | #endif | ||
2137 | 2095 | ||
2138 | #ifdef HAVE_MORSE_INPUT | 2096 | #ifdef HAVE_MORSE_INPUT |
2139 | OFFON_SETTING(0, morse_input, LANG_MORSE_INPUT, false, "morse input", NULL), | 2097 | OFFON_SETTING(0, morse_input, LANG_MORSE_INPUT, false, "morse input", NULL), |
diff --git a/apps/tree.c b/apps/tree.c index e159c3465f..316139427d 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -399,9 +399,8 @@ static int update_dir(void) | |||
399 | } | 399 | } |
400 | } | 400 | } |
401 | #ifdef HAVE_TAGCACHE | 401 | #ifdef HAVE_TAGCACHE |
402 | if (id3db) | 402 | if (id3db) |
403 | { | 403 | { |
404 | #ifdef HAVE_LCD_BITMAP | ||
405 | if (global_settings.show_path_in_browser == SHOW_PATH_FULL | 404 | if (global_settings.show_path_in_browser == SHOW_PATH_FULL |
406 | || global_settings.show_path_in_browser == SHOW_PATH_CURRENT) | 405 | || global_settings.show_path_in_browser == SHOW_PATH_CURRENT) |
407 | { | 406 | { |
@@ -412,13 +411,11 @@ static int update_dir(void) | |||
412 | { | 411 | { |
413 | /* Must clear the title as the list is reused */ | 412 | /* Must clear the title as the list is reused */ |
414 | gui_synclist_set_title(&tree_lists, NULL, NOICON); | 413 | gui_synclist_set_title(&tree_lists, NULL, NOICON); |
415 | } | 414 | } |
416 | #endif | ||
417 | } | 415 | } |
418 | else | 416 | else |
419 | #endif | 417 | #endif |
420 | { | 418 | { |
421 | #ifdef HAVE_LCD_BITMAP | ||
422 | if (tc.browse && tc.browse->title) | 419 | if (tc.browse && tc.browse->title) |
423 | { | 420 | { |
424 | int icon = tc.browse->icon; | 421 | int icon = tc.browse->icon; |
@@ -448,8 +445,7 @@ static int update_dir(void) | |||
448 | { | 445 | { |
449 | /* Must clear the title as the list is reused */ | 446 | /* Must clear the title as the list is reused */ |
450 | gui_synclist_set_title(&tree_lists, NULL, NOICON); | 447 | gui_synclist_set_title(&tree_lists, NULL, NOICON); |
451 | } | 448 | } |
452 | #endif | ||
453 | } | 449 | } |
454 | 450 | ||
455 | gui_synclist_set_nb_items(&tree_lists, tc.filesindir); | 451 | gui_synclist_set_nb_items(&tree_lists, tc.filesindir); |
@@ -606,9 +602,7 @@ static int dirbrowse(void) | |||
606 | char buf[MAX_PATH]; | 602 | char buf[MAX_PATH]; |
607 | int len; | 603 | int len; |
608 | int button; | 604 | int button; |
609 | #ifdef HAVE_LCD_BITMAP | ||
610 | int oldbutton; | 605 | int oldbutton; |
611 | #endif | ||
612 | bool reload_root = false; | 606 | bool reload_root = false; |
613 | int lastfilter = *tc.dirfilter; | 607 | int lastfilter = *tc.dirfilter; |
614 | bool lastsortcase = global_settings.sort_case; | 608 | bool lastsortcase = global_settings.sort_case; |
@@ -643,7 +637,7 @@ static int dirbrowse(void) | |||
643 | splash(HZ*2, ID2P(LANG_NO_FILES)); | 637 | splash(HZ*2, ID2P(LANG_NO_FILES)); |
644 | return GO_TO_PREVIOUS; /* No files found for rockbox_browse() */ | 638 | return GO_TO_PREVIOUS; /* No files found for rockbox_browse() */ |
645 | } | 639 | } |
646 | 640 | ||
647 | gui_synclist_draw(&tree_lists); | 641 | gui_synclist_draw(&tree_lists); |
648 | while(1) { | 642 | while(1) { |
649 | bool restore = false; | 643 | bool restore = false; |
@@ -653,9 +647,7 @@ static int dirbrowse(void) | |||
653 | keyclick_set_callback(gui_synclist_keyclick_callback, &tree_lists); | 647 | keyclick_set_callback(gui_synclist_keyclick_callback, &tree_lists); |
654 | button = get_action(CONTEXT_TREE, | 648 | button = get_action(CONTEXT_TREE, |
655 | list_do_action_timeout(&tree_lists, HZ/2)); | 649 | list_do_action_timeout(&tree_lists, HZ/2)); |
656 | #ifdef HAVE_LCD_BITMAP | ||
657 | oldbutton = button; | 650 | oldbutton = button; |
658 | #endif | ||
659 | gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD); | 651 | gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD); |
660 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); | 652 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); |
661 | switch ( button ) { | 653 | switch ( button ) { |