System: Look up media capture settings on-demand

No need to store them, save some memory.
This commit is contained in:
Stenzek
2024-08-18 14:12:42 +10:00
parent e2ea0bfec2
commit 3772706603
8 changed files with 81 additions and 78 deletions

View File

@ -369,12 +369,14 @@ void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, float
DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255));
}
#ifndef __ANDROID__
if (MediaCapture* cap = System::GetMediaCapture())
{
text.assign("CAP: ");
FormatProcessorStat(text, cap->GetCaptureThreadUsage(), cap->GetCaptureThreadTime());
DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255));
}
#endif
}
if (g_settings.display_show_gpu_usage && g_gpu_device->IsGPUTimingEnabled())
@ -499,6 +501,7 @@ void ImGuiManager::DrawEnhancementsOverlay()
void ImGuiManager::DrawMediaCaptureOverlay(float& position_y, float scale, float margin, float spacing)
{
#ifndef __ANDROID__
MediaCapture* const cap = System::GetMediaCapture();
if (!cap || FullscreenUI::HasActiveWindow())
return;
@ -533,6 +536,7 @@ void ImGuiManager::DrawMediaCaptureOverlay(float& position_y, float scale, float
IM_COL32(255, 255, 255, 255), text_msg.c_str(), text_msg.end_ptr());
position_y += box_size.y + spacing;
#endif
}
void ImGuiManager::DrawFrameTimeOverlay(float& position_y, float scale, float margin, float spacing)