diff options
| author | Dentomologist <dentomologist@gmail.com> | 2025-04-05 14:04:26 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2025-04-05 14:22:17 -0700 |
| commit | ec49ea5be32a65c974efb06ce16cccba6205a679 (patch) | |
| tree | 866cd8f530c383e7f0613a45e8021c3175b3a96e /Source/Core/VideoCommon/PerformanceMetrics.cpp | |
| parent | 2d1671a863efed9fee3042b77a79bcac4d52fcf4 (diff) | |
PerformanceMetrics: Fix window arrangement
Fix overlays stacking on top of each other or not moving to the edge of
the screen when enabling or disabling overlays while emulation is
active.
This change only applies when Config::GFX_MOVABLE_PERFORMANCE_METRICS is
False.
Diffstat (limited to 'Source/Core/VideoCommon/PerformanceMetrics.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PerformanceMetrics.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp index db61ea8978..a049a7e1cb 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.cpp +++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp @@ -88,9 +88,8 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) m_vps_counter.UpdateStats(); m_fps_counter.UpdateStats(); - const int movable_flag = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS) ? - ImGuiWindowFlags_None : - ImGuiWindowFlags_NoMove; + const bool movable_overlays = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS); + const int movable_flag = movable_overlays ? ImGuiWindowFlags_None : ImGuiWindowFlags_NoMove; const float bg_alpha = 0.7f; const auto imgui_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings | @@ -122,7 +121,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) // There are too many edge cases to reasonably handle when the display size changes, so just reset // the layout to default. Hopefully users aren't changing window sizes or resolutions too often. const ImGuiCond set_next_position_condition = - display_size_changed ? ImGuiCond_Always : ImGuiCond_FirstUseEver; + (display_size_changed || !movable_overlays) ? ImGuiCond_Always : ImGuiCond_FirstUseEver; float window_y = window_padding; float window_x = display_size.x - window_padding; |
