dinput: Stub IDirectInputDevice8_GetForceFeedbackState implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52062
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-11-24 16:09:41 +01:00 committed by Alexandre Julliard
parent 3b2f7433db
commit 5abf6efcd9
2 changed files with 10 additions and 12 deletions

View file

@ -1762,9 +1762,17 @@ static HRESULT WINAPI dinput_device_GetEffectInfo( IDirectInputDevice8W *iface,
static HRESULT WINAPI dinput_device_GetForceFeedbackState( IDirectInputDevice8W *iface, DWORD *out )
{
FIXME( "iface %p, out %p stub!\n", iface, out );
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
FIXME( "iface %p, out %p semi-stub!\n", iface, out );
if (!out) return E_POINTER;
return DIERR_UNSUPPORTED;
*out = 0;
if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED;
if (!impl->acquired || !(impl->dwCoopLevel & DISCL_EXCLUSIVE)) return DIERR_NOTEXCLUSIVEACQUIRED;
return DI_OK;
}
static HRESULT WINAPI dinput_device_SendForceFeedbackCommand( IDirectInputDevice8W *iface, DWORD command )

View file

@ -8062,7 +8062,6 @@ static void test_force_feedback_joystick( DWORD version )
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetForceFeedbackState returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET );
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "SendForceFeedbackCommand returned %#x\n", hr );
@ -8819,7 +8818,6 @@ static void test_device_managed_effect(void)
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetForceFeedbackState returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET );
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "SendForceFeedbackCommand returned %#x\n", hr );
@ -8839,7 +8837,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_STOPPED|DIGFFS_EMPTY;
todo_wine
@ -8863,7 +8860,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_PAUSED|DIGFFS_EMPTY|DIGFFS_ACTUATORSON|DIGFFS_POWERON|DIGFFS_SAFETYSWITCHON|DIGFFS_USERFFSWITCHON;
todo_wine
@ -8910,7 +8906,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_STOPPED|DIGFFS_EMPTY;
todo_wine
@ -8931,7 +8926,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_STOPPED;
todo_wine
@ -8969,7 +8963,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_ACTUATORSOFF|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF;
todo_wine
@ -8988,7 +8981,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF;
todo_wine
@ -9009,7 +9001,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF;
todo_wine
@ -9030,7 +9021,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr );
flags = DIGFFS_EMPTY|DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF;
todo_wine