diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-08-06 12:58:38 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-08-06 12:58:38 +0000 |
commit | 89b53bfdaa45057503556871b84621eb14409d59 (patch) | |
tree | c85de97fc95f50377d72032b4ca22fbacff073d1 | |
parent | 47de383d598cf84996f6879599b3a8f4b7cefe5d (diff) |
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
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/button-e200.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/button-e200.c b/firmware/target/arm/sandisk/sansa-e200/button-e200.c index 734416bf28..bb90a15096 100644 --- a/firmware/target/arm/sandisk/sansa-e200/button-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/button-e200.c @@ -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(); } |