Fix xbox 360 wireless fallback mapping

This commit is contained in:
Iwan Timmer
2017-07-04 20:06:29 +02:00
parent 9cd09b36e0
commit 76cf6f6339

View File

@@ -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);