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

This commit is contained in:
iwubcode 2024-05-18 11:49:19 -05:00
parent 131ca83add
commit d7a8ec4353

View File

@ -481,7 +481,9 @@ void OnScreenUI::SetMousePress(u32 button_mask)
auto lock = GetImGuiLock(); auto lock = GetImGuiLock();
for (size_t i = 0; i < std::size(ImGui::GetIO().MouseDown); i++) 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 } // namespace VideoCommon