From ac97e0c6e952cf4169f7ecf1a2bb2ca264d2c075 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 17 Sep 2023 19:38:05 +1000 Subject: [PATCH] ImGuiManager: Fix icon OSD messages --- pcsx2/ImGui/ImGuiManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcsx2/ImGui/ImGuiManager.cpp b/pcsx2/ImGui/ImGuiManager.cpp index eb2ea9a3d7..e9c23237d6 100644 --- a/pcsx2/ImGui/ImGuiManager.cpp +++ b/pcsx2/ImGui/ImGuiManager.cpp @@ -575,9 +575,9 @@ void Host::AddKeyedOSDMessage(std::string key, std::string message, float durati OSDMessage msg; msg.key = std::move(key); msg.text = std::move(message); - msg.duration = duration; msg.start_time = current_time; msg.move_time = current_time; + msg.duration = duration; msg.target_y = -1.0f; msg.last_y = -1.0f; @@ -599,6 +599,7 @@ void Host::AddIconOSDMessage(std::string key, const char* icon, const std::strin msg.text = fmt::format("{} {}", icon, message); msg.start_time = current_time; msg.move_time = current_time; + msg.duration = duration; msg.target_y = -1.0f; msg.last_y = -1.0f; @@ -682,8 +683,6 @@ void ImGuiManager::DrawOSDMessages(Common::Timer::Value current_time) float position_x = margin; float position_y = margin; - const auto now = std::chrono::steady_clock::now(); - auto iter = s_osd_active_messages.begin(); while (iter != s_osd_active_messages.end()) {