[DInput] Resend of the GetDeviceState patch

Lionel Ulmer lionel.ulmer at free.fr
Sun May 1 04:21:41 CDT 2005


Original patch by James (see the Changelog), verified on WinXP by me and
updated to latest CVS by Huw :-)

       Lionel

Changelog:
James Dean Anderson <petr at pantek.org>
 - report an error if trying to get data from an unacquired mouse

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/dinput/mouse.c
===================================================================
RCS file: /home/wine/wine/dlls/dinput/mouse.c,v
retrieving revision 1.21
diff -u -p -r1.21 mouse.c
--- dlls/dinput/mouse.c	24 Mar 2005 21:01:39 -0000	1.21
+++ dlls/dinput/mouse.c	1 May 2005 09:05:11 -0000
@@ -685,7 +685,9 @@ static HRESULT WINAPI SysMouseAImpl_GetD
 	LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
 ) {
     SysMouseImpl *This = (SysMouseImpl *)iface;
-    
+
+    if(This->acquired == 0) return DIERR_NOTACQUIRED;
+
     EnterCriticalSection(&(This->crit));
     TRACE("(this=%p,0x%08lx,%p): \n",This,len,ptr);
     


More information about the wine-patches mailing list