From 76cf6f633949c35a6e4d99c201b45f990c411400 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Tue, 4 Jul 2017 20:06:29 +0200 Subject: [PATCH] Fix xbox 360 wireless fallback mapping --- src/input/evdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/evdev.c b/src/input/evdev.c index fa4da73..e87dc0f 100644 --- a/src/input/evdev.c +++ b/src/input/evdev.c @@ -453,12 +453,12 @@ void evdev_create(const char* device, struct mapping* mappings, bool verbose) { } else if (strncmp("default", mappings->guid, 32) == 0) default_mapping = mappings; else if (strncmp("xwc", mappings->guid, 32) == 0) - default_mapping = mappings; + xwc_mapping = mappings; mappings = mappings->next; } - if (mappings != NULL && strstr(name, "Xbox 360 Wireless Receiver") != NULL) + if (mappings == NULL && strstr(name, "Xbox 360 Wireless Receiver") != NULL) mappings = xwc_mapping; bool is_keyboard = libevdev_has_event_code(evdev, EV_KEY, KEY_Q);