ImGuiManager: Show additional CPU settings

This commit is contained in:
Connor McLaughlin 2022-09-17 14:27:23 +10:00
parent 016eb7c548
commit 14af29d398

View file

@ -161,10 +161,45 @@ void ImGuiManager::DrawPerformanceOverlay()
DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255)); DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255));
text.Clear(); text.Clear();
if (g_settings.cpu_overclock_active) if (g_settings.cpu_overclock_active || (!g_settings.IsUsingRecompiler() || g_settings.cpu_recompiler_icache || g_settings.cpu_recompiler_memory_exceptions))
text.Fmt("CPU[{}]: ", g_settings.GetCPUOverclockPercent()); {
first = true;
text.AppendString("CPU[");
if (g_settings.cpu_overclock_active)
{
text.AppendFmtString("{}", g_settings.GetCPUOverclockPercent());
first = false;
}
if (g_settings.cpu_execution_mode == CPUExecutionMode::Interpreter)
{
text.AppendFmtString("{}{}", first ? "" : "/", "I");
first = false;
}
else if (g_settings.cpu_execution_mode == CPUExecutionMode::CachedInterpreter)
{
text.AppendFmtString("{}{}", first ? "" : "/", "CI");
first = false;
}
else
{
if (g_settings.cpu_recompiler_icache)
{
text.AppendFmtString("{}{}", first ? "" : "/", "IC");
first = false;
}
if (g_settings.cpu_recompiler_memory_exceptions)
{
text.AppendFmtString("{}{}", first ? "" : "/", "ME");
first = false;
}
}
text.AppendString("]: ");
}
else else
{
text.Assign("CPU: "); text.Assign("CPU: ");
}
FormatProcessorStat(text, System::GetCPUThreadUsage(), System::GetCPUThreadAverageTime()); FormatProcessorStat(text, System::GetCPUThreadUsage(), System::GetCPUThreadAverageTime());
DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255)); DRAW_LINE(fixed_font, text, IM_COL32(255, 255, 255, 255));