Fix red, moved around a bit to much.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24291 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
93bba47001
commit
b5e1a1cc59
1 changed files with 19 additions and 8 deletions
|
@ -30,17 +30,28 @@ extern void lcd_awake(void);
|
|||
/* in uisimulator/sdl/lcd-bitmap.c and lcd-charcell.c */
|
||||
extern void sim_backlight(int value);
|
||||
|
||||
bool _backlight_init(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
|
||||
static inline int normalize_backlight(int val)
|
||||
{
|
||||
/* normalize to xx% brightness for sdl */
|
||||
return ((val - MIN_BRIGHTNESS_SETTING + 1) * 100)/MAX_BRIGHTNESS_SETTING;
|
||||
}
|
||||
|
||||
bool _backlight_init(void)
|
||||
void _backlight_set_brightness(int val)
|
||||
{
|
||||
return true;
|
||||
sim_backlight(normalize_backlight(val));
|
||||
}
|
||||
|
||||
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
|
||||
|
||||
void _backlight_on(void)
|
||||
{
|
||||
#if defined(HAVE_LCD_ENABLE)
|
||||
|
@ -51,7 +62,12 @@ void _backlight_on(void)
|
|||
#if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING)
|
||||
/* if we set the brightness to the settings value, then fading up
|
||||
* is glitchy */
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
sim_backlight(normalize_backlight(backlight_brightness));
|
||||
#else
|
||||
sim_backlight(100);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -63,12 +79,7 @@ void _backlight_off(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
void _backlight_set_brightness(int val)
|
||||
{
|
||||
sim_backlight(normalize_backlight(val));
|
||||
}
|
||||
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void _buttonlight_on(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue