Commit 5d3f2d18 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Check IDirectInputDevice8W_SetActionMap flags.

parent 0fe8da86
......@@ -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;
......
......@@ -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 );
......
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