dinput: Stub HID joystick GetEffectStatus 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:42 +01:00 committed by Alexandre Julliard
parent 5abf6efcd9
commit 2ca15c8dc8
2 changed files with 15 additions and 16 deletions

View File

@ -2707,11 +2707,24 @@ static HRESULT WINAPI hid_joystick_effect_Stop( IDirectInputEffect *iface )
static HRESULT WINAPI hid_joystick_effect_GetEffectStatus( IDirectInputEffect *iface, DWORD *status )
{
FIXME( "iface %p, status %p stub!\n", iface, status );
struct hid_joystick_effect *impl = impl_from_IDirectInputEffect( iface );
HRESULT hr;
FIXME( "iface %p, status %p semi-stub!\n", iface, status );
if (!status) return E_POINTER;
*status = 0;
return DIERR_UNSUPPORTED;
EnterCriticalSection( &impl->joystick->base.crit );
if (!impl->joystick->base.acquired || !(impl->joystick->base.dwCoopLevel & DISCL_EXCLUSIVE))
hr = DIERR_NOTEXCLUSIVEACQUIRED;
else if (!impl->index)
hr = DIERR_NOTDOWNLOADED;
else
hr = DI_OK;
LeaveCriticalSection( &impl->joystick->base.crit );
return hr;
}
static void set_parameter_value( struct hid_joystick_effect *impl, char *report_buf,

View File

@ -8873,9 +8873,7 @@ static void test_device_managed_effect(void)
ok( hr == E_POINTER, "GetEffectStatus returned %#x\n", hr );
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DIERR_NOTDOWNLOADED, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == 0, "got status %#x\n", res );
flags = DIEP_ALLPARAMS;
@ -8888,7 +8886,6 @@ static void test_device_managed_effect(void)
set_hid_expect( file, NULL, 0 );
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetEffectStatus returned %#x\n", hr );
set_hid_expect( file, expect_reset, sizeof(expect_reset) );
@ -8898,9 +8895,7 @@ static void test_device_managed_effect(void)
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DIERR_NOTDOWNLOADED, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == 0, "got status %#x\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
@ -8919,9 +8914,7 @@ static void test_device_managed_effect(void)
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == 0, "got status %#x\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
@ -8946,7 +8939,6 @@ static void test_device_managed_effect(void)
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == DIEGES_PLAYING, "got status %#x\n", res );
@ -8956,7 +8948,6 @@ static void test_device_managed_effect(void)
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", res );
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == DIEGES_PLAYING, "got status %#x\n", res );
@ -8974,7 +8965,6 @@ static void test_device_managed_effect(void)
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", res );
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == DIEGES_PLAYING, "got status %#x\n", res );
@ -8994,9 +8984,7 @@ static void test_device_managed_effect(void)
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == 0, "got status %#x\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;
@ -9014,9 +9002,7 @@ static void test_device_managed_effect(void)
res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res );
todo_wine
ok( hr == DIERR_NOTDOWNLOADED, "GetEffectStatus returned %#x\n", hr );
todo_wine
ok( res == 0, "got status %#x\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef;