Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51922 Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/joystick_hid.c | 2 +- dlls/dinput8/tests/hid.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index dfaf6ae83ff..dd77f557e3e 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2224,7 +2224,7 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa count = impl->params.cAxes; if (params->cAxes < count) return DIERR_INVALIDPARAM; if ((direction_flags & DIEFF_POLAR) && count != 2) return DIERR_INVALIDPARAM; - if ((direction_flags & DIEFF_CARTESIAN) && count < 2) return DIERR_INVALIDPARAM; + if ((direction_flags & DIEFF_CARTESIAN) && params->cAxes != count) return DIERR_INVALIDPARAM;
if (!count) memset( directions, 0, sizeof(directions) ); else if (direction_flags & DIEFF_POLAR) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 4c1d73112cd..54109593a18 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -6061,11 +6061,9 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO desc.rglDirection[1] = 2000; desc.rglDirection[2] = 3000; hr = IDirectInputEffect_SetParameters( effect, &desc, DIEP_DIRECTION | DIEP_NODOWNLOAD ); - todo_wine_if( i == 2 ) ok( hr == DIERR_INVALIDPARAM, "SetParameters returned %#x\n", hr ); desc.cAxes = i; hr = IDirectInputEffect_SetParameters( effect, &desc, DIEP_DIRECTION | DIEP_NODOWNLOAD ); - todo_wine_if( i == 1 ) ok( hr == DI_DOWNLOADSKIPPED, "SetParameters returned %#x\n", hr );
desc.dwFlags = DIEFF_SPHERICAL;