From dbc30fe07f945af43540be27f49a4bd5ebb9feb4 Mon Sep 17 00:00:00 2001 From: kozec Date: Sun, 30 Jul 2017 23:31:33 +0200 Subject: [PATCH] Fix: Skip js devices when enumerating, use evdev stuff only. Ref #2 --- dumbxinputemu/dinput_input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dumbxinputemu/dinput_input.c b/dumbxinputemu/dinput_input.c index c20a323..a78ce69 100644 --- a/dumbxinputemu/dinput_input.c +++ b/dumbxinputemu/dinput_input.c @@ -261,6 +261,12 @@ static BOOL CALLBACK dinput_enum_callback(const DIDEVICEINSTANCEA *instance, voi LPDIRECTINPUTDEVICE8A device; HRESULT hr; + if(strstr(instance->tszProductName, "(js)") != NULL) + { + // Skip 'js' devices, use only evdev + return DIENUM_CONTINUE; + } + if (dinput.mapped == sizeof(controllers) / sizeof(*controllers)) return DIENUM_STOP;