1
0
Fork 0
forked from len0rd/rockbox

iPods: Touching the wheel now resets the poweroff timer, so the iPod no longer shuts down unexpectedly while operating the wheel only, e.g. in the text viewer.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12068 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2007-01-18 22:10:29 +00:00
parent 9848bf6159
commit 11b06f0423
2 changed files with 5 additions and 3 deletions

View file

@ -114,6 +114,7 @@ static inline int ipod_4g_button_read(void)
int new_wheel_value = (status << 9) >> 25;
whl = new_wheel_value;
backlight_on();
reset_poweroff_timer();
/* The queue should have no other events when scrolling */
if (queue_empty(&button_queue) && old_wheel_value >= 0) {
@ -137,9 +138,9 @@ static inline int ipod_4g_button_read(void)
if (send_events)
#endif
{
data = (wheel_delta << 16) | new_wheel_value;
queue_post(&button_queue, wheel_keycode | wheel_repeat,
data);
data = (wheel_delta << 16) | new_wheel_value;
queue_post(&button_queue, wheel_keycode | wheel_repeat,
data);
}
if (!wheel_repeat) wheel_repeat = BUTTON_REPEAT;

View file

@ -70,6 +70,7 @@ void handle_scroll_wheel(int new_scroll, int was_hold, int reverse)
}
else if (!was_hold) {
backlight_on();
reset_poweroff_timer();
if (++count == 6) { /* reduce sensitivity */
count = 0;
switch (direction) {