dinput: Check data format dwObjSize in IDirectInputDevice2WImpl_SetDataFormat.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2064181c1f
commit
0e75722971
|
@ -1094,6 +1094,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetDataFormat(LPDIRECTINPUTDEVICE8W ifac
|
|||
_dump_DIDATAFORMAT(df);
|
||||
|
||||
if (df->dwSize != sizeof(DIDATAFORMAT)) return DIERR_INVALIDPARAM;
|
||||
if (df->dwObjSize != sizeof(DIOBJECTDATAFORMAT)) return DIERR_INVALIDPARAM;
|
||||
if (This->acquired) return DIERR_ACQUIRED;
|
||||
|
||||
EnterCriticalSection(&This->crit);
|
||||
|
|
|
@ -4015,7 +4015,6 @@ static void test_simple_joystick(void)
|
|||
ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
|
||||
dataformat.dwSize = sizeof(DIDATAFORMAT);
|
||||
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
|
||||
todo_wine
|
||||
ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
|
||||
dataformat.dwObjSize = sizeof(DIOBJECTDATAFORMAT);
|
||||
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
|
||||
|
|
Loading…
Reference in New Issue