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 ||
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 &&
(GPUThread::IsSystemPaused() || System::IsFastForwardEnabled() || System::IsTurboEnabled()))))
{
@ -600,6 +601,7 @@ void ImGuiManager::DrawPerformanceOverlay(const GPUBackend* gpu, float& position
position_y += spacing;
}
if (g_gpu_settings.display_show_frame_times)
DrawFrameTimeOverlay(position_y, scale, margin, spacing);
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)
{
if (!g_gpu_settings.display_show_frame_times || GPUThread::IsSystemPaused())
return;
const float shadow_offset = std::ceil(1.0f * scale);
ImFont* fixed_font = ImGuiManager::GetFixedFont();
const float fixed_font_size = ImGuiManager::GetFixedFontSize();