ImGuiOverlays: Backport condition tidy-up

This commit is contained in:
Stenzek 2025-06-14 15:08:22 +10:00
parent ba6309c458
commit 20b353535d
No known key found for this signature in database

View File

@ -421,6 +421,7 @@ void ImGuiManager::DrawPerformanceOverlay(const GPUBackend* gpu, float& position
{ {
if (!(g_gpu_settings.display_show_fps || g_gpu_settings.display_show_speed || g_gpu_settings.display_show_gpu_stats || if (!(g_gpu_settings.display_show_fps || g_gpu_settings.display_show_speed || g_gpu_settings.display_show_gpu_stats ||
g_gpu_settings.display_show_resolution || g_gpu_settings.display_show_cpu_usage || g_gpu_settings.display_show_resolution || g_gpu_settings.display_show_cpu_usage ||
g_gpu_settings.display_show_frame_times ||
(g_gpu_settings.display_show_status_indicators && (g_gpu_settings.display_show_status_indicators &&
(GPUThread::IsSystemPaused() || System::IsFastForwardEnabled() || System::IsTurboEnabled())))) (GPUThread::IsSystemPaused() || System::IsFastForwardEnabled() || System::IsTurboEnabled()))))
{ {
@ -600,7 +601,8 @@ void ImGuiManager::DrawPerformanceOverlay(const GPUBackend* gpu, float& position
position_y += spacing; position_y += spacing;
} }
DrawFrameTimeOverlay(position_y, scale, margin, spacing); if (g_gpu_settings.display_show_frame_times)
DrawFrameTimeOverlay(position_y, scale, margin, spacing);
if (g_gpu_settings.display_show_status_indicators) if (g_gpu_settings.display_show_status_indicators)
{ {
@ -749,9 +751,6 @@ void ImGuiManager::DrawMediaCaptureOverlay(float& position_y, float scale, float
void ImGuiManager::DrawFrameTimeOverlay(float& position_y, float scale, float margin, float spacing) void ImGuiManager::DrawFrameTimeOverlay(float& position_y, float scale, float margin, float spacing)
{ {
if (!g_gpu_settings.display_show_frame_times || GPUThread::IsSystemPaused())
return;
const float shadow_offset = std::ceil(1.0f * scale); const float shadow_offset = std::ceil(1.0f * scale);
ImFont* fixed_font = ImGuiManager::GetFixedFont(); ImFont* fixed_font = ImGuiManager::GetFixedFont();
const float fixed_font_size = ImGuiManager::GetFixedFontSize(); const float fixed_font_size = ImGuiManager::GetFixedFontSize();