dinput: Set the correct size for the old dinput joystick.

This also reverts my previous patch as this is the real cause for the
problems with Grand Prix Legends.
oldstable
Christoph Frick 2006-12-20 12:28:07 +01:00 committed by Alexandre Julliard
parent df97fd3e46
commit b0eb9d0b89
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ const DIDATAFORMAT c_dfDIJoystick = {
sizeof(DIDATAFORMAT),
sizeof(DIOBJECTDATAFORMAT),
DIDF_ABSAXIS,
sizeof(DIJOYSTATE2),
sizeof(DIJOYSTATE),
numObjects(dfDIJoystick),
(LPDIOBJECTDATAFORMAT)dfDIJoystick
};

View File

@ -899,7 +899,7 @@ static HRESULT WINAPI JoystickAImpl_GetCapabilities(
return E_POINTER;
}
if (lpDIDevCaps->dwSize < sizeof(DIDEVCAPS)) {
if (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) {
WARN("invalid argument\n");
return DIERR_INVALIDPARAM;
}