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 {