[DINPUT] Sync with Wine Staging 1.7.55. CORE-10536
[reactos.git] / reactos / dll / directx / wine / dinput / mouse.c
index 73f7b58..bcf9e13 100644 (file)
@@ -530,17 +530,15 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
 static HRESULT WINAPI SysMouseWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface, DWORD len, LPVOID ptr)
 {
     SysMouseImpl *This = impl_from_IDirectInputDevice8W(iface);
+    TRACE("(%p)->(%u,%p)\n", This, len, ptr);
 
     if(This->base.acquired == 0) return DIERR_NOTACQUIRED;
 
-#ifndef __REACTOS__
-    __wine_check_for_events( QS_ALLINPUT );
-#endif
+    check_dinput_events();
 
-    TRACE("(this=%p,0x%08x,%p):\n", This, len, ptr);
+    EnterCriticalSection(&This->base.crit);
     _dump_mouse_state(&This->m_state);
 
-    EnterCriticalSection(&This->base.crit);
     /* Copy the current mouse state */
     fill_DataFormat(ptr, len, &This->m_state, &This->base.data_format);