Skip to content

Instantly share code, notes, and snippets.

@pamaury
Created May 2, 2016 18:46
Show Gist options
  • Save pamaury/b7136bfab5a1733420c240502078d347 to your computer and use it in GitHub Desktop.
Save pamaury/b7136bfab5a1733420c240502078d347 to your computer and use it in GitHub Desktop.
--------------- firmware/target/hosted/ibasso/dx90/button-dx90.c ---------------
index 27e4be0..a25bcc3 100644
@@ -82,11 +82,11 @@ int handle_button_event(__u16 code, __s32 value, int last_btns)
}
}
- if( (button == BUTTON_RIGHT)
- && ((last_btns & BUTTON_LEFT) == BUTTON_LEFT)
- && (value == EVENT_VALUE_BUTTON_RELEASE))
+ if(button == BUTTON_RIGHT && ((last_btns & BUTTON_LEFT) == BUTTON_LEFT))
{
- /* 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment