summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-04-12 22:12:13 +0000
committerJens Arnold <amiconn@rockbox.org>2007-04-12 22:12:13 +0000
commit47bf6c5a5ad1fd9143ab87328793b285230f74a3 (patch)
tree5199f2225a3dfc438bb1c4c5e9906f14664dfa43 /apps
parent734278b7d1fde5e177c6842f49c16b9df8c353fa (diff)
downloadrockbox-47bf6c5a5ad1fd9143ab87328793b285230f74a3.tar.gz
rockbox-47bf6c5a5ad1fd9143ab87328793b285230f74a3.zip
Moved archos backlight code to target tree. Changed old mutlivalue CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/gwps-common.c2
-rw-r--r--apps/menus/display_menu.c10
-rw-r--r--apps/menus/recording_menu.c2
-rw-r--r--apps/plugins/jpeg.c4
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c4
-rw-r--r--apps/recorder/peakmeter.c6
-rw-r--r--apps/settings.c6
-rw-r--r--apps/settings.h4
-rw-r--r--apps/settings_list.c20
9 files changed, 29 insertions, 29 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index d0d46da837..6c58c1d666 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1901,7 +1901,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
1901 1901
1902 display->update(); 1902 display->update();
1903 1903
1904#if CONFIG_BACKLIGHT 1904#ifdef HAVE_BACKLIGHT
1905 if (global_settings.caption_backlight && state->id3) 1905 if (global_settings.caption_backlight && state->id3)
1906 { 1906 {
1907 /* turn on backlight n seconds before track ends, and turn it off n 1907 /* turn on backlight n seconds before track ends, and turn it off n
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 0189749b18..660c68e996 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -38,7 +38,7 @@
38#include "lcd-remote.h" 38#include "lcd-remote.h"
39 39
40 40
41#if CONFIG_BACKLIGHT 41#ifdef HAVE_BACKLIGHT
42int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) 42int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item)
43{ 43{
44 (void)this_item; 44 (void)this_item;
@@ -77,7 +77,7 @@ int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
77 77
78/***********************************/ 78/***********************************/
79/* LCD MENU */ 79/* LCD MENU */
80#if CONFIG_BACKLIGHT 80#ifdef HAVE_BACKLIGHT
81MENUITEM_SETTING(backlight_timeout, &global_settings.backlight_timeout, NULL); 81MENUITEM_SETTING(backlight_timeout, &global_settings.backlight_timeout, NULL);
82#if CONFIG_CHARGING 82#if CONFIG_CHARGING
83MENUITEM_SETTING(backlight_timeout_plugged, 83MENUITEM_SETTING(backlight_timeout_plugged,
@@ -102,7 +102,7 @@ MENUITEM_SETTING(lcd_sleep_after_backlight_off,
102#ifdef HAVE_BACKLIGHT_BRIGHTNESS 102#ifdef HAVE_BACKLIGHT_BRIGHTNESS
103MENUITEM_SETTING(brightness_item, &global_settings.brightness, NULL); 103MENUITEM_SETTING(brightness_item, &global_settings.brightness, NULL);
104#endif 104#endif
105#endif /* CONFIG_BACKLIGHT */ 105#endif /* HAVE_BACKLIGHT */
106#ifdef HAVE_LCD_CONTRAST 106#ifdef HAVE_LCD_CONTRAST
107MENUITEM_SETTING(contrast, &global_settings.contrast, NULL); 107MENUITEM_SETTING(contrast, &global_settings.contrast, NULL);
108#endif 108#endif
@@ -173,7 +173,7 @@ MENUITEM_FUNCTION(reset_colors, 0, ID2P(LANG_RESET_COLORS),
173/* now the actual menu */ 173/* now the actual menu */
174MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), 174MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
175 NULL, Icon_Display_menu 175 NULL, Icon_Display_menu
176#if CONFIG_BACKLIGHT 176#ifdef HAVE_BACKLIGHT
177 ,&backlight_timeout 177 ,&backlight_timeout
178# if CONFIG_CHARGING 178# if CONFIG_CHARGING
179 ,&backlight_timeout_plugged 179 ,&backlight_timeout_plugged
@@ -192,7 +192,7 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
192# ifdef HAVE_BACKLIGHT_BRIGHTNESS 192# ifdef HAVE_BACKLIGHT_BRIGHTNESS
193 ,&brightness_item 193 ,&brightness_item
194# endif 194# endif
195#endif /* CONFIG_BACKLIGHT */ 195#endif /* HAVE_BACKLIGHT */
196#ifdef HAVE_LCD_CONTRAST 196#ifdef HAVE_LCD_CONTRAST
197 ,&contrast 197 ,&contrast
198#endif 198#endif
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index 084ade0d33..1bc84e90d2 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -822,7 +822,7 @@ MAKE_MENU(recording_setting_menu, ID2P(LANG_RECORDING_SETTINGS), NULL, Icon_Reco
822 &filesplitoptionsmenu, 822 &filesplitoptionsmenu,
823 &rec_prerecord_time, 823 &rec_prerecord_time,
824 &recdirectory, 824 &recdirectory,
825#if CONFIG_BACKLIGHT 825#ifdef HAVE_BACKLIGHT
826 &cliplight, 826 &cliplight,
827#endif 827#endif
828 &rectrigger_item, 828 &rectrigger_item,
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index a330748404..c31d45e8ab 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -3294,7 +3294,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
3294 (actually it should also set the timeout when plugged in, 3294 (actually it should also set the timeout when plugged in,
3295 but the function backlight_set_timeout_plugged is not 3295 but the function backlight_set_timeout_plugged is not
3296 available in plugins) */ 3296 available in plugins) */
3297#if CONFIG_BACKLIGHT 3297#ifdef HAVE_BACKLIGHT
3298 if (rb->global_settings->backlight_timeout > 0) 3298 if (rb->global_settings->backlight_timeout > 0)
3299 rb->backlight_set_timeout(1); 3299 rb->backlight_set_timeout(1);
3300#endif 3300#endif
@@ -3320,7 +3320,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
3320 rb->ata_spindown(rb->global_settings->disk_spindown); 3320 rb->ata_spindown(rb->global_settings->disk_spindown);
3321#endif 3321#endif
3322 3322
3323#if CONFIG_BACKLIGHT 3323#ifdef HAVE_BACKLIGHT
3324 /* reset backlight settings */ 3324 /* reset backlight settings */
3325 rb->backlight_set_timeout(rb->global_settings->backlight_timeout); 3325 rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
3326#endif 3326#endif
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 37723df7a6..b61e76ce8a 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -1645,7 +1645,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1645 (actually it should also set the timeout when plugged in, 1645 (actually it should also set the timeout when plugged in,
1646 but the function backlight_set_timeout_plugged is not 1646 but the function backlight_set_timeout_plugged is not
1647 available in plugins) */ 1647 available in plugins) */
1648#if CONFIG_BACKLIGHT 1648#ifdef HAVE_BACKLIGHT
1649 if (rb->global_settings->backlight_timeout > 0) 1649 if (rb->global_settings->backlight_timeout > 0)
1650 rb->backlight_set_timeout(1); 1650 rb->backlight_set_timeout(1);
1651#endif 1651#endif
@@ -1778,7 +1778,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1778 1778
1779 save_settings(); /* Save settings (if they have changed) */ 1779 save_settings(); /* Save settings (if they have changed) */
1780 1780
1781#if CONFIG_BACKLIGHT 1781#ifdef HAVE_BACKLIGHT
1782 /* reset backlight settings */ 1782 /* reset backlight settings */
1783 rb->backlight_set_timeout(rb->global_settings->backlight_timeout); 1783 rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
1784#endif 1784#endif
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 25e8ec47a8..f06b19ab2d 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -34,7 +34,7 @@
34#include "peakmeter.h" 34#include "peakmeter.h"
35#include "audio.h" 35#include "audio.h"
36#include "screen_access.h" 36#include "screen_access.h"
37#if CONFIG_BACKLIGHT 37#ifdef HAVE_BACKLIGHT
38#include "backlight.h" 38#include "backlight.h"
39#endif 39#endif
40#include "action.h" 40#include "action.h"
@@ -1008,7 +1008,7 @@ void peak_meter_draw(struct screen *display, struct meter_scales *scales,
1008 1008
1009#ifdef HAVE_RECORDING 1009#ifdef HAVE_RECORDING
1010 1010
1011#if CONFIG_BACKLIGHT 1011#ifdef HAVE_BACKLIGHT
1012 /* cliplight */ 1012 /* cliplight */
1013 if ((pm_clip_left || pm_clip_right) && 1013 if ((pm_clip_left || pm_clip_right) &&
1014 global_settings.cliplight && 1014 global_settings.cliplight &&
@@ -1032,7 +1032,7 @@ void peak_meter_draw(struct screen *display, struct meter_scales *scales,
1032 } 1032 }
1033#endif /* HAVE_REMOTE_LCD */ 1033#endif /* HAVE_REMOTE_LCD */
1034 } 1034 }
1035#endif /* CONFIG_BACKLIGHT */ 1035#endif /* HAVE_BACKLIGHT */
1036 1036
1037 if (trig_status != TRIG_OFF) { 1037 if (trig_status != TRIG_OFF) {
1038 int start_trigx, stop_trigx, ycenter; 1038 int start_trigx, stop_trigx, ycenter;
diff --git a/apps/settings.c b/apps/settings.c
index b6eb9a4f64..23b81173bd 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -699,7 +699,7 @@ void settings_apply(void)
699 remote_backlight_set_on_button_hold(global_settings.remote_backlight_on_button_hold); 699 remote_backlight_set_on_button_hold(global_settings.remote_backlight_on_button_hold);
700#endif 700#endif
701#endif /* HAVE_REMOTE_LCD */ 701#endif /* HAVE_REMOTE_LCD */
702#if CONFIG_BACKLIGHT 702#ifdef HAVE_BACKLIGHT
703 backlight_set_timeout(global_settings.backlight_timeout); 703 backlight_set_timeout(global_settings.backlight_timeout);
704#if CONFIG_CHARGING 704#if CONFIG_CHARGING
705 backlight_set_timeout_plugged(global_settings.backlight_timeout_plugged); 705 backlight_set_timeout_plugged(global_settings.backlight_timeout_plugged);
@@ -836,7 +836,7 @@ void settings_apply(void)
836 spdif_power_enable(global_settings.spdif_enable); 836 spdif_power_enable(global_settings.spdif_enable);
837#endif 837#endif
838 838
839#if CONFIG_BACKLIGHT 839#ifdef HAVE_BACKLIGHT
840 set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); 840 set_backlight_filter_keypress(global_settings.bl_filter_first_keypress);
841#ifdef HAVE_REMOTE_LCD 841#ifdef HAVE_REMOTE_LCD
842 set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); 842 set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress);
@@ -847,7 +847,7 @@ void settings_apply(void)
847#ifdef HAVE_LCD_SLEEP 847#ifdef HAVE_LCD_SLEEP
848 lcd_set_sleep_after_backlight_off(global_settings.lcd_sleep_after_backlight_off); 848 lcd_set_sleep_after_backlight_off(global_settings.lcd_sleep_after_backlight_off);
849#endif 849#endif
850#endif /* CONFIG_BACKLIGHT */ 850#endif /* HAVE_BACKLIGHT */
851 851
852 /* This should stay last */ 852 /* This should stay last */
853#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC 853#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
diff --git a/apps/settings.h b/apps/settings.h
index 9921feaba7..33dfb8546a 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -626,7 +626,7 @@ struct user_settings
626#endif 626#endif
627 bool party_mode; /* party mode - unstoppable music */ 627 bool party_mode; /* party mode - unstoppable music */
628 628
629#if CONFIG_BACKLIGHT 629#ifdef HAVE_BACKLIGHT
630 bool bl_filter_first_keypress; /* filter first keypress when dark? */ 630 bool bl_filter_first_keypress; /* filter first keypress when dark? */
631#ifdef HAVE_REMOTE_LCD 631#ifdef HAVE_REMOTE_LCD
632 bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ 632 bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */
@@ -639,7 +639,7 @@ struct user_settings
639 int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight 639 int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight
640 has turned off */ 640 has turned off */
641#endif 641#endif
642#endif /* CONFIG_BACKLIGHT */ 642#endif /* HAVE_BACKLIGHT */
643 643
644#ifdef HAVE_LCD_BITMAP 644#ifdef HAVE_LCD_BITMAP
645 unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ 645 unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 2b9457e1b0..3e4e3fb49a 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -107,7 +107,7 @@ static void rectime_formatter(char *buffer, int buffer_size,
107 107
108#endif /* HAVE_RECORDING */ 108#endif /* HAVE_RECORDING */
109 109
110#if CONFIG_BACKLIGHT 110#ifdef HAVE_BACKLIGHT
111static const char backlight_times_conf [] = 111static const char backlight_times_conf [] =
112 "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90"; 112 "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90";
113static const int backlight_times[] = 113static const int backlight_times[] =
@@ -405,7 +405,7 @@ const struct settings_list settings[] = {
405 { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING, 405 { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING,
406 MAX_CONTRAST_SETTING, 1, NULL, NULL}}}}, 406 MAX_CONTRAST_SETTING, 1, NULL, NULL}}}},
407#endif 407#endif
408#if CONFIG_BACKLIGHT 408#ifdef HAVE_BACKLIGHT
409 INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout, LANG_BACKLIGHT, 6, 409 INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout, LANG_BACKLIGHT, 6,
410 "backlight timeout", backlight_times_conf, UNIT_SEC, 410 "backlight timeout", backlight_times_conf, UNIT_SEC,
411 0, 18, 1, backlight_formatter, backlight_getlang, 411 0, 18, 1, backlight_formatter, backlight_getlang,
@@ -417,7 +417,7 @@ const struct settings_list settings[] = {
417 0, 18, 1, backlight_formatter, backlight_getlang, 417 0, 18, 1, backlight_formatter, backlight_getlang,
418 backlight_set_timeout_plugged), 418 backlight_set_timeout_plugged),
419#endif 419#endif
420#endif /* CONFIG_BACKLIGHT */ 420#endif /* HAVE_BACKLIGHT */
421#ifdef HAVE_LCD_BITMAP 421#ifdef HAVE_LCD_BITMAP
422 BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on, 422 BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
423 LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_set_invert_display), 423 LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_set_invert_display),
@@ -512,7 +512,7 @@ const struct settings_list settings[] = {
512#endif 512#endif
513#endif 513#endif
514 514
515#if CONFIG_BACKLIGHT 515#ifdef HAVE_BACKLIGHT
516 OFFON_SETTING(0,bl_filter_first_keypress, 516 OFFON_SETTING(0,bl_filter_first_keypress,
517 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, 517 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
518 "backlight filters first keypress", NULL), 518 "backlight filters first keypress", NULL),
@@ -521,18 +521,18 @@ const struct settings_list settings[] = {
521 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, 521 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
522 "backlight filters first remote keypress", NULL), 522 "backlight filters first remote keypress", NULL),
523#endif 523#endif
524#endif /* CONFIG_BACKLIGHT */ 524#endif /* HAVE_BACKLIGHT */
525 525
526/** End of old RTC config block **/ 526/** End of old RTC config block **/
527 527
528#if CONFIG_BACKLIGHT 528#ifdef HAVE_BACKLIGHT
529 OFFON_SETTING(0,caption_backlight, LANG_CAPTION_BACKLIGHT, 529 OFFON_SETTING(0,caption_backlight, LANG_CAPTION_BACKLIGHT,
530 false,"caption backlight",NULL), 530 false,"caption backlight",NULL),
531#ifdef HAVE_REMOTE_LCD 531#ifdef HAVE_REMOTE_LCD
532 OFFON_SETTING(0,remote_caption_backlight, LANG_CAPTION_BACKLIGHT, 532 OFFON_SETTING(0,remote_caption_backlight, LANG_CAPTION_BACKLIGHT,
533 false,"remote caption backlight",NULL), 533 false,"remote caption backlight",NULL),
534#endif 534#endif
535#endif /* CONFIG_BACKLIGHT */ 535#endif /* HAVE_BACKLIGHT */
536#ifdef HAVE_BACKLIGHT_BRIGHTNESS 536#ifdef HAVE_BACKLIGHT_BRIGHTNESS
537 INT_SETTING(0, brightness, LANG_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING, 537 INT_SETTING(0, brightness, LANG_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING,
538 "brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1, 538 "brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
@@ -759,7 +759,7 @@ const struct settings_list settings[] = {
759 UNIT_SEC, 0, 30, 1, rectime_formatter, rectime_getlang, NULL), 759 UNIT_SEC, 0, 30, 1, rectime_formatter, rectime_getlang, NULL),
760 {F_T_INT,&global_settings.rec_directory,LANG_RECORD_DIRECTORY, 760 {F_T_INT,&global_settings.rec_directory,LANG_RECORD_DIRECTORY,
761 INT(0),"rec directory",REC_BASE_DIR ",current",UNUSED}, 761 INT(0),"rec directory",REC_BASE_DIR ",current",UNUSED},
762#if CONFIG_BACKLIGHT 762#ifdef HAVE_BACKLIGHT
763 CHOICE_SETTING(0, cliplight, LANG_CLIP_LIGHT, 0 , 763 CHOICE_SETTING(0, cliplight, LANG_CLIP_LIGHT, 0 ,
764 "cliplight", "off,main,both,remote", NULL, 764 "cliplight", "off,main,both,remote", NULL,
765#ifdef HAVE_REMOTE_LCD 765#ifdef HAVE_REMOTE_LCD
@@ -974,7 +974,7 @@ const struct settings_list settings[] = {
974 LANG_WARN_ERASEDYNPLAYLIST_MENU,false, 974 LANG_WARN_ERASEDYNPLAYLIST_MENU,false,
975 "warn when erasing dynamic playlist",NULL), 975 "warn when erasing dynamic playlist",NULL),
976 976
977#if CONFIG_BACKLIGHT 977#ifdef HAVE_BACKLIGHT
978#ifdef HAS_BUTTON_HOLD 978#ifdef HAS_BUTTON_HOLD
979 CHOICE_SETTING(0, backlight_on_button_hold, 979 CHOICE_SETTING(0, backlight_on_button_hold,
980 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold", 980 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold",
@@ -991,7 +991,7 @@ const struct settings_list settings[] = {
991 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC), 991 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
992 TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC)), 992 TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC)),
993#endif 993#endif
994#endif /* CONFIG_BACKLIGHT */ 994#endif /* HAVE_BACKLIGHT */
995 995
996#ifdef HAVE_WM8758 996#ifdef HAVE_WM8758
997 OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false, 997 OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false,