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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 20 12:24:53 CST 2006


Module: wine
Branch: master
Commit: b0eb9d0b8990e13b5744d4bfd9ed286c438d987e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b0eb9d0b8990e13b5744d4bfd9ed286c438d987e

Author: Christoph Frick <frick at sc-networks.de>
Date:   Wed Dec 20 12:28:07 2006 +0100

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.

---

 dlls/dinput/data_formats.c        |    2 +-
 dlls/dinput/joystick_linuxinput.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dinput/data_formats.c b/dlls/dinput/data_formats.c
index bc49263..1f25556 100644
--- a/dlls/dinput/data_formats.c
+++ b/dlls/dinput/data_formats.c
@@ -74,7 +74,7 @@ const DIDATAFORMAT c_dfDIJoystick = {
     sizeof(DIDATAFORMAT),
     sizeof(DIOBJECTDATAFORMAT),
     DIDF_ABSAXIS,
-    sizeof(DIJOYSTATE2),
+    sizeof(DIJOYSTATE),
     numObjects(dfDIJoystick),
     (LPDIOBJECTDATAFORMAT)dfDIJoystick
 };
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index aea00df..4cce222 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -899,7 +899,7 @@ static HRESULT WINAPI JoystickAImpl_GetC
 	return E_POINTER;
     }
 
-    if (lpDIDevCaps->dwSize < sizeof(DIDEVCAPS)) {
+    if (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) {
         WARN("invalid argument\n");
         return DIERR_INVALIDPARAM;
     }




More information about the wine-cvs mailing list