diff --git a/pcsx2/ImGui/ImGuiOverlays.cpp b/pcsx2/ImGui/ImGuiOverlays.cpp index 918ff109e5..43290cbdb7 100644 --- a/pcsx2/ImGui/ImGuiOverlays.cpp +++ b/pcsx2/ImGui/ImGuiOverlays.cpp @@ -54,10 +54,10 @@ namespace ImGuiManager { static void FormatProcessorStat(std::string& text, double usage, double time); - static void DrawPerformanceOverlay(); + static void DrawPerformanceOverlay(float& position_y); static void DrawSettingsOverlay(); static void DrawInputsOverlay(); - static void DrawInputRecordingOverlay(); + static void DrawInputRecordingOverlay(float& position_y); } // namespace ImGuiManager static std::tuple GetMinMax(gsl::span values) @@ -97,13 +97,12 @@ void ImGuiManager::FormatProcessorStat(std::string& text, double usage, double t fmt::format_to(std::back_inserter(text), "{:.1f}% ({:.2f}ms)", usage, time); } -void ImGuiManager::DrawPerformanceOverlay() +void ImGuiManager::DrawPerformanceOverlay(float& position_y) { const float scale = ImGuiManager::GetGlobalScale(); const float shadow_offset = std::ceil(1.0f * scale); const float margin = std::ceil(10.0f * scale); const float spacing = std::ceil(5.0f * scale); - float position_y = margin; ImFont* const fixed_font = ImGuiManager::GetFixedFont(); ImFont* const standard_font = ImGuiManager::GetStandardFont(); @@ -615,13 +614,13 @@ void ImGuiManager::DrawInputsOverlay() } } -void ImGuiManager::DrawInputRecordingOverlay() +void ImGuiManager::DrawInputRecordingOverlay(float& position_y) { const float scale = ImGuiManager::GetGlobalScale(); const float shadow_offset = std::ceil(1.0f * scale); const float margin = std::ceil(10.0f * scale); const float spacing = std::ceil(5.0f * scale); - float position_y = margin; + position_y += margin; ImFont* const fixed_font = ImGuiManager::GetFixedFont(); ImFont* const standard_font = ImGuiManager::GetStandardFont(); @@ -666,8 +665,9 @@ void ImGuiManager::DrawInputRecordingOverlay() void ImGuiManager::RenderOverlays() { - DrawPerformanceOverlay(); - DrawInputRecordingOverlay(); + float position_y = 0; + DrawInputRecordingOverlay(position_y); + DrawPerformanceOverlay(position_y); DrawSettingsOverlay(); DrawInputsOverlay(); }