From da87fa817d2c075ebe5a854567f1c6d5598f33c7 Mon Sep 17 00:00:00 2001 From: James Dean Anderson Date: Wed, 4 May 2005 09:46:07 +0000 Subject: [PATCH] Report an error if trying to get data from an unacquired mouse. --- dlls/dinput/mouse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 20a9ceca871..6932f21885c 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -685,7 +685,9 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState( 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);