[PATCH 4/7] dinput: Pretend that DIPROP_AUTOCENTER is supported.
Rémi Bernon
rbernon at codeweavers.com
Mon Nov 8 02:35:00 CST 2021
Star Wars Episode I Racer will ignore force-feedback joystick devices if
we return an error here.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/dinput/device.c | 3 ++-
dlls/dinput8/tests/hid.c | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index c79b182bc66..dff1f3426d3 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1082,7 +1082,8 @@ static HRESULT WINAPI dinput_device_SetProperty( IDirectInputDevice8W *iface, co
EnterCriticalSection( &impl->crit );
if (impl->acquired) hr = DIERR_ACQUIRED;
else if (value->dwData > DIPROPAUTOCENTER_ON) hr = DIERR_INVALIDPARAM;
- else hr = DIERR_UNSUPPORTED;
+ else if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) hr = DIERR_UNSUPPORTED;
+ else hr = DI_OK;
LeaveCriticalSection( &impl->crit );
return hr;
}
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index af8d48dfc90..a0e202ba804 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -7360,7 +7360,6 @@ static void test_force_feedback_joystick( void )
prop_dword.diph.dwObj = 0;
prop_dword.dwData = DIPROPAUTOCENTER_ON;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
- todo_wine
ok( hr == DI_OK, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
--
2.33.1
More information about the wine-devel
mailing list