From d7a8ec43537976354d77322cdd15f31b60bb317d Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 18 May 2024 11:49:19 -0500 Subject: [PATCH] VideoCommon: use imgui input queue for mouse clicks, this helps keep input smooth regardless of frame-times and matches keyboard events, this system was introduced in 1.87 --- Source/Core/VideoCommon/OnScreenUI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/OnScreenUI.cpp b/Source/Core/VideoCommon/OnScreenUI.cpp index 715f218b05..8f85db85b0 100644 --- a/Source/Core/VideoCommon/OnScreenUI.cpp +++ b/Source/Core/VideoCommon/OnScreenUI.cpp @@ -481,7 +481,9 @@ void OnScreenUI::SetMousePress(u32 button_mask) auto lock = GetImGuiLock(); for (size_t i = 0; i < std::size(ImGui::GetIO().MouseDown); i++) - ImGui::GetIO().MouseDown[i] = (button_mask & (1u << i)) != 0; + { + ImGui::GetIO().AddMouseButtonEvent(static_cast(i), (button_mask & (1u << i)) != 0); + } } } // namespace VideoCommon