Commit 3b2f7433 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Stub support for DIPROP_FFLOAD device property.

parent 2a424209
......@@ -1056,6 +1056,10 @@ static HRESULT check_property( struct dinput_device *impl, const GUID *guid, con
if (!impl->object_properties) return DIERR_UNSUPPORTED;
break;
case (DWORD_PTR)DIPROP_FFLOAD:
if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED;
if (!impl->acquired || !(impl->dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED;
/* fallthrough */
case (DWORD_PTR)DIPROP_PRODUCTNAME:
case (DWORD_PTR)DIPROP_INSTANCENAME:
case (DWORD_PTR)DIPROP_VIDPID:
......@@ -1173,6 +1177,7 @@ static HRESULT dinput_device_get_property( IDirectInputDevice8W *iface, const GU
case (DWORD_PTR)DIPROP_VIDPID:
case (DWORD_PTR)DIPROP_JOYSTICKID:
case (DWORD_PTR)DIPROP_GUIDANDPATH:
case (DWORD_PTR)DIPROP_FFLOAD:
return impl->vtbl->get_property( iface, LOWORD( guid ), header, NULL );
case (DWORD_PTR)DIPROP_RANGE:
......
......@@ -824,6 +824,14 @@ static HRESULT hid_joystick_get_property( IDirectInputDevice8W *iface, DWORD pro
lstrcpynW( value->wszPath, impl->device_path, MAX_PATH );
return DI_OK;
}
case (DWORD_PTR)DIPROP_FFLOAD:
{
DIPROPDWORD *value = (DIPROPDWORD *)header;
if (!(impl->base.caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED;
if (!impl->base.acquired || !(impl->base.dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED;
value->dwData = 0;
return DI_OK;
}
}
return DIERR_UNSUPPORTED;
......
......@@ -7990,7 +7990,6 @@ static void test_force_feedback_joystick( DWORD version )
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_EnumObjects( device, check_objects, &check_objects_params, DIDFT_ALL );
......@@ -8061,7 +8060,6 @@ static void test_force_feedback_joystick( DWORD version )
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
ok( hr == DIERR_READONLY, "SetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
......@@ -8819,7 +8817,6 @@ static void test_device_managed_effect(void)
ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
......@@ -8835,9 +8832,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData );
set_hid_expect( file, NULL, 0 );
......@@ -8854,9 +8849,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData );
set_hid_expect( file, NULL, 0 );
......@@ -8948,9 +8941,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
ok( hr == DI_OK, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 0, "got DIPROP_FFLOAD %#x\n", prop_dword.dwData );
set_hid_expect( file, NULL, 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment