iPod 3G: Add a small check to ensure backlight never gets stuck off if wheel is inactive for too long (because it limits the number of backlight_on calls).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26964 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-06-19 20:36:54 +00:00
parent 4932362e11
commit 910101d613

View file

@ -151,6 +151,9 @@ static void handle_scroll_wheel(int new_scroll, int was_hold)
if (v < WHEEL_SMOOTHING_VELOCITY) {
/* very slow - no smoothing */
wheel_velocity = v;
/* ensure backlight never gets stuck for an extended period if tick
* wrapped such that next poke is very far ahead */
next_backlight_on = current_tick - 1;
}
else {
/* some velocity filtering to smooth things out */