From 910101d613c57450ee02b68c2eba531a8c4bcdda Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 19 Jun 2010 20:36:54 +0000 Subject: 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 --- firmware/target/arm/ipod/button-1g-3g.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/target') diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c index 044e887453..9eec8fd823 100644 --- a/firmware/target/arm/ipod/button-1g-3g.c +++ b/firmware/target/arm/ipod/button-1g-3g.c @@ -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 */ -- cgit v1.2.3