add better forground window detection and always enable new GetKeyState hooks
This commit is contained in:
parent
c8d4cd997e
commit
f57055fd8c
3 changed files with 12 additions and 6 deletions
|
@ -100,6 +100,13 @@ BOOL util_is_minimized(HWND hwnd)
|
|||
return IsIconic(hwnd) || (real_GetClientRect(hwnd, &rc) && (rc.right - rc.left == 0 || rc.bottom - rc.top == 0));
|
||||
}
|
||||
|
||||
BOOL util_in_foreground()
|
||||
{
|
||||
DWORD process_id = 0;
|
||||
|
||||
return GetWindowThreadProcessId(real_GetForegroundWindow(), &process_id) && process_id == GetCurrentProcessId();
|
||||
}
|
||||
|
||||
BOOL util_is_avx_supported()
|
||||
{
|
||||
const DWORD XMM_STATE_BIT = 1 << 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue