diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 0dcd6e4e51..be1257d226 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -126,6 +126,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowInputs, "EmuCore/GS", "OsdShowInputs", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowFrameTimes, "EmuCore/GS", "OsdShowFrameTimes", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowVersion, "EmuCore/GS", "OsdShowVersion", false); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowHardwareInfo, "EmuCore/GS", "OsdShowHardwareInfo", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.warnAboutUnsafeSettings, "EmuCore", "WarnAboutUnsafeSettings", true); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fxaa, "EmuCore/GS", "fxaa", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.shadeBoost, "EmuCore/GS", "ShadeBoost", false); @@ -736,6 +737,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* dialog->registerWidgetHelp(m_ui.osdShowVersion, tr("Show PCSX2 Version"), tr("Unchecked"), tr("Shows the current PCSX2 version on the top-right corner of the display")); + dialog->registerWidgetHelp(m_ui.osdShowHardwareInfo, tr("Show Hardware Info"), tr("Unchecked"), + tr("Shows the current system hardware information on the OSD.")); + dialog->registerWidgetHelp(m_ui.warnAboutUnsafeSettings, tr("Warn About Unsafe Settings"), tr("Checked"), tr("Displays warnings when settings are enabled which may break games.")); } diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index d81e1e05a4..6ce24d6962 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -1662,17 +1662,31 @@ - - + + - Show Resolution + Show Frame Times - - + + - Show FPS + Show PCSX2 Version + + + + + + + Show Indicators + + + + + + + Show Speed Percentages @@ -1690,24 +1704,17 @@ - - + + - Show PCSX2 Version + Show Statistics - - + + - Show Speed Percentages - - - - - - - Show Indicators + Warn About Unsafe Settings @@ -1718,10 +1725,17 @@ - - + + - Show Statistics + Show FPS + + + + + + + Show Resolution @@ -1732,17 +1746,10 @@ - - + + - Show Frame Times - - - - - - - Warn About Unsafe Settings + Show Hardware Info diff --git a/pcsx2/Config.h b/pcsx2/Config.h index b7676b528e..fc6d6d2bc7 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -628,6 +628,7 @@ struct Pcsx2Config OsdShowInputs : 1, OsdShowFrameTimes : 1, OsdShowVersion : 1, + OsdShowHardwareInfo : 1, HWSpinGPUForReadbacks : 1, HWSpinCPUForReadbacks : 1, GPUPaletteConversion : 1, diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp index ba94e89fb6..b010641254 100644 --- a/pcsx2/ImGui/FullscreenUI.cpp +++ b/pcsx2/ImGui/FullscreenUI.cpp @@ -3154,6 +3154,9 @@ void FullscreenUI::DrawInterfaceSettingsPage() DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_PF_HEARTBEAT_ALT, "Show Frame Times"), FSUI_CSTR("Shows a visual history of frame times in the upper-left corner of the display."), "EmuCore/GS", "OsdShowFrameTimes", false); + DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_PF_MONITOR_CODE, "Show Hardware Info"), + FSUI_CSTR("Shows the current system hardware information on the OSD."), "EmuCore/GS", "OsdShowHardwareInfo", + false); DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_EXCLAMATION, "Warn About Unsafe Settings"), FSUI_CSTR("Displays warnings when settings are enabled which may break games."), "EmuCore", "WarnAboutUnsafeSettings", true); diff --git a/pcsx2/ImGui/ImGuiOverlays.cpp b/pcsx2/ImGui/ImGuiOverlays.cpp index a4b3585633..093d0e9c69 100644 --- a/pcsx2/ImGui/ImGuiOverlays.cpp +++ b/pcsx2/ImGui/ImGuiOverlays.cpp @@ -25,6 +25,7 @@ #include "USB/USB.h" #include "VMManager.h" #include "svnrev.h" +#include "cpuinfo.h" #include "common/BitUtils.h" #include "common/FileSystem.h" @@ -191,6 +192,13 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f GSgetMemoryStats(text); if (!text.empty()) DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255)); + + text.clear(); + text.append_format("{} QF | {:.2f}ms | {:.2f}ms | {:.2f}ms", + MTGS::GetCurrentVsyncQueueSize() - 1, // we subtract one for the current frame + PerformanceMetrics::GetMinimumFrameTime(), PerformanceMetrics::GetAverageFrameTime(), + PerformanceMetrics::GetMaximumFrameTime()); + DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255)); } if (GSConfig.OsdShowResolution) @@ -203,15 +211,18 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255)); } - if (GSConfig.OsdShowCPU) + if (GSConfig.OsdShowHardwareInfo) { text.clear(); - text.append_format("{} QF | {:.2f}ms | {:.2f}ms | {:.2f}ms", - MTGS::GetCurrentVsyncQueueSize() - 1, // we subtract one for the current frame - PerformanceMetrics::GetMinimumFrameTime(), PerformanceMetrics::GetAverageFrameTime(), - PerformanceMetrics::GetMaximumFrameTime()); + text.append_format("CPU: {} ({}C/{}T)", + cpuinfo_get_package(0)->name, + cpuinfo_get_cores_count(), + cpuinfo_get_processors_count()); DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255)); + } + if (GSConfig.OsdShowCPU) + { text.clear(); if (EmuConfig.Speedhacks.EECycleRate != 0 || EmuConfig.Speedhacks.EECycleSkip != 0) text.append_format("EE[{}/{}]: ", EmuConfig.Speedhacks.EECycleRate, EmuConfig.Speedhacks.EECycleSkip); diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index f974fa3b40..e1a2dc5674 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -631,6 +631,7 @@ Pcsx2Config::GSOptions::GSOptions() OsdShowInputs = false; OsdShowFrameTimes = false; OsdShowVersion = false; + OsdShowHardwareInfo = false; HWDownloadMode = GSHardwareDownloadMode::Enabled; HWSpinGPUForReadbacks = false; @@ -838,6 +839,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) SettingsWrapBitBool(OsdShowInputs); SettingsWrapBitBool(OsdShowFrameTimes); SettingsWrapBitBool(OsdShowVersion); + SettingsWrapBitBool(OsdShowHardwareInfo); SettingsWrapBitBool(HWSpinGPUForReadbacks); SettingsWrapBitBool(HWSpinCPUForReadbacks); diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index 04a79317e0..a9fd388f9a 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -2370,8 +2370,7 @@ inline void LogUserPowerPlan() } #endif -#if 0 -#if defined(__linux__) || defined(_WIN32) +#if defined(_WIN32) void LogGPUCapabilities() { Console.WriteLn(Color_StrongBlack, "Graphics Adapters Detected:"); @@ -2484,7 +2483,6 @@ void LogGPUCapabilities() #endif } #endif -#endif void VMManager::LogCPUCapabilities() { @@ -2532,7 +2530,7 @@ void VMManager::LogCPUCapabilities() } #endif -#if 0 +#if defined(_WIN32) LogGPUCapabilities(); #endif }