From 45563a872cce3a06badf9466c29bab953e611e45 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Fri, 14 Jun 2024 00:01:21 -0400 Subject: [PATCH] Scale challenge icons based on screen height --- Source/Core/VideoCommon/OnScreenUI.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/OnScreenUI.cpp b/Source/Core/VideoCommon/OnScreenUI.cpp index e7c5d6959f..c247b139bf 100644 --- a/Source/Core/VideoCommon/OnScreenUI.cpp +++ b/Source/Core/VideoCommon/OnScreenUI.cpp @@ -359,6 +359,7 @@ void OnScreenUI::DrawChallengesAndLeaderboards() float leaderboard_y = ImGui::GetIO().DisplaySize.y; if (!m_challenge_texture_map.empty()) { + float scale = ImGui::GetIO().DisplaySize.y / 1024.0; ImGui::SetNextWindowSize(ImVec2(0, 0)); ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x, ImGui::GetIO().DisplaySize.y), 0, ImVec2(1, 1)); @@ -370,8 +371,8 @@ void OnScreenUI::DrawChallengesAndLeaderboards() { for (auto& [name, texture] : m_challenge_texture_map) { - ImGui::Image(texture.get(), ImVec2(static_cast(texture->GetWidth()), - static_cast(texture->GetHeight()))); + ImGui::Image(texture.get(), ImVec2(static_cast(texture->GetWidth()) * scale, + static_cast(texture->GetHeight()) * scale)); ImGui::SameLine(); } }