overlay: create a dedicated thread for polling hotkeys (#864)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Create a new thread that polls for the following hotkeys: * super exit (both alt+f4 and bound key) * coin insert * screenshot The goal is to make the capture of these more reliable, because before this PR it wasn't. ## Testing
This commit is contained in:
@@ -212,6 +212,7 @@ namespace overlay {
|
||||
bool fps_down = false;
|
||||
bool hotkey_toggle = false;
|
||||
bool hotkey_toggle_last = false;
|
||||
std::mutex hotkeys_mutex;
|
||||
|
||||
// true between new_frame()'s ImGui::NewFrame() and render()'s ImGui::Render(),
|
||||
// so render() never runs without a matching NewFrame.
|
||||
@@ -235,4 +236,5 @@ namespace overlay {
|
||||
#endif
|
||||
void create_software(HWND hWnd);
|
||||
void destroy(HWND hWnd = nullptr);
|
||||
bool global_hotkeys_triggered();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user