mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
Ignore diagonals for iMON PAD in keyboard mode
For user with an iMON PAD Remote, the keyboard mode is very touchy and almost useless with XBMC. To make it less touchy, I make it ignore the diagonals.
This commit is contained in:
parent
3e389e4b21
commit
dadfd3d296
20
packages/linux/patches/3.16.1/linux-062-imon_pad_ignore_diagonal.patch
vendored
Normal file
20
packages/linux/patches/3.16.1/linux-062-imon_pad_ignore_diagonal.patch
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/drivers/media/rc/imon.c 2014-06-29 15:15:50.187264025 -0400
|
||||
+++ b/drivers/media/rc/imon.c 2014-06-29 15:15:35.731220648 -0400
|
||||
@@ -1406,6 +1415,16 @@
|
||||
buf[3] = (dir >> 8) & 0xFF;
|
||||
scancode = be32_to_cpu(*((u32 *)buf));
|
||||
} else {
|
||||
+ /*
|
||||
+ * For users without stabilized, just ignore any value getting
|
||||
+ * to close to the diagonal.
|
||||
+ */
|
||||
+ if ((abs(rel_y) < 2 && abs(rel_x) < 2) ||
|
||||
+ abs(abs(rel_y) - abs(rel_x)) < 2 ) {
|
||||
+ spin_lock_irqsave(&ictx->kc_lock, flags);
|
||||
+ ictx->kc = KEY_UNKNOWN;
|
||||
+ spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
+ return;
|
||||
+ }
|
||||
/*
|
||||
* Hack alert: instead of using keycodes, we have
|
||||
* to use hard-coded scancodes here...
|
Loading…
x
Reference in New Issue
Block a user