From dfcf9fa6aa0080db7866a070d80435dc699ca1eb Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 16 Dec 2022 18:12:26 +1000 Subject: [PATCH] ImGuiManager: Log OSD messages when they're added --- pcsx2/Frontend/ImGuiManager.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pcsx2/Frontend/ImGuiManager.cpp b/pcsx2/Frontend/ImGuiManager.cpp index c47227ef34..ede0f93e31 100644 --- a/pcsx2/Frontend/ImGuiManager.cpp +++ b/pcsx2/Frontend/ImGuiManager.cpp @@ -41,6 +41,7 @@ #include "HostDisplay.h" #include "IconsFontAwesome5.h" #include "PerformanceMetrics.h" +#include "Recording/InputRecording.h" #ifdef PCSX2_CORE #include "Frontend/FullscreenUI.h" @@ -48,7 +49,6 @@ #include "Frontend/InputManager.h" #include "VMManager.h" #endif -#include namespace ImGuiManager { @@ -540,6 +540,11 @@ void Host::AddOSDMessage(std::string message, float duration /*= 2.0f*/) void Host::AddKeyedOSDMessage(std::string key, std::string message, float duration /* = 2.0f */) { + if (!key.empty()) + Console.WriteLn(Color_StrongGreen, fmt::format("OSD [{}]: {}", key, message)); + else + Console.WriteLn(Color_StrongGreen, fmt::format("OSD: {}", message)); + OSDMessage msg; msg.key = std::move(key); msg.text = std::move(message); @@ -552,6 +557,11 @@ void Host::AddKeyedOSDMessage(std::string key, std::string message, float durati void Host::AddIconOSDMessage(std::string key, const char* icon, const std::string_view& message, float duration /* = 2.0f */) { + if (!key.empty()) + Console.WriteLn(Color_StrongGreen, fmt::format("OSD [{}]: {}", key, message)); + else + Console.WriteLn(Color_StrongGreen, fmt::format("OSD: {}", message)); + OSDMessage msg; msg.key = std::move(key); msg.text = fmt::format("{} {}", icon, message);