Rémi Bernon : dinput: Enumerate HID joystick with dinput <= 7 and device type 0.

Alexandre Julliard julliard at winehq.org
Mon Nov 8 15:45:05 CST 2021


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Nov  8 09:34:58 2021 +0100

dinput: Enumerate HID joystick with dinput <= 7 and device type 0.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51953
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput/joystick_hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index d7e64af9928..610a75871f1 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1470,7 +1470,7 @@ HRESULT hid_joystick_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *in
 
     if (instance->dwSize != sizeof(DIDEVICEINSTANCEW))
         return S_FALSE;
-    if (version < 0x0800 && type != DIDEVTYPE_JOYSTICK)
+    if (version < 0x0800 && type != 0 && type != DIDEVTYPE_JOYSTICK)
         return S_FALSE;
     if (version >= 0x0800 && type != DI8DEVCLASS_ALL && type != DI8DEVCLASS_GAMECTRL)
         return S_FALSE;




More information about the wine-cvs mailing list