From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/device.c | 1 + dlls/dinput/tests/joystick8.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 2817ca9839b..0df0199317b 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1972,6 +1972,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D debugstr_w(username), flags );
if (!format) return DIERR_INVALIDPARAM; + if (flags != DIDSAM_DEFAULT && flags != DIDSAM_FORCESAVE && flags != DIDSAM_NOUSER) return DIERR_INVALIDPARAM;
if (!(data_format.rgodf = malloc( sizeof(DIOBJECTDATAFORMAT) * format->dwNumActions ))) return DIERR_OUTOFMEMORY; data_format.dwDataSize = format->dwDataSize; diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 6e8a9292f84..7947e6e33cc 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -807,7 +807,6 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e ok( hr == DIERR_INVALIDPARAM, "SetActionMap returned %#lx\n", hr ); flags = DIDSAM_FORCESAVE | DIDSAM_NOUSER; hr = IDirectInputDevice8_SetActionMap( device, &action_format_1, NULL, flags ); - todo_wine ok( hr == DIERR_INVALIDPARAM, "SetActionMap returned %#lx\n", hr );