diff --git a/apps/settings.c b/apps/settings.c index 118692afe4..8e266b19f1 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -489,7 +489,7 @@ static const struct bit_entry hd_bits[] = {4, S_O(default_codepage), 0, "default codepage", "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,iso8859-6,iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8" }, #ifdef HAVE_BACKLIGHT_BRIGHTNESS - {4, S_O(brightness), 9, "brightness", "2,3,4,5,6,7,8,9,10,11,12,13,14,15"}, + {4, S_O(brightness), 9, "brightness", NULL }, #endif /* If values are just added to the end, no need to bump the version. */ diff --git a/apps/settings.h b/apps/settings.h index 870d9efdd7..4bc0904fe4 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -27,6 +27,10 @@ #include "timefuncs.h" #include "abrepeat.h" +#ifdef HAVE_BACKLIGHT_BRIGHTNESS +#include "backlight.h" /* for [MIN|MAX]_BRIGHTNESS_SETTING */ +#endif + #define ROCKBOX_DIR "/.rockbox" #define ROCKBOX_DIR_LEN 9 #define FONT_DIR "/fonts" @@ -446,10 +450,6 @@ extern const char rec_base_directory[]; #endif #define MIN_CONTRAST_SETTING 5 -#ifdef HAVE_BACKLIGHT_BRIGHTNESS -#define MIN_BRIGHTNESS_SETTING 2 -#define MAX_BRIGHTNESS_SETTING 15 -#endif /* argument bits for settings_load() */ #define SETTINGS_RTC 1 /* only the settings from the RTC nonvolatile RAM */ diff --git a/firmware/backlight.c b/firmware/backlight.c index d118830721..740acd1d82 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -548,6 +548,8 @@ void backlight_set_brightness(int val) /* set H300 brightness by changing the PWM accepts 0..15 but note that 0 and 1 give a black display! */ unsigned char ucVal = (unsigned char)(val & 0x0F); + if(val