dinput: Implement GetProperty with DIPROP_FFGAIN stub.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-10-19 09:20:03 +02:00 committed by Alexandre Julliard
parent 3ec4ae8390
commit 7402568a45
3 changed files with 7 additions and 8 deletions

View File

@ -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:

View File

@ -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 );

View File

@ -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 );