Skip to content

Commit

Permalink
even more reliable ui mouse input
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciremun committed Jul 8, 2022
1 parent c7d71db commit 5c432a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions freedom/freedom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ BOOL __stdcall freedom_update(HDC hDc)
if (!init)
{
EnumWindows(find_osu_window, GetCurrentProcessId());
oWndProc = (WNDPROC)SetWindowLongPtrA(g_hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc);

if (g_hwnd != GetForegroundWindow())
if (!IsWindowVisible(g_hwnd))
return wglSwapBuffersGateway(hDc);

oWndProc = (WNDPROC)SetWindowLongPtrA(g_hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc);

#ifndef NDEBUG
AllocConsole();
FILE *f;
Expand Down

0 comments on commit 5c432a9

Please sign in to comment.