Skip to content

Commit

Permalink
Fixed overlay toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
BttrDrgn committed May 12, 2022
1 parent f4c5200 commit f40fb6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ bool toggle_once = false;

LRESULT __stdcall wndproc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
long retn = ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);

if (ImGui::IsKeyPressed(192, false) && !toggle_once)
{
global::hide = !global::hide;
Expand All @@ -19,7 +21,7 @@ LRESULT __stdcall wndproc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
else if (!ImGui::IsKeyPressed(192, false) && toggle_once) toggle_once = false;

//Should prevent some applications from getting input
if (!global::hide && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam) > 0)
if (!global::hide && retn > 0)
{
return 1L;
}
Expand Down

0 comments on commit f40fb6c

Please sign in to comment.