Rémi Bernon : dinput: Implement GetProperty with DIPROP_FFGAIN stub.
Alexandre Julliard
julliard at winehq.org
Tue Oct 19 16:07:46 CDT 2021
Module: wine
Branch: master
Commit: 7402568a45c914cb16eca7f8d576146539e1efed
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7402568a45c914cb16eca7f8d576146539e1efed
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Oct 19 09:20:03 2021 +0200
dinput: Implement GetProperty with DIPROP_FFGAIN stub.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput/device.c | 7 +++++++
dlls/dinput8/tests/device.c | 4 ----
dlls/dinput8/tests/hid.c | 4 ----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 75ca6676bec..54645fa995e 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1280,6 +1280,13 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty( IDirectInputDevice8W *iface
}
return S_FALSE;
}
+ case (DWORD_PTR)DIPROP_FFGAIN:
+ {
+ DIPROPDWORD *value = (DIPROPDWORD *)header;
+ if (header->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM;
+ value->dwData = 10000;
+ return DI_OK;
+ }
case (DWORD_PTR)DIPROP_CALIBRATION:
return DIERR_INVALIDPARAM;
default:
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 9f331c1b84c..4492170673e 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -1315,9 +1315,7 @@ static void test_mouse_info(void)
ok( prop_dword.dwData == 0, "got %#x expected %#x\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
- todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
- todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_SetDataFormat( device, &c_dfDIMouse2 );
@@ -1638,9 +1636,7 @@ static void test_keyboard_info(void)
ok( prop_dword.dwData == 0, "got %#x expected %#x\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
- todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
- todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_SetDataFormat( device, &c_dfDIKeyboard );
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index 8bb463b2fd7..b23d3a6bfd8 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -3992,9 +3992,7 @@ static void test_simple_joystick(void)
ok( prop_dword.dwData == 0, "got %#x expected %#x\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
- todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
- todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_CALIBRATION, &prop_dword.diph );
@@ -7143,9 +7141,7 @@ static void test_force_feedback_joystick( void )
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
- todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
- todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
More information about the wine-cvs
mailing list