FSUI: Add Fallback to CPU Name OSD

This commit is contained in:
KamFretoZ
2026-07-27 17:15:15 +02:00
committed by GovanifY
parent 74e1dbb27f
commit 3973ba6aaf
2 changed files with 3 additions and 15 deletions
+2 -14
View File
@@ -1068,27 +1068,15 @@ void EmuThread::updatePerformanceMetrics(bool force)
if (gpu_usage != m_last_gpu_usage || force)
{
QString text;
if (gpu_usage == 0)
text = tr("GPU: N/A");
else
text = tr("GPU: %1%").arg(gpu_usage, 0, 'f', 0);
QMetaObject::invokeMethod(g_main_window, "setStatusGPUText", Qt::QueuedConnection,
Q_ARG(const QString&, text));
Q_ARG(const QString&, tr("GPU: %1%").arg(gpu_usage, 0, 'f', 0)));
m_last_gpu_usage = gpu_usage;
}
if (gfps != m_last_game_fps || force)
{
QString text;
if (gfps == 0)
text = tr("FPS: N/A");
else
text = tr("FPS: %1").arg(gfps, 0, 'f', 0);
QMetaObject::invokeMethod(g_main_window, "setStatusFPSText", Qt::QueuedConnection,
Q_ARG(const QString&, text));
Q_ARG(const QString&, gfps == 0 ? tr("FPS: N/A") : tr("FPS: %1").arg(gfps, 0, 'f', 0)));
m_last_game_fps = gfps;
}
+1 -1
View File
@@ -428,7 +428,7 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
const CPUInfo& info = GetCPUInfo();
const bool has_small = info.num_small_cores > 0;
const bool has_smt = info.num_threads != info.num_big_cores + info.num_small_cores;
s_hardware_info_cpu_line.format("CPU: {}", info.name);
s_hardware_info_cpu_line.format("CPU: {}", !info.name.empty() ? info.name : "Unknown");
if (has_smt && has_small)
s_hardware_info_cpu_line.append_format(" ({}P/{}E/{}T)", info.num_big_cores, info.num_small_cores, info.num_threads);
else if (has_small)