mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
erosq: Fix scrollwheel regression introduced in 125e97b0
Change-Id: Ie1a53d7140ffb09d8e3a19a41617fdc51344a619
This commit is contained in:
parent
611c18704c
commit
8029c89808
1 changed files with 11 additions and 5 deletions
|
|
@ -109,17 +109,23 @@ int button_read_device(void)
|
||||||
/* map linux event code to rockbox button bitmap */
|
/* map linux event code to rockbox button bitmap */
|
||||||
if(press)
|
if(press)
|
||||||
{
|
{
|
||||||
button_bitmap |= button_map(keycode);
|
int bmap = button_map(keycode);
|
||||||
|
#if defined(BUTTON_SCROLL_BACK)
|
||||||
|
/* Keep track of when the last wheel tick happened */
|
||||||
|
if (bmap & (BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD))
|
||||||
|
last_tick = current_tick;
|
||||||
|
#endif
|
||||||
|
button_bitmap |= bmap;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int bmap = button_map(keycode);
|
||||||
#if defined(BUTTON_SCROLL_BACK)
|
#if defined(BUTTON_SCROLL_BACK)
|
||||||
/* Wheel gives us press+release back to back; ignore the release */
|
/* Wheel gives us press+release back to back; ignore the release */
|
||||||
int bmap = button_map(keycode) & ~(BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD);
|
bmap &= ~(BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD);
|
||||||
button_bitmap &= ~bmap;
|
|
||||||
#else
|
|
||||||
button_bitmap &= ~button_map(keycode);
|
|
||||||
#endif
|
#endif
|
||||||
|
button_bitmap &= ~bmap;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue