From 47bf6c5a5ad1fd9143ab87328793b285230f74a3 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 12 Apr 2007 22:12:13 +0000 Subject: 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 --- apps/gui/gwps-common.c | 2 +- apps/menus/display_menu.c | 10 +++++----- apps/menus/recording_menu.c | 2 +- apps/plugins/jpeg.c | 4 ++-- apps/plugins/mpegplayer/mpegplayer.c | 4 ++-- apps/recorder/peakmeter.c | 6 +++--- apps/settings.c | 6 +++--- apps/settings.h | 4 ++-- apps/settings_list.c | 20 ++++++++++---------- 9 files changed, 29 insertions(+), 29 deletions(-) (limited to 'apps') 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, display->update(); -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT if (global_settings.caption_backlight && state->id3) { /* 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 @@ #include "lcd-remote.h" -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) { (void)this_item; @@ -77,7 +77,7 @@ int flipdisplay_callback(int action,const struct menu_item_ex *this_item) /***********************************/ /* LCD MENU */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT MENUITEM_SETTING(backlight_timeout, &global_settings.backlight_timeout, NULL); #if CONFIG_CHARGING MENUITEM_SETTING(backlight_timeout_plugged, @@ -102,7 +102,7 @@ MENUITEM_SETTING(lcd_sleep_after_backlight_off, #ifdef HAVE_BACKLIGHT_BRIGHTNESS MENUITEM_SETTING(brightness_item, &global_settings.brightness, NULL); #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_LCD_CONTRAST MENUITEM_SETTING(contrast, &global_settings.contrast, NULL); #endif @@ -173,7 +173,7 @@ MENUITEM_FUNCTION(reset_colors, 0, ID2P(LANG_RESET_COLORS), /* now the actual menu */ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), NULL, Icon_Display_menu -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT ,&backlight_timeout # if CONFIG_CHARGING ,&backlight_timeout_plugged @@ -192,7 +192,7 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), # ifdef HAVE_BACKLIGHT_BRIGHTNESS ,&brightness_item # endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_LCD_CONTRAST ,&contrast #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 &filesplitoptionsmenu, &rec_prerecord_time, &recdirectory, -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT &cliplight, #endif &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) (actually it should also set the timeout when plugged in, but the function backlight_set_timeout_plugged is not available in plugins) */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT if (rb->global_settings->backlight_timeout > 0) rb->backlight_set_timeout(1); #endif @@ -3320,7 +3320,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->ata_spindown(rb->global_settings->disk_spindown); #endif -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT /* reset backlight settings */ rb->backlight_set_timeout(rb->global_settings->backlight_timeout); #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) (actually it should also set the timeout when plugged in, but the function backlight_set_timeout_plugged is not available in plugins) */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT if (rb->global_settings->backlight_timeout > 0) rb->backlight_set_timeout(1); #endif @@ -1778,7 +1778,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) save_settings(); /* Save settings (if they have changed) */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT /* reset backlight settings */ rb->backlight_set_timeout(rb->global_settings->backlight_timeout); #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 @@ #include "peakmeter.h" #include "audio.h" #include "screen_access.h" -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT #include "backlight.h" #endif #include "action.h" @@ -1008,7 +1008,7 @@ void peak_meter_draw(struct screen *display, struct meter_scales *scales, #ifdef HAVE_RECORDING -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT /* cliplight */ if ((pm_clip_left || pm_clip_right) && global_settings.cliplight && @@ -1032,7 +1032,7 @@ void peak_meter_draw(struct screen *display, struct meter_scales *scales, } #endif /* HAVE_REMOTE_LCD */ } -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ if (trig_status != TRIG_OFF) { 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) remote_backlight_set_on_button_hold(global_settings.remote_backlight_on_button_hold); #endif #endif /* HAVE_REMOTE_LCD */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT backlight_set_timeout(global_settings.backlight_timeout); #if CONFIG_CHARGING backlight_set_timeout_plugged(global_settings.backlight_timeout_plugged); @@ -836,7 +836,7 @@ void settings_apply(void) spdif_power_enable(global_settings.spdif_enable); #endif -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); #ifdef HAVE_REMOTE_LCD set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); @@ -847,7 +847,7 @@ void settings_apply(void) #ifdef HAVE_LCD_SLEEP lcd_set_sleep_after_backlight_off(global_settings.lcd_sleep_after_backlight_off); #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ /* This should stay last */ #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 #endif bool party_mode; /* party mode - unstoppable music */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT bool bl_filter_first_keypress; /* filter first keypress when dark? */ #ifdef HAVE_REMOTE_LCD bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ @@ -639,7 +639,7 @@ struct user_settings int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight has turned off */ #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_LCD_BITMAP 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, #endif /* HAVE_RECORDING */ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT static const char backlight_times_conf [] = "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90"; static const int backlight_times[] = @@ -405,7 +405,7 @@ const struct settings_list settings[] = { { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING, MAX_CONTRAST_SETTING, 1, NULL, NULL}}}}, #endif -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout, LANG_BACKLIGHT, 6, "backlight timeout", backlight_times_conf, UNIT_SEC, 0, 18, 1, backlight_formatter, backlight_getlang, @@ -417,7 +417,7 @@ const struct settings_list settings[] = { 0, 18, 1, backlight_formatter, backlight_getlang, backlight_set_timeout_plugged), #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_LCD_BITMAP BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on, LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_set_invert_display), @@ -512,7 +512,7 @@ const struct settings_list settings[] = { #endif #endif -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT OFFON_SETTING(0,bl_filter_first_keypress, LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, "backlight filters first keypress", NULL), @@ -521,18 +521,18 @@ const struct settings_list settings[] = { LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, "backlight filters first remote keypress", NULL), #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ /** End of old RTC config block **/ -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT OFFON_SETTING(0,caption_backlight, LANG_CAPTION_BACKLIGHT, false,"caption backlight",NULL), #ifdef HAVE_REMOTE_LCD OFFON_SETTING(0,remote_caption_backlight, LANG_CAPTION_BACKLIGHT, false,"remote caption backlight",NULL), #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_BACKLIGHT_BRIGHTNESS INT_SETTING(0, brightness, LANG_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING, "brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1, @@ -759,7 +759,7 @@ const struct settings_list settings[] = { UNIT_SEC, 0, 30, 1, rectime_formatter, rectime_getlang, NULL), {F_T_INT,&global_settings.rec_directory,LANG_RECORD_DIRECTORY, INT(0),"rec directory",REC_BASE_DIR ",current",UNUSED}, -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT CHOICE_SETTING(0, cliplight, LANG_CLIP_LIGHT, 0 , "cliplight", "off,main,both,remote", NULL, #ifdef HAVE_REMOTE_LCD @@ -974,7 +974,7 @@ const struct settings_list settings[] = { LANG_WARN_ERASEDYNPLAYLIST_MENU,false, "warn when erasing dynamic playlist",NULL), -#if CONFIG_BACKLIGHT +#ifdef HAVE_BACKLIGHT #ifdef HAS_BUTTON_HOLD CHOICE_SETTING(0, backlight_on_button_hold, LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold", @@ -991,7 +991,7 @@ const struct settings_list settings[] = { TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC), TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC)), #endif -#endif /* CONFIG_BACKLIGHT */ +#endif /* HAVE_BACKLIGHT */ #ifdef HAVE_WM8758 OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false, -- cgit v1.2.3