Rémi Bernon : xinput1_3: Use the internal WINEXINPUT device interface class.

Alexandre Julliard julliard at winehq.org
Fri Sep 3 16:25:29 CDT 2021


Module: wine
Branch: master
Commit: f299b42738207c18dd66b17366431672f9004341
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f299b42738207c18dd66b17366431672f9004341

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri Sep  3 07:57:39 2021 +0200

xinput1_3: Use the internal WINEXINPUT device interface class.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xinput1_3/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/xinput1_3/main.c b/dlls/xinput1_3/main.c
index 4770b64681e..44493ddb2a1 100644
--- a/dlls/xinput1_3/main.c
+++ b/dlls/xinput1_3/main.c
@@ -43,6 +43,8 @@
 
 #include "wine/debug.h"
 
+DEFINE_GUID(GUID_DEVINTERFACE_WINEXINPUT,0x6c53d5fd,0x6480,0x440f,0xb6,0x18,0x47,0x67,0x50,0xc5,0xe1,0xa6);
+
 /* Not defined in the headers, used only by XInputGetStateEx */
 #define XINPUT_GAMEPAD_GUIDE 0x0400
 
@@ -324,7 +326,7 @@ static void update_controller_list(void)
     GUID guid;
     int i;
 
-    HidD_GetHidGuid(&guid);
+    guid = GUID_DEVINTERFACE_WINEXINPUT;
 
     set = SetupDiGetClassDevsW(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
     detail->cbSize = sizeof(*detail);
@@ -335,8 +337,6 @@ static void update_controller_list(void)
         if (!SetupDiGetDeviceInterfaceDetailW(set, &iface, detail, sizeof(buffer), NULL, NULL))
             continue;
 
-        if (!wcsstr(detail->DevicePath, L"IG_")) continue;
-
         if (find_opened_device(detail, &i)) continue; /* already opened */
         if (i == XUSER_MAX_COUNT) break; /* no more slots */
 




More information about the wine-cvs mailing list