OSD: Rename various fields

This commit is contained in:
JordanTheToaster 2024-09-14 14:40:48 +01:00 committed by Ty
parent d12ef2b17c
commit d9c5f22d1e
6 changed files with 74 additions and 56 deletions

View File

@ -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;
}

View File

@ -117,6 +117,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.osdPerformancePos, "EmuCore/GS", "OsdPerformancePos", static_cast<int>(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."));

View File

@ -1622,24 +1622,10 @@
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="osdOptionLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowResolution">
<item row="6" column="1">
<widget class="QCheckBox" name="osdShowVideoCapture">
<property name="text">
<string>Show Resolution</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
<string>Show FPS</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<property name="text">
<string>Show Frame Times</string>
<string>Show Video Capture Status</string>
</property>
</widget>
</item>
@ -1650,6 +1636,13 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="osdShowInputRec">
<property name="text">
<string>Show Input Recording Status</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<property name="text">
@ -1657,20 +1650,6 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<property name="text">
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowIndicators">
<property name="text">
<string>Show Indicators</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<property name="text">
@ -1685,24 +1664,31 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowVersion">
<item row="5" column="0">
<widget class="QCheckBox" name="osdShowFrameTimes">
<property name="text">
<string>Show PCSX2 Version</string>
<string>Show Frame Times</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="osdShowInputRec">
<item row="3" column="1">
<widget class="QCheckBox" name="osdShowSettings">
<property name="text">
<string>Show Input Recording Status</string>
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="osdShowVideoCapture">
<item row="7" column="0">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Show Video Capture Status</string>
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowIndicators">
<property name="text">
<string>Show Indicators</string>
</property>
</widget>
</item>
@ -1720,10 +1706,31 @@
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
<string>Warn About Unsafe Settings</string>
<string>Show FPS</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="osdShowVersion">
<property name="text">
<string>Show PCSX2 Version</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowResolution">
<property name="text">
<string>Show Resolution</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowVPS">
<property name="text">
<string>Show VPS</string>
</property>
</widget>
</item>

View File

@ -619,6 +619,7 @@ struct Pcsx2Config
SkipDuplicateFrames : 1,
OsdShowSpeed : 1,
OsdShowFPS : 1,
OsdShowVPS : 1,
OsdShowCPU : 1,
OsdShowGPU : 1,
OsdShowResolution : 1,

View File

@ -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<u32>(std::round(speed)));
text.append_format("{}Speed: {}%", first ? "" : " | ", static_cast<u32>(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())

View File

@ -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);