mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
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:
parent
131ca83add
commit
d7a8ec4353
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user