diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2024-05-18 11:49:19 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2024-05-18 11:49:19 -0500 |
| commit | d7a8ec43537976354d77322cdd15f31b60bb317d (patch) | |
| tree | 1d9b8a6a284f949054305258b5f6f067336c59cf /Source/Core/VideoCommon/OnScreenUI.cpp | |
| parent | 131ca83addd6620b49b8dcd6040e9d7bfa4f099c (diff) | |
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
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenUI.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/OnScreenUI.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<int>(i), (button_mask & (1u << i)) != 0); + } } } // namespace VideoCommon |
