Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 1074 of file dinput_main.c.
Referenced by IDirectInputDevice2AImpl_Acquire(), and IDirectInputDevice2AImpl_Unacquire().
{ static HHOOK callwndproc_hook; static ULONG foreground_cnt; IDirectInputDevice2AImpl *dev = (IDirectInputDevice2AImpl *)iface; EnterCriticalSection(&dinput_hook_crit); if (dev->dwCoopLevel & DISCL_FOREGROUND) { if (dev->acquired) foreground_cnt++; else foreground_cnt--; } if (foreground_cnt && !callwndproc_hook) callwndproc_hook = SetWindowsHookExW( WH_CALLWNDPROC, callwndproc_proc, DINPUT_instance, GetCurrentThreadId() ); else if (!foreground_cnt && callwndproc_hook) { UnhookWindowsHookEx( callwndproc_hook ); callwndproc_hook = NULL; } PostThreadMessageW( hook_thread_id, WM_USER+0x10, 1, 0 ); LeaveCriticalSection(&dinput_hook_crit); }