From 94effe8be309f1720feaee5ce1c063cedd6ca3ac Mon Sep 17 00:00:00 2001 From: JordanTheToaster Date: Sat, 14 Sep 2024 14:40:48 +0100 Subject: [PATCH] OSD: Rename various fields --- pcsx2-qt/QtHost.cpp | 4 +- pcsx2-qt/Settings/GraphicsSettingsWidget.cpp | 4 + pcsx2-qt/Settings/GraphicsSettingsWidget.ui | 91 +++++++++++--------- pcsx2/Config.h | 1 + pcsx2/ImGui/ImGuiOverlays.cpp | 26 +++--- pcsx2/Pcsx2Config.cpp | 2 + 6 files changed, 73 insertions(+), 55 deletions(-) diff --git a/pcsx2-qt/QtHost.cpp b/pcsx2-qt/QtHost.cpp index 5587e929c65e7..6f2473e6720ec 100644 --- a/pcsx2-qt/QtHost.cpp +++ b/pcsx2-qt/QtHost.cpp @@ -1052,14 +1052,14 @@ void EmuThread::updatePerformanceMetrics(bool force) if (gfps != m_last_game_fps || force) { QMetaObject::invokeMethod(g_main_window->getStatusFPSWidget(), "setText", Qt::QueuedConnection, - Q_ARG(const QString&, tr("Game: %1 FPS").arg(gfps, 0, 'f', 0))); + Q_ARG(const QString&, tr("FPS: %1").arg(gfps, 0, 'f', 0))); m_last_game_fps = gfps; } if (speed != m_last_speed || vfps != m_last_video_fps || force) { QMetaObject::invokeMethod(g_main_window->getStatusVPSWidget(), "setText", Qt::QueuedConnection, - Q_ARG(const QString&, tr("Video: %1 FPS (%2%)").arg(vfps, 0, 'f', 0).arg(speed, 0, 'f', 0))); + Q_ARG(const QString&, tr("VPS: %1 (%2%) ").arg(vfps, 0, 'f', 0).arg(speed, 0, 'f', 0))); m_last_speed = speed; m_last_video_fps = vfps; } diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index bd94ec439959d..f01b2d685e55d 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -117,6 +117,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.osdPerformancePos, "EmuCore/GS", "OsdPerformancePos", static_cast(OsdOverlayPos::TopRight)); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowSpeed, "EmuCore/GS", "OsdShowSpeed", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowFPS, "EmuCore/GS", "OsdShowFPS", false); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowVPS, "EmuCore/GS", "OsdShowVPS", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowCPU, "EmuCore/GS", "OsdShowCPU", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowGPU, "EmuCore/GS", "OsdShowGPU", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowResolution, "EmuCore/GS", "OsdShowResolution", false); @@ -719,6 +720,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* dialog->registerWidgetHelp(m_ui.osdShowFPS, tr("Show FPS"), tr("Unchecked"), tr("Shows the internal frame rate of the game in the top-right corner of the display.")); + dialog->registerWidgetHelp(m_ui.osdShowVPS, tr("Show VPS"), tr("Unchecked"), + tr("Shows the vsync rate of the emulator in the top-right corner of the display.")); + dialog->registerWidgetHelp(m_ui.osdShowSpeed, tr("Show Speed Percentages"), tr("Unchecked"), tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage.")); diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index 220815443a8fa..6bd11fcb30fc0 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -1622,24 +1622,10 @@ - - - - Show Resolution - - - - - - - Show FPS - - - - - + + - Show Frame Times + Show Video Capture Status @@ -1650,24 +1636,17 @@ - - - - Show Inputs - - - - - + + - Show Settings + Show Input Recording Status - - + + - Show Indicators + Show Inputs @@ -1685,24 +1664,31 @@ - - + + - Show PCSX2 Version + Show Frame Times - - + + - Show Input Recording Status + Show Settings - - + + - Show Video Capture Status + Warn About Unsafe Settings + + + + + + + Show Indicators @@ -1720,10 +1706,31 @@ - - + + - Warn About Unsafe Settings + Show FPS + + + + + + + Show PCSX2 Version + + + + + + + Show Resolution + + + + + + + Show VPS diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 3b12a969482a3..8d6daaabe7d7e 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -619,6 +619,7 @@ struct Pcsx2Config SkipDuplicateFrames : 1, OsdShowSpeed : 1, OsdShowFPS : 1, + OsdShowVPS : 1, OsdShowCPU : 1, OsdShowGPU : 1, OsdShowResolution : 1, diff --git a/pcsx2/ImGui/ImGuiOverlays.cpp b/pcsx2/ImGui/ImGuiOverlays.cpp index c997fcec46db3..6aed3e1f4409c 100644 --- a/pcsx2/ImGui/ImGuiOverlays.cpp +++ b/pcsx2/ImGui/ImGuiOverlays.cpp @@ -132,41 +132,45 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f switch (PerformanceMetrics::GetInternalFPSMethod()) { case PerformanceMetrics::InternalFPSMethod::GSPrivilegedRegister: - text.append_format("G: {:.2f} [P] | V: {:.2f}", PerformanceMetrics::GetInternalFPS(), + text.append_format("FPS: {:.2f} [P]", PerformanceMetrics::GetInternalFPS(), PerformanceMetrics::GetFPS()); break; case PerformanceMetrics::InternalFPSMethod::DISPFBBlit: - text.append_format("G: {:.2f} [B] | V: {:.2f}", PerformanceMetrics::GetInternalFPS(), + text.append_format("FPS: {:.2f} [B]", PerformanceMetrics::GetInternalFPS(), PerformanceMetrics::GetFPS()); break; case PerformanceMetrics::InternalFPSMethod::None: default: - text.append_format("V: {:.2f}", PerformanceMetrics::GetFPS()); + text.append_format("FPS: {:.2f}", PerformanceMetrics::GetFPS()); break; } first = false; } + if (GSConfig.OsdShowVPS) + { + text.append_format("{}VPS: {:.2f}", first ? "" : " | ", PerformanceMetrics::GetFPS(), + PerformanceMetrics::GetFPS()); + first = false; + } + if (GSConfig.OsdShowSpeed) { - text.append_format("{}{}%", first ? "" : " | ", static_cast(std::round(speed))); + text.append_format("{}Speed: {}%", first ? "" : " | ", static_cast(std::round(speed))); const float target_speed = VMManager::GetTargetSpeed(); if (target_speed == 0.0f) - text.append(" (Max)"); + text.append(" (T: Max)"); else - text.append_format(" ({:.0f}%)", target_speed * 100.0f); + text.append_format(" (T: {:.0f}%)", target_speed * 100.0f); + first = false; } if (GSConfig.OsdShowVersion) { - if (GSConfig.OsdShowFPS || GSConfig.OsdShowSpeed) - { - text.append_format(" | "); - } - text.append_format("PCSX2 {}", GIT_REV); + text.append_format("{}PCSX2 {}", first ? "" : " | ", GIT_REV); } if (!text.empty()) diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index fc87c91c99475..3e112c93c8bb9 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -624,6 +624,7 @@ Pcsx2Config::GSOptions::GSOptions() OsdPerformancePos = OsdOverlayPos::TopRight; OsdShowSpeed = false; OsdShowFPS = false; + OsdShowVPS = false; OsdShowCPU = false; OsdShowGPU = false; OsdShowResolution = false; @@ -834,6 +835,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) SettingsWrapBitBool(SkipDuplicateFrames); SettingsWrapBitBool(OsdShowSpeed); SettingsWrapBitBool(OsdShowFPS); + SettingsWrapBitBool(OsdShowVPS); SettingsWrapBitBool(OsdShowCPU); SettingsWrapBitBool(OsdShowGPU); SettingsWrapBitBool(OsdShowResolution);