mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
dx90: fix spurious button events
The kernel on this device reports nonexistent key presses, in particular it reports right presses when pressing the left button... Since when it happens, the right press comes after the left one, the new code simply ignores any right press when the left button in pressed. Change-Id: Ib6ced02682d9cecf4c7f6c58834907a667419cd7
This commit is contained in:
parent
ee7dfb526e
commit
187ce123f1
1 changed files with 4 additions and 4 deletions
|
|
@ -82,11 +82,11 @@ int handle_button_event(__u16 code, __s32 value, int last_btns)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (button == BUTTON_RIGHT)
|
if(button == BUTTON_RIGHT && ((last_btns & BUTTON_LEFT) == BUTTON_LEFT))
|
||||||
&& ((last_btns & BUTTON_LEFT) == BUTTON_LEFT)
|
|
||||||
&& (value == EVENT_VALUE_BUTTON_RELEASE))
|
|
||||||
{
|
{
|
||||||
/* Workaround for a wrong feedback, only present with DX90. */
|
/* Workaround for a wrong feedback, only present with DX90: the kernel
|
||||||
|
* sometimes report right press in the middle of a [left press, left release]
|
||||||
|
* interval, which is clearly wrong. */
|
||||||
button = BUTTON_LEFT;
|
button = BUTTON_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue