From 84f123041a7aa6d919d2e1a321ffc1f3f9877f2f Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 31 Oct 2021 04:01:45 +0100 Subject: [PATCH] overlays: fix offset of right edge oriented graphs when detail level is none --- rpcs3/Emu/RSX/Overlays/overlay_perf_metrics.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/RSX/Overlays/overlay_perf_metrics.cpp b/rpcs3/Emu/RSX/Overlays/overlay_perf_metrics.cpp index 42f0502ed7..fa72fa64a2 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_perf_metrics.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_perf_metrics.cpp @@ -96,9 +96,6 @@ namespace rsx const positionu margin { m_margin_x, m_margin_y }; positionu pos; - const auto overlay_width = m_body.w + margin.x; - const auto overlay_height = m_body.h + margin.y; - u16 graph_width = 0; u16 graph_height = 0; @@ -126,16 +123,16 @@ namespace rsx pos.y = margin.y; break; case screen_quadrant::top_right: - pos.x = virtual_width - overlay_width; + pos.x = virtual_width - std::max(m_body.w, graph_width) - margin.x; pos.y = margin.y; break; case screen_quadrant::bottom_left: pos.x = margin.x; - pos.y = virtual_height - overlay_height - graph_height; + pos.y = virtual_height - m_body.h - graph_height - margin.y; break; case screen_quadrant::bottom_right: - pos.x = virtual_width - overlay_width; - pos.y = virtual_height - overlay_height - graph_height; + pos.x = virtual_width - std::max(m_body.w, graph_width) - margin.x; + pos.y = virtual_height - m_body.h - graph_height - margin.y; break; }