On Sun, May 01, 2005 at 10:32:24AM +0200, Lionel Ulmer wrote: > On Wed, Jun 16, 2004 at 08:50:50PM +0200, James Dean Anderson wrote: > > this patch adds a missing errorcode in GetDeviceState in > > dlls/dinput/mouse.c which prevented the mouse to work in some game. > > Well, I finally found the time to clean my wine-devel mailing list and do > the DInput test program and now I can confirm that this patch is right and > should go in CVS (really sorry for the ... errm ... 10 month delay). > > The only problem is that it does not apply anymore (as the name of the file > changed) and that I am a bit away on my Linux box (live from WineConf :-) ) > to rework it. So either one can resubmit synced to current CVS or I will do > it on Wednesday when I come back home. > > Lionel >
Try this :-) Huw. 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);