1
0
Fork 0
forked from len0rd/rockbox

e200: Make sure backlight will never get stuck off for long periods from the wheel.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14210 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-08-06 12:58:38 +00:00
parent 47de383d59
commit 89b53bfdaa

View file

@ -188,11 +188,12 @@ void clickwheel_int(void)
wheel_delta = 1;
}
if (TIME_AFTER(usec, next_backlight_on))
if (TIME_AFTER(current_tick, next_backlight_on) ||
v <= 0xffffff/(1000000/4))
{
/* poke backlight to turn it on or maintain it no more often
than every 1/4 second*/
next_backlight_on = usec + 1000000/4;
next_backlight_on = current_tick + 1000000/4;
backlight_on();
button_backlight_on();
}