summaryrefslogtreecommitdiff
path: root/packages/linux/opensimpad/simpad-switches-input2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/opensimpad/simpad-switches-input2.patch')
-rw-r--r--packages/linux/opensimpad/simpad-switches-input2.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/packages/linux/opensimpad/simpad-switches-input2.patch b/packages/linux/opensimpad/simpad-switches-input2.patch
new file mode 100644
index 0000000000..34529acabb
--- /dev/null
+++ b/packages/linux/opensimpad/simpad-switches-input2.patch
@@ -0,0 +1,41 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- linux-2.4.27/drivers/misc/switches-core.c~simpad-switches-input2
++++ linux-2.4.27/drivers/misc/switches-core.c
+@@ -66,7 +66,32 @@
+ int
+ dummy_k_translate(unsigned char scancode, unsigned char *keycode, char raw_mode)
+ {
+- *keycode = scancode;
++ if (scancode == KEY_UP)
++ *keycode = 144;
++ else if (scancode == KEY_LEFT)
++ *keycode = 146;
++ else if (scancode == KEY_RIGHT)
++ *keycode = 151;
++ else if (scancode == KEY_DOWN)
++ *keycode = 161;
++ else if (scancode == 144)
++ *keycode = KEY_UP;
++ else if (scancode == 146)
++ *keycode = KEY_LEFT;
++ else if (scancode == 151)
++ *keycode = KEY_RIGHT;
++ else if (scancode == 161)
++ *keycode = KEY_DOWN;
++ else if (scancode == KEY_KP8)
++ *keycode = KEY_UP;
++ else if (scancode == KEY_KP4)
++ *keycode = KEY_LEFT;
++ else if (scancode == KEY_KP6)
++ *keycode = KEY_RIGHT;
++ else if (scancode == KEY_KP2)
++ *keycode = KEY_DOWN;
++ else
++ *keycode = scancode;
+ return 1;
+ }
+