Fix simulator brightness calculation in case MIN_BRIGHTNESS_SETTING != 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30870 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
10832b8c1c
commit
539fb71b9d
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ bool _backlight_init(void)
|
|||
static inline int normalize_backlight(int val)
|
||||
{
|
||||
/* normalize to xx% brightness for sdl */
|
||||
return ((val - MIN_BRIGHTNESS_SETTING + 1) * 100)/MAX_BRIGHTNESS_SETTING;
|
||||
return ((val - MIN_BRIGHTNESS_SETTING + 1) * 100) /
|
||||
(MAX_BRIGHTNESS_SETTING - MIN_BRIGHTNESS_SETTING + 1);
|
||||
}
|
||||
|
||||
void _backlight_set_brightness(int val)
|
||||
|
|
Loading…
Reference in a new issue