overlay: fix mouse events queued up while overlay is hidden (#683)

## Link to GitHub Issue or related Pull Request, if one exists
continuation of #677

## Description of change
When overlay was hidden, when mouse buttons were clicked, they were
queued up and replayed when overlay became visible again.

This is due to improper usage of `GetAsyncKeyState`, per documentation.

## Testing
This commit is contained in:
bicarus
2026-05-08 03:37:46 -07:00
committed by GitHub
parent 71ba9b6b47
commit 33b4718744
5 changed files with 18 additions and 15 deletions
+3 -1
View File
@@ -67,7 +67,9 @@ namespace superexit {
}
}
bool async_key_exit = GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_F4);
bool async_key_exit =
(GetAsyncKeyState(VK_MENU) & 0x8000) != 0 &&
(GetAsyncKeyState(VK_F4) & 0x8000) != 0;
bool overlay_exit = false;
auto buttons = games::get_buttons_overlay(eamuse_get_game());