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:
parent
9848bf6159
commit
11b06f0423
2 changed files with 5 additions and 3 deletions
|
|
@ -114,6 +114,7 @@ static inline int ipod_4g_button_read(void)
|
||||||
int new_wheel_value = (status << 9) >> 25;
|
int new_wheel_value = (status << 9) >> 25;
|
||||||
whl = new_wheel_value;
|
whl = new_wheel_value;
|
||||||
backlight_on();
|
backlight_on();
|
||||||
|
reset_poweroff_timer();
|
||||||
/* The queue should have no other events when scrolling */
|
/* The queue should have no other events when scrolling */
|
||||||
if (queue_empty(&button_queue) && old_wheel_value >= 0) {
|
if (queue_empty(&button_queue) && old_wheel_value >= 0) {
|
||||||
|
|
||||||
|
|
@ -137,9 +138,9 @@ static inline int ipod_4g_button_read(void)
|
||||||
if (send_events)
|
if (send_events)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
data = (wheel_delta << 16) | new_wheel_value;
|
data = (wheel_delta << 16) | new_wheel_value;
|
||||||
queue_post(&button_queue, wheel_keycode | wheel_repeat,
|
queue_post(&button_queue, wheel_keycode | wheel_repeat,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wheel_repeat) wheel_repeat = BUTTON_REPEAT;
|
if (!wheel_repeat) wheel_repeat = BUTTON_REPEAT;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ void handle_scroll_wheel(int new_scroll, int was_hold, int reverse)
|
||||||
}
|
}
|
||||||
else if (!was_hold) {
|
else if (!was_hold) {
|
||||||
backlight_on();
|
backlight_on();
|
||||||
|
reset_poweroff_timer();
|
||||||
if (++count == 6) { /* reduce sensitivity */
|
if (++count == 6) { /* reduce sensitivity */
|
||||||
count = 0;
|
count = 0;
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue