summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES4
-rw-r--r--apps/bookmark.c4
-rw-r--r--apps/filetree.c4
-rw-r--r--apps/gui/gwps-common.c6
-rw-r--r--apps/gui/gwps.c32
-rw-r--r--apps/onplay.c8
-rw-r--r--apps/plugin.c6
-rw-r--r--apps/recorder/backdrop.c17
-rw-r--r--apps/recorder/backdrop.h9
-rw-r--r--apps/settings.c23
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_menu.c10
-rw-r--r--apps/tree.c6
13 files changed, 70 insertions, 61 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index ccfc7fa280..0fdb6f5955 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -57,8 +57,10 @@ recorder/icons.c
57recorder/keyboard.c 57recorder/keyboard.c
58recorder/peakmeter.c 58recorder/peakmeter.c
59recorder/widgets.c 59recorder/widgets.c
60#ifdef HAVE_LCD_COLOR 60#if LCD_DEPTH > 1
61recorder/backdrop.c 61recorder/backdrop.c
62#endif
63#ifdef HAVE_LCD_COLOR
62gui/color_picker.c 64gui/color_picker.c
63#endif 65#endif
64#endif 66#endif
diff --git a/apps/bookmark.c b/apps/bookmark.c
index cb1735f3d5..e6c6261856 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -51,7 +51,7 @@
51#include "splash.h" 51#include "splash.h"
52#include "yesno.h" 52#include "yesno.h"
53 53
54#ifdef HAVE_LCD_COLOR 54#if LCD_DEPTH > 1
55#include "backdrop.h" 55#include "backdrop.h"
56#endif 56#endif
57 57
@@ -218,7 +218,7 @@ bool bookmark_autobookmark(void)
218 str(LANG_RESUME_CONFIRM_PLAYER)}; 218 str(LANG_RESUME_CONFIRM_PLAYER)};
219 struct text_message message={(char **)lines, 2}; 219 struct text_message message={(char **)lines, 2};
220#endif 220#endif
221#ifdef HAVE_LCD_COLOR 221#if LCD_DEPTH > 1
222 show_main_backdrop(); /* switch to main backdrop as we may come from wps */ 222 show_main_backdrop(); /* switch to main backdrop as we may come from wps */
223#endif 223#endif
224 gui_syncstatusbar_draw(&statusbars, false); 224 gui_syncstatusbar_draw(&statusbars, false);
diff --git a/apps/filetree.c b/apps/filetree.c
index 9d5109ceb9..f10c02b449 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -54,7 +54,7 @@ static int boot_size = 0;
54static int boot_cluster; 54static int boot_cluster;
55#endif 55#endif
56 56
57#ifdef HAVE_LCD_COLOR 57#if LCD_DEPTH > 1
58#include "backdrop.h" 58#include "backdrop.h"
59#endif 59#endif
60 60
@@ -466,7 +466,7 @@ int ft_enter(struct tree_context* c)
466 /* wps config file */ 466 /* wps config file */
467 case TREE_ATTR_WPS: 467 case TREE_ATTR_WPS:
468 gui_syncsplash(0, true, str(LANG_WAIT)); 468 gui_syncsplash(0, true, str(LANG_WAIT));
469#ifdef HAVE_LCD_COLOR 469#if LCD_DEPTH > 1
470 unload_wps_backdrop(); 470 unload_wps_backdrop();
471#endif 471#endif
472 wps_data_load(gui_wps[0].data, buf, true); 472 wps_data_load(gui_wps[0].data, buf, true);
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 98f2c7e2ed..212f40f3c0 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -48,7 +48,7 @@
48#include "bmp.h" 48#include "bmp.h"
49#include "atoi.h" 49#include "atoi.h"
50#endif 50#endif
51#ifdef HAVE_LCD_COLOR 51#if LCD_DEPTH > 1
52#include "backdrop.h" 52#include "backdrop.h"
53#endif 53#endif
54#include "dsp.h" 54#include "dsp.h"
@@ -143,7 +143,7 @@ bool wps_data_preload_tags(struct wps_data *data, char *buf,
143 } 143 }
144 break; 144 break;
145 145
146#ifdef HAVE_LCD_COLOR 146#if LCD_DEPTH > 1
147 case 'X': 147 case 'X':
148 /* Backdrop image - must be the same size as the LCD */ 148 /* Backdrop image - must be the same size as the LCD */
149 { 149 {
@@ -2473,7 +2473,7 @@ bool gui_wps_display(void)
2473 if(i == 0) 2473 if(i == 0)
2474 { 2474 {
2475#ifdef HAVE_LCD_BITMAP 2475#ifdef HAVE_LCD_BITMAP
2476#ifdef HAVE_LCD_COLOR 2476#if LCD_DEPTH > 1
2477 unload_wps_backdrop(); 2477 unload_wps_backdrop();
2478#endif 2478#endif
2479 wps_data_load(gui_wps[i].data, 2479 wps_data_load(gui_wps[i].data,
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 115e9f7441..482442cb53 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -54,7 +54,7 @@
54#include "abrepeat.h" 54#include "abrepeat.h"
55#include "playback.h" 55#include "playback.h"
56#include "splash.h" 56#include "splash.h"
57#ifdef HAVE_LCD_COLOR 57#if LCD_DEPTH > 1
58#include "backdrop.h" 58#include "backdrop.h"
59#endif 59#endif
60#include "ata_idle_notify.h" 60#include "ata_idle_notify.h"
@@ -104,9 +104,9 @@ long gui_wps_show(void)
104 { 104 {
105 gui_wps_set_margin(&gui_wps[i]); 105 gui_wps_set_margin(&gui_wps[i]);
106 } 106 }
107#ifdef HAVE_LCD_COLOR 107#if LCD_DEPTH > 1
108 show_wps_backdrop(); 108 show_wps_backdrop();
109#endif /* HAVE_LCD_COLOR */ 109#endif /* LCD_DEPTH > 1 */
110#endif 110#endif
111 111
112#ifdef AB_REPEAT_ENABLE 112#ifdef AB_REPEAT_ENABLE
@@ -201,12 +201,12 @@ long gui_wps_show(void)
201 switch(button) 201 switch(button)
202 { 202 {
203 case ACTION_WPS_CONTEXT: 203 case ACTION_WPS_CONTEXT:
204#ifdef HAVE_LCD_COLOR 204#if LCD_DEPTH > 1
205 show_main_backdrop(); 205 show_main_backdrop();
206#endif 206#endif
207 action_signalscreenchange(); 207 action_signalscreenchange();
208 onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); 208 onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS);
209#ifdef HAVE_LCD_COLOR 209#if LCD_DEPTH > 1
210 show_wps_backdrop(); 210 show_wps_backdrop();
211#endif 211#endif
212#ifdef HAVE_LCD_BITMAP 212#ifdef HAVE_LCD_BITMAP
@@ -422,13 +422,13 @@ long gui_wps_show(void)
422 FOR_NB_SCREENS(i) 422 FOR_NB_SCREENS(i)
423 gui_wps[i].display->stop_scroll(); 423 gui_wps[i].display->stop_scroll();
424 424
425#ifdef HAVE_LCD_COLOR 425#if LCD_DEPTH > 1
426 show_main_backdrop(); 426 show_main_backdrop();
427#endif 427#endif
428 action_signalscreenchange(); 428 action_signalscreenchange();
429 if (main_menu()) 429 if (main_menu())
430 return true; 430 return true;
431#ifdef HAVE_LCD_COLOR 431#if LCD_DEPTH > 1
432 show_wps_backdrop(); 432 show_wps_backdrop();
433#endif 433#endif
434#ifdef HAVE_LCD_BITMAP 434#ifdef HAVE_LCD_BITMAP
@@ -443,12 +443,12 @@ long gui_wps_show(void)
443 443
444#ifdef HAVE_QUICKSCREEN 444#ifdef HAVE_QUICKSCREEN
445 case ACTION_WPS_QUICKSCREEN: 445 case ACTION_WPS_QUICKSCREEN:
446#ifdef HAVE_LCD_COLOR 446#if LCD_DEPTH > 1
447 show_main_backdrop(); 447 show_main_backdrop();
448#endif 448#endif
449 if (quick_screen_quick(button)) 449 if (quick_screen_quick(button))
450 return SYS_USB_CONNECTED; 450 return SYS_USB_CONNECTED;
451#ifdef HAVE_LCD_COLOR 451#if LCD_DEPTH > 1
452 show_wps_backdrop(); 452 show_wps_backdrop();
453#endif 453#endif
454#ifdef HAVE_LCD_BITMAP 454#ifdef HAVE_LCD_BITMAP
@@ -464,7 +464,7 @@ long gui_wps_show(void)
464 /* screen settings */ 464 /* screen settings */
465#ifdef BUTTON_F3 465#ifdef BUTTON_F3
466 case ACTION_F3: 466 case ACTION_F3:
467#ifdef HAVE_LCD_COLOR 467#if LCD_DEPTH > 1
468 show_main_backdrop(); 468 show_main_backdrop();
469#endif 469#endif
470 if (quick_screen_f3(BUTTON_F3)) 470 if (quick_screen_f3(BUTTON_F3))
@@ -482,13 +482,13 @@ long gui_wps_show(void)
482 /* pitch screen */ 482 /* pitch screen */
483#ifdef HAVE_PITCHSCREEN 483#ifdef HAVE_PITCHSCREEN
484 case ACTION_WPS_PITCHSCREEN: 484 case ACTION_WPS_PITCHSCREEN:
485#ifdef HAVE_LCD_COLOR 485#if LCD_DEPTH > 1
486 show_main_backdrop(); 486 show_main_backdrop();
487#endif 487#endif
488 action_signalscreenchange(); 488 action_signalscreenchange();
489 if (1 == pitch_screen()) 489 if (1 == pitch_screen())
490 return SYS_USB_CONNECTED; 490 return SYS_USB_CONNECTED;
491#ifdef HAVE_LCD_COLOR 491#if LCD_DEPTH > 1
492 show_wps_backdrop(); 492 show_wps_backdrop();
493#endif 493#endif
494 restore = true; 494 restore = true;
@@ -533,11 +533,11 @@ long gui_wps_show(void)
533 break; 533 break;
534 534
535 case ACTION_WPS_ID3SCREEN: 535 case ACTION_WPS_ID3SCREEN:
536#ifdef HAVE_LCD_COLOR 536#if LCD_DEPTH > 1
537 show_main_backdrop(); 537 show_main_backdrop();
538#endif 538#endif
539 browse_id3(); 539 browse_id3();
540#ifdef HAVE_LCD_COLOR 540#if LCD_DEPTH > 1
541 show_wps_backdrop(); 541 show_wps_backdrop();
542#endif 542#endif
543#ifdef HAVE_LCD_BITMAP 543#ifdef HAVE_LCD_BITMAP
@@ -559,7 +559,7 @@ long gui_wps_show(void)
559 559
560 case SYS_POWEROFF: 560 case SYS_POWEROFF:
561 bookmark_autobookmark(); 561 bookmark_autobookmark();
562#ifdef HAVE_LCD_COLOR 562#if LCD_DEPTH > 1
563 show_main_backdrop(); 563 show_main_backdrop();
564#endif 564#endif
565 default_event_handler(SYS_POWEROFF); 565 default_event_handler(SYS_POWEROFF);
@@ -868,7 +868,7 @@ void gui_sync_wps_init(void)
868 gui_wps_set_data(&gui_wps[i], &wps_datas[i]); 868 gui_wps_set_data(&gui_wps[i], &wps_datas[i]);
869 gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]); 869 gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]);
870 } 870 }
871#ifdef HAVE_LCD_COLOR 871#if LCD_DEPTH > 1
872 unload_wps_backdrop(); 872 unload_wps_backdrop();
873#endif 873#endif
874} 874}
diff --git a/apps/onplay.c b/apps/onplay.c
index 60a737938f..59fa8caa85 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -50,7 +50,7 @@
50#include "action.h" 50#include "action.h"
51#include "splash.h" 51#include "splash.h"
52#include "yesno.h" 52#include "yesno.h"
53#ifdef HAVE_LCD_COLOR 53#if LCD_DEPTH > 1
54#include "backdrop.h" 54#include "backdrop.h"
55#endif 55#endif
56#ifdef HAVE_LCD_BITMAP 56#ifdef HAVE_LCD_BITMAP
@@ -493,7 +493,7 @@ static bool delete_dir(void)
493 return delete_handler(true); 493 return delete_handler(true);
494} 494}
495 495
496#ifdef HAVE_LCD_COLOR 496#if LCD_DEPTH > 1
497static bool set_backdrop(void) 497static bool set_backdrop(void)
498{ 498{
499 /* load the image */ 499 /* load the image */
@@ -837,7 +837,7 @@ int onplay(char* file, int attr, int from)
837 struct menu_item items[12]; 837 struct menu_item items[12];
838#endif 838#endif
839 int m, i=0, result; 839 int m, i=0, result;
840#ifdef HAVE_LCD_COLOR 840#if LCD_DEPTH > 1
841 char *suffix; 841 char *suffix;
842#endif 842#endif
843 843
@@ -920,7 +920,7 @@ int onplay(char* file, int attr, int from)
920 items[i].function = delete_file; 920 items[i].function = delete_file;
921 i++; 921 i++;
922 922
923#ifdef HAVE_LCD_COLOR 923#if LCD_DEPTH > 1
924 suffix = strrchr(file, '.'); 924 suffix = strrchr(file, '.');
925 if (suffix) 925 if (suffix)
926 { 926 {
diff --git a/apps/plugin.c b/apps/plugin.c
index 0d9635b88e..4827476545 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -485,7 +485,7 @@ int plugin_load(const char* plugin, void* parameter)
485#ifdef HAVE_REMOTE_LCD 485#ifdef HAVE_REMOTE_LCD
486 int rxm, rym; 486 int rxm, rym;
487#endif 487#endif
488#ifdef HAVE_LCD_COLOR 488#if LCD_DEPTH > 1
489 fb_data* old_backdrop; 489 fb_data* old_backdrop;
490#endif 490#endif
491 491
@@ -567,7 +567,7 @@ int plugin_load(const char* plugin, void* parameter)
567 xm = lcd_getxmargin(); 567 xm = lcd_getxmargin();
568 ym = lcd_getymargin(); 568 ym = lcd_getymargin();
569 lcd_setmargins(0,0); 569 lcd_setmargins(0,0);
570#ifdef HAVE_LCD_COLOR 570#if LCD_DEPTH > 1
571 old_backdrop = lcd_get_backdrop(); 571 old_backdrop = lcd_get_backdrop();
572 lcd_set_backdrop(NULL); 572 lcd_set_backdrop(NULL);
573#endif 573#endif
@@ -594,8 +594,8 @@ int plugin_load(const char* plugin, void* parameter)
594 594
595#ifdef HAVE_LCD_BITMAP 595#ifdef HAVE_LCD_BITMAP
596#if LCD_DEPTH > 1 596#if LCD_DEPTH > 1
597#ifdef HAVE_LCD_COLOR
598 lcd_set_backdrop(old_backdrop); 597 lcd_set_backdrop(old_backdrop);
598#ifdef HAVE_LCD_COLOR
599 lcd_set_drawinfo(DRMODE_SOLID, global_settings.fg_color, 599 lcd_set_drawinfo(DRMODE_SOLID, global_settings.fg_color,
600 global_settings.bg_color); 600 global_settings.bg_color);
601#else 601#else
diff --git a/apps/recorder/backdrop.c b/apps/recorder/backdrop.c
index 374dba9f4b..7779792621 100644
--- a/apps/recorder/backdrop.c
+++ b/apps/recorder/backdrop.c
@@ -21,10 +21,20 @@
21#include "config.h" 21#include "config.h"
22#include "lcd.h" 22#include "lcd.h"
23#include "backdrop.h" 23#include "backdrop.h"
24#include "splash.h" /* debugging */
25 24
25#if LCD_DEPTH >= 8
26fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH]; 26fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH];
27fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH]; 27fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH];
28#elif LCD_DEPTH == 2
29#if LCD_PIXELFORMAT == VERTICAL_PACKING
30fb_data main_backdrop[(LCD_HEIGHT+3)/4][LCD_WIDTH];
31fb_data wps_backdrop[(LCD_HEIGHT+3)/4][LCD_WIDTH];
32#else
33fb_data main_backdrop[LCD_HEIGHT][LCD_FBWIDTH];
34fb_data wps_backdrop[LCD_HEIGHT][LCD_FBWIDTH];
35#endif
36#endif
37
28bool main_backdrop_valid = false; 38bool main_backdrop_valid = false;
29bool wps_backdrop_valid = false; 39bool wps_backdrop_valid = false;
30 40
@@ -52,27 +62,23 @@ bool load_backdrop(char* filename, fb_data* backdrop_buffer)
52bool load_main_backdrop(char* filename) 62bool load_main_backdrop(char* filename)
53{ 63{
54 main_backdrop_valid = load_backdrop(filename, &main_backdrop[0][0]); 64 main_backdrop_valid = load_backdrop(filename, &main_backdrop[0][0]);
55/* gui_syncsplash(100, true, "MAIN backdrop load: %s", main_backdrop_valid ? "OK" : "FAIL");*/
56 return main_backdrop_valid; 65 return main_backdrop_valid;
57} 66}
58 67
59bool load_wps_backdrop(char* filename) 68bool load_wps_backdrop(char* filename)
60{ 69{
61 wps_backdrop_valid = load_backdrop(filename, &wps_backdrop[0][0]); 70 wps_backdrop_valid = load_backdrop(filename, &wps_backdrop[0][0]);
62/* gui_syncsplash(100, true, "WPS backdrop load: %s", main_backdrop_valid ? "OK" : "FAIL");*/
63 return wps_backdrop_valid; 71 return wps_backdrop_valid;
64} 72}
65 73
66void unload_main_backdrop(void) 74void unload_main_backdrop(void)
67{ 75{
68 main_backdrop_valid = false; 76 main_backdrop_valid = false;
69/* gui_syncsplash(100, true, "MAIN backdrop unload");*/
70} 77}
71 78
72void unload_wps_backdrop(void) 79void unload_wps_backdrop(void)
73{ 80{
74 wps_backdrop_valid = false; 81 wps_backdrop_valid = false;
75/* gui_syncsplash(100, true, "WPS backdrop unload");*/
76} 82}
77 83
78void show_main_backdrop(void) 84void show_main_backdrop(void)
@@ -89,7 +95,6 @@ void show_wps_backdrop(void)
89 } 95 }
90 else 96 else
91 { 97 {
92/* gui_syncsplash(100, true, "WPS backdrop show: fallback to MAIN");*/
93 show_main_backdrop(); 98 show_main_backdrop();
94 } 99 }
95} 100}
diff --git a/apps/recorder/backdrop.h b/apps/recorder/backdrop.h
index da515af261..93373f1321 100644
--- a/apps/recorder/backdrop.h
+++ b/apps/recorder/backdrop.h
@@ -20,15 +20,10 @@
20#ifndef _BACKDROP_H 20#ifndef _BACKDROP_H
21#define _BACKDROP_H 21#define _BACKDROP_H
22 22
23#ifdef HAVE_LCD_COLOR 23#if LCD_DEPTH > 1
24 24
25#include "lcd.h" 25#include "lcd.h"
26#include "bmp.h" 26#include "bmp.h"
27#include "backdrop.h"
28/*
29extern fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH];
30extern fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH];
31*/
32 27
33bool load_main_backdrop(char* filename); 28bool load_main_backdrop(char* filename);
34bool load_wps_backdrop(char* filename); 29bool load_wps_backdrop(char* filename);
@@ -39,6 +34,6 @@ void unload_wps_backdrop(void);
39void show_main_backdrop(void); 34void show_main_backdrop(void);
40void show_wps_backdrop(void); 35void show_wps_backdrop(void);
41 36
42#endif /* HAVE_LCD_COLOR */ 37#endif /* LCD_DEPTH > 1 */
43 38
44#endif /* _BACKDROP_H */ 39#endif /* _BACKDROP_H */
diff --git a/apps/settings.c b/apps/settings.c
index ea7e303d1d..fc0e5248a3 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -72,7 +72,7 @@
72#include "statusbar.h" 72#include "statusbar.h"
73#include "splash.h" 73#include "splash.h"
74#include "list.h" 74#include "list.h"
75#ifdef HAVE_LCD_COLOR 75#if LCD_DEPTH > 1
76#include "backdrop.h" 76#include "backdrop.h"
77#endif 77#endif
78 78
@@ -1034,7 +1034,7 @@ int settings_save( void )
1034 i+= MAX_FILENAME; 1034 i+= MAX_FILENAME;
1035#endif 1035#endif
1036 1036
1037#ifdef HAVE_LCD_COLOR 1037#if LCD_DEPTH > 1
1038 strncpy((char *)&config_block[i], (char *)global_settings.backdrop_file, 1038 strncpy((char *)&config_block[i], (char *)global_settings.backdrop_file,
1039 MAX_FILENAME); 1039 MAX_FILENAME);
1040 i+= MAX_FILENAME; 1040 i+= MAX_FILENAME;
@@ -1198,7 +1198,7 @@ void settings_apply(void)
1198 global_settings.peak_meter_clip_hold); 1198 global_settings.peak_meter_clip_hold);
1199#endif 1199#endif
1200 1200
1201#ifdef HAVE_LCD_COLOR 1201#if LCD_DEPTH > 1
1202 unload_wps_backdrop(); 1202 unload_wps_backdrop();
1203#endif 1203#endif
1204 if ( global_settings.wps_file[0] && 1204 if ( global_settings.wps_file[0] &&
@@ -1212,7 +1212,7 @@ void settings_apply(void)
1212 wps_data_init(gui_wps[0].data); 1212 wps_data_init(gui_wps[0].data);
1213 } 1213 }
1214 1214
1215#ifdef HAVE_LCD_COLOR 1215#if LCD_DEPTH > 1
1216 if ( global_settings.backdrop_file[0] && 1216 if ( global_settings.backdrop_file[0] &&
1217 global_settings.backdrop_file[0] != 0xff ) { 1217 global_settings.backdrop_file[0] != 0xff ) {
1218 snprintf(buf, sizeof buf, BACKDROP_DIR "/%s.bmp", 1218 snprintf(buf, sizeof buf, BACKDROP_DIR "/%s.bmp",
@@ -1222,7 +1222,9 @@ void settings_apply(void)
1222 unload_main_backdrop(); 1222 unload_main_backdrop();
1223 } 1223 }
1224 show_main_backdrop(); 1224 show_main_backdrop();
1225#endif
1225 1226
1227#ifdef HAVE_LCD_COLOR
1226 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color); 1228 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
1227 screens[SCREEN_MAIN].set_background(global_settings.bg_color); 1229 screens[SCREEN_MAIN].set_background(global_settings.bg_color);
1228#endif 1230#endif
@@ -1438,7 +1440,7 @@ void settings_load(int which)
1438 i+= MAX_FILENAME; 1440 i+= MAX_FILENAME;
1439#endif 1441#endif
1440 1442
1441#ifdef HAVE_LCD_COLOR 1443#if LCD_DEPTH > 1
1442 strncpy((char *)global_settings.backdrop_file, (char *)&config_block[i], 1444 strncpy((char *)global_settings.backdrop_file, (char *)&config_block[i],
1443 MAX_FILENAME); 1445 MAX_FILENAME);
1444 i+= MAX_FILENAME; 1446 i+= MAX_FILENAME;
@@ -1593,7 +1595,7 @@ bool settings_load_config(const char* file)
1593 1595
1594 /* check for the string values */ 1596 /* check for the string values */
1595 if (!strcasecmp(name, "wps")) { 1597 if (!strcasecmp(name, "wps")) {
1596#ifdef HAVE_LCD_COLOR 1598#if LCD_DEPTH > 1
1597 unload_wps_backdrop(); 1599 unload_wps_backdrop();
1598#endif 1600#endif
1599 int fd2; 1601 int fd2;
@@ -1629,7 +1631,7 @@ bool settings_load_config(const char* file)
1629 set_file(value, (char *)global_settings.font_file, MAX_FILENAME); 1631 set_file(value, (char *)global_settings.font_file, MAX_FILENAME);
1630 } 1632 }
1631#endif 1633#endif
1632#ifdef HAVE_LCD_COLOR 1634#if LCD_DEPTH > 1
1633 else if (!strcasecmp(name, "backdrop")) { 1635 else if (!strcasecmp(name, "backdrop")) {
1634 if (load_main_backdrop(value)) { 1636 if (load_main_backdrop(value)) {
1635 set_file(value, (char *)global_settings.backdrop_file, MAX_FILENAME); 1637 set_file(value, (char *)global_settings.backdrop_file, MAX_FILENAME);
@@ -1795,7 +1797,7 @@ bool settings_save_config(void)
1795 global_settings.font_file); 1797 global_settings.font_file);
1796#endif 1798#endif
1797 1799
1798#ifdef HAVE_LCD_COLOR 1800#if LCD_DEPTH > 1
1799 if (global_settings.backdrop_file[0] != 0) 1801 if (global_settings.backdrop_file[0] != 0)
1800 fdprintf(fd, "backdrop: %s/%s.bmp\r\n", BACKDROP_DIR, 1802 fdprintf(fd, "backdrop: %s/%s.bmp\r\n", BACKDROP_DIR,
1801 global_settings.backdrop_file); 1803 global_settings.backdrop_file);
@@ -1898,9 +1900,10 @@ void settings_reset(void) {
1898#endif 1900#endif
1899 global_settings.font_file[0] = '\0'; 1901 global_settings.font_file[0] = '\0';
1900 global_settings.lang_file[0] = '\0'; 1902 global_settings.lang_file[0] = '\0';
1901#ifdef HAVE_LCD_COLOR 1903#if LCD_DEPTH > 1
1902 global_settings.backdrop_file[0] = '\0'; 1904 global_settings.backdrop_file[0] = '\0';
1903 1905#endif
1906#ifdef HAVE_LCD_COLOR
1904 global_settings.fg_color = LCD_DEFAULT_FG; 1907 global_settings.fg_color = LCD_DEFAULT_FG;
1905 global_settings.bg_color = LCD_DEFAULT_BG; 1908 global_settings.bg_color = LCD_DEFAULT_BG;
1906#endif 1909#endif
diff --git a/apps/settings.h b/apps/settings.h
index 7b70ab748c..c0c6a943ce 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -454,7 +454,7 @@ struct user_settings
454 bool dithering_enabled; 454 bool dithering_enabled;
455#endif 455#endif
456 456
457#ifdef HAVE_LCD_COLOR 457#if LCD_DEPTH > 1
458 unsigned char backdrop_file[MAX_FILENAME+1]; /* backdrop bitmap file */ 458 unsigned char backdrop_file[MAX_FILENAME+1]; /* backdrop bitmap file */
459#endif 459#endif
460 460
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 0cbe5344fb..83f2452613 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -81,7 +81,7 @@ void dac_line_in(bool enable);
81#include "dsp.h" 81#include "dsp.h"
82#endif 82#endif
83 83
84#ifdef HAVE_LCD_COLOR 84#if LCD_DEPTH > 1
85#include "backdrop.h" 85#include "backdrop.h"
86#endif 86#endif
87 87
@@ -393,7 +393,7 @@ static bool invert_cursor(void)
393 return rc; 393 return rc;
394} 394}
395 395
396#ifdef HAVE_LCD_COLOR 396#if LCD_DEPTH > 1
397/** 397/**
398 * Menu to clear the backdrop image 398 * Menu to clear the backdrop image
399 */ 399 */
@@ -404,7 +404,9 @@ static bool clear_main_backdrop(void)
404 show_main_backdrop(); 404 show_main_backdrop();
405 return false; 405 return false;
406} 406}
407#endif
407 408
409#ifdef HAVE_LCD_COLOR
408/** 410/**
409 * Menu for fore/back colors 411 * Menu for fore/back colors
410 */ 412 */
@@ -1969,8 +1971,10 @@ static bool lcd_settings_menu(void)
1969#endif 1971#endif
1970 { ID2P(LANG_INVERT_CURSOR), invert_cursor }, 1972 { ID2P(LANG_INVERT_CURSOR), invert_cursor },
1971#endif 1973#endif
1972#ifdef HAVE_LCD_COLOR 1974#if LCD_DEPTH > 1
1973 { ID2P(LANG_CLEAR_BACKDROP), clear_main_backdrop }, 1975 { ID2P(LANG_CLEAR_BACKDROP), clear_main_backdrop },
1976#endif
1977#ifdef HAVE_LCD_COLOR
1974 { ID2P(LANG_BACKGROUND_COLOR), set_bg_color }, 1978 { ID2P(LANG_BACKGROUND_COLOR), set_bg_color },
1975 { ID2P(LANG_FOREGROUND_COLOR), set_fg_color }, 1979 { ID2P(LANG_FOREGROUND_COLOR), set_fg_color },
1976 { ID2P(LANG_RESET_COLORS), reset_color }, 1980 { ID2P(LANG_RESET_COLORS), reset_color },
diff --git a/apps/tree.c b/apps/tree.c
index 623046a4b0..fea7b21529 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -83,7 +83,7 @@
83#include "widgets.h" 83#include "widgets.h"
84#endif 84#endif
85 85
86#ifdef HAVE_LCD_COLOR 86#if LCD_DEPTH > 1
87#include "backdrop.h" 87#include "backdrop.h"
88#endif 88#endif
89 89
@@ -118,7 +118,7 @@ const struct filetype filetypes[] = {
118#ifdef HAVE_REMOTE_LCD 118#ifdef HAVE_REMOTE_LCD
119 { "rwps", TREE_ATTR_RWPS, Icon_Wps, VOICE_EXT_RWPS }, 119 { "rwps", TREE_ATTR_RWPS, Icon_Wps, VOICE_EXT_RWPS },
120#endif 120#endif
121#ifdef HAVE_LCD_COLOR 121#if LCD_DEPTH > 1
122 { "bmp", TREE_ATTR_BMP, Icon_Wps, VOICE_EXT_WPS }, 122 { "bmp", TREE_ATTR_BMP, Icon_Wps, VOICE_EXT_WPS },
123#endif 123#endif
124#ifdef CONFIG_TUNER 124#ifdef CONFIG_TUNER
@@ -966,7 +966,7 @@ static bool dirbrowse(void)
966#endif 966#endif
967 reload_dir = true; 967 reload_dir = true;
968#endif 968#endif
969#ifdef HAVE_LCD_COLOR 969#if LCD_DEPTH > 1
970 show_main_backdrop(); 970 show_main_backdrop();
971#endif 971#endif
972#ifdef HAVE_TAGCACHE 972#ifdef HAVE_TAGCACHE