From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/device.c | 2 +- dlls/dinput/tests/device.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 9e7cb20453c..f4bdce51633 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1394,9 +1394,9 @@ static HRESULT WINAPI dinput_device_set_property( IDirectInputDevice8W *iface, c case (DWORD_PTR)DIPROP_FFGAIN: { const DIPROPDWORD *value = (const DIPROPDWORD *)header; - if (!impl->vtbl->send_device_gain) return DIERR_UNSUPPORTED; impl->device_gain = value->dwData; if (!is_exclusively_acquired( impl )) return DI_OK; + if (!impl->vtbl->send_device_gain) return DI_OK; return impl->vtbl->send_device_gain( iface, impl->device_gain ); } case (DWORD_PTR)DIPROP_AXISMODE: diff --git a/dlls/dinput/tests/device.c b/dlls/dinput/tests/device.c index 41a0299e70e..6bb1111b2ce 100644 --- a/dlls/dinput/tests/device.c +++ b/dlls/dinput/tests/device.c @@ -1739,14 +1739,14 @@ static void test_mouse_info(void) hr = IDirectInputDevice8_GetProperty( device, DIPROP_KEYNAME, &prop_string.diph ); ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_KEYNAME returned %#lx\n", hr );
- prop_range.diph.dwHow = DIPH_DEVICE; - prop_range.diph.dwObj = 0; + prop_dword.diph.dwHow = DIPH_DEVICE; + prop_dword.diph.dwObj = 0; prop_dword.dwData = 0xdeadbeef; hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph ); - ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); + ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); prop_dword.dwData = 1000; hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph ); - ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); + ok( hr == DI_OK, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr );
res = 0; hr = IDirectInputDevice8_EnumObjects( device, check_object_count, &res, DIDFT_AXIS | DIDFT_PSHBUTTON ); @@ -2074,14 +2074,14 @@ static void test_keyboard_info(void) hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph ); ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_RANGE returned %#lx\n", hr );
- prop_range.diph.dwHow = DIPH_DEVICE; - prop_range.diph.dwObj = 0; + prop_dword.diph.dwHow = DIPH_DEVICE; + prop_dword.diph.dwObj = 0; prop_dword.dwData = 0xdeadbeef; hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph ); - ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); + ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); prop_dword.dwData = 1000; hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph ); - ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr ); + ok( hr == DI_OK, "SetProperty DIPROP_FFGAIN returned %#lx\n", hr );
res = 0; hr = IDirectInputDevice8_EnumObjects( device, check_object_count, &res, DIDFT_AXIS | DIDFT_PSHBUTTON );