From e2d3f23575d3e63480d9216984fca2506d602088 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Wed, 11 Feb 2026 21:31:23 -0700 Subject: [PATCH] Clear stale input state on session reset --- src/input.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index f57a28cb..8a77ab58 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1668,8 +1668,8 @@ namespace input { for (int x = 0; x < mouse_press.size(); ++x) { if (mouse_press[x]) { platf::button_mouse(platf_input, x, true); - mouse_press[x] = false; } + mouse_press[x] = false; } for (auto &kp : key_press) { @@ -1680,7 +1680,10 @@ namespace input { platf::keyboard_update(platf_input, vk_from_kpid(kp.first) & 0x00FF, true, flags_from_kpid(kp.first)); key_press[kp.first] = false; } - }); + + key_press.clear(); + key_press_repeat_id = nullptr; + }).wait(); } class deinit_t: public platf::deinit_t {