summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OnScreenDisplay.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2024-06-16 12:26:58 -0400
committerGitHub <noreply@github.com>2024-06-16 12:26:58 -0400
commit0c2b8fd58787b1aa9e5ee250f885c2691aef492a (patch)
tree130d51eb231b12ae8080050cff2d7beaf5cd1f03 /Source/Core/VideoCommon/OnScreenDisplay.cpp
parentc23cfe3c0836bd993126692bc19d60ca286262b1 (diff)
parent9e1f5ed4b566df704b2041012944bbbd605a9592 (diff)
Merge pull request #12857 from LillyJadeKatrin/retroachievements-osd-tweaks
RetroAchievements On Screen Tweaks
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenDisplay.cpp')
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp
index c24fee6538..cc7fa6e22b 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -111,11 +111,13 @@ static float DrawMessage(int index, Message& msg, const ImVec2& position, int ti
{
ImGui::Image(msg.texture.get(), ImVec2(static_cast<float>(msg.icon->width),
static_cast<float>(msg.icon->height)));
+ ImGui::SameLine();
}
}
// Use %s in case message contains %.
- ImGui::TextColored(ARGBToImVec4(msg.color), "%s", msg.text.c_str());
+ if (msg.text.size() > 0)
+ ImGui::TextColored(ARGBToImVec4(msg.color), "%s", msg.text.c_str());
window_height =
ImGui::GetWindowSize().y + (WINDOW_PADDING * ImGui::GetIO().DisplayFramebufferScale.y);
}