Module: wine Branch: master Commit: 565c2dcf2aef1a555ff1025f230b4708df24d311 URL: https://source.winehq.org/git/wine.git/?a=commit;h=565c2dcf2aef1a555ff1025f2...
Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Aug 15 10:08:46 2018 -0500
dinput: Fix mac build.
Signed-off-by: Andrew Eikum aeikum@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dinput/joystick_osx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 282b6c2..2b2aade 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -988,16 +988,19 @@ static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS { char name[MAX_PATH]; char friendly[32]; + IOHIDDeviceRef device;
TRACE("dwDevType %u dwFlags 0x%08x version 0x%04x id %d\n", dwDevType, dwFlags, version, id);
if (id >= find_joystick_devices()) return E_FAIL;
+ device = get_device_ref(id); + if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { + if (dwFlags & DIEDFL_FORCEFEEDBACK) { - IOHIDDeviceRef device = get_device_ref(id); if(!device) return S_FALSE; if(get_ff(device, NULL) != S_OK)