summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-05-02 21:25:10 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-05-14 23:32:36 +0100
commit187ce123f1d7fa75de91c9a2ed8c0f54992b9859 (patch)
tree857d33d9a796c8bd51e44659e3cd1528c01d0612
parentee7dfb526e3b2496e0aff366456fb6c1668e6e17 (diff)
downloadrockbox-187ce123f1d7fa75de91c9a2ed8c0f54992b9859.tar.gz
rockbox-187ce123f1d7fa75de91c9a2ed8c0f54992b9859.zip
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
-rw-r--r--firmware/target/hosted/ibasso/dx90/button-dx90.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/hosted/ibasso/dx90/button-dx90.c b/firmware/target/hosted/ibasso/dx90/button-dx90.c
index 27e4be0c1e..a25bcc30b5 100644
--- a/firmware/target/hosted/ibasso/dx90/button-dx90.c
+++ b/firmware/target/hosted/ibasso/dx90/button-dx90.c
@@ -82,11 +82,11 @@ int handle_button_event(__u16 code, __s32 value, int last_btns)
82 } 82 }
83 } 83 }
84 84
85 if( (button == BUTTON_RIGHT) 85 if(button == BUTTON_RIGHT && ((last_btns & BUTTON_LEFT) == BUTTON_LEFT))
86 && ((last_btns & BUTTON_LEFT) == BUTTON_LEFT)
87 && (value == EVENT_VALUE_BUTTON_RELEASE))
88 { 86 {
89 /* Workaround for a wrong feedback, only present with DX90. */ 87 /* Workaround for a wrong feedback, only present with DX90: the kernel
88 * sometimes report right press in the middle of a [left press, left release]
89 * interval, which is clearly wrong. */
90 button = BUTTON_LEFT; 90 button = BUTTON_LEFT;
91 } 91 }
92 92