mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Qt: Add performance overlay options to the emu tab in the settings dialog
This commit is contained in:
parent
cc50d503ef
commit
c5709f71b3
5 changed files with 154 additions and 22 deletions
|
@ -403,7 +403,7 @@ struct cfg_root : cfg::node
|
||||||
|
|
||||||
struct node_perf_overlay : cfg::node
|
struct node_perf_overlay : cfg::node
|
||||||
{
|
{
|
||||||
node_perf_overlay(cfg::node* _this) : cfg::node(_this, "Perfomance Overlay") {}
|
node_perf_overlay(cfg::node* _this) : cfg::node(_this, "Performance Overlay") {}
|
||||||
|
|
||||||
cfg::_bool perf_overlay_enabled{this, "Enabled", false};
|
cfg::_bool perf_overlay_enabled{this, "Enabled", false};
|
||||||
cfg::_enum<detail_level> level{this, "Detail level", detail_level::high};
|
cfg::_enum<detail_level> level{this, "Detail level", detail_level::high};
|
||||||
|
|
|
@ -63,6 +63,12 @@
|
||||||
"maxLLVMThreads": "Limits the maximum number of threads used for PPU Module compilation.\nLower this in order to increase performance of other open applications.\nThe default uses all available threads.",
|
"maxLLVMThreads": "Limits the maximum number of threads used for PPU Module compilation.\nLower this in order to increase performance of other open applications.\nThe default uses all available threads.",
|
||||||
"showShaderCompilationHint": "Show shader compilation hints using the native overlay.",
|
"showShaderCompilationHint": "Show shader compilation hints using the native overlay.",
|
||||||
"useNativeInterface": "Enables use of native HUD within the game window that can interact with game controllers.\nWhen disabled, regular Qt dialogs are used instead.\nCurrently, only the English language is supported."
|
"useNativeInterface": "Enables use of native HUD within the game window that can interact with game controllers.\nWhen disabled, regular Qt dialogs are used instead.\nCurrently, only the English language is supported."
|
||||||
|
},
|
||||||
|
"overlay": {
|
||||||
|
"perfOverlayEnabled": "Enables or disables the performance overlay.",
|
||||||
|
"perfOverlayDetailLevel": "Controls the amount of information displayed on the performance overlay.",
|
||||||
|
"perfOverlayUpdateInterval": "Sets the time interval in which the performance overlay is being updated (measured in milliseconds).",
|
||||||
|
"perfOverlayFontSize": "Sets the font size of the performance overlay (measured in pixels)."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gpu": {
|
"gpu": {
|
||||||
|
|
|
@ -68,6 +68,12 @@ public:
|
||||||
DisableOnDiskShaderCache,
|
DisableOnDiskShaderCache,
|
||||||
DisableVulkanMemAllocator,
|
DisableVulkanMemAllocator,
|
||||||
|
|
||||||
|
// Performance Overlay
|
||||||
|
PerfOverlayEnabled,
|
||||||
|
PerfOverlayDetailLevel,
|
||||||
|
PerfOverlayUpdateInterval,
|
||||||
|
PerfOverlayFontSize,
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
AudioRenderer,
|
AudioRenderer,
|
||||||
DumpToFile,
|
DumpToFile,
|
||||||
|
@ -223,13 +229,19 @@ private:
|
||||||
{ DisableFIFOReordering, { "Video", "Disable FIFO Reordering" }},
|
{ DisableFIFOReordering, { "Video", "Disable FIFO Reordering" }},
|
||||||
{ ForceCPUBlitEmulation, { "Video", "Force CPU Blit" }},
|
{ ForceCPUBlitEmulation, { "Video", "Force CPU Blit" }},
|
||||||
{ DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}},
|
{ DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}},
|
||||||
{ DisableVulkanMemAllocator, { "Video", "Disable Vulkan Memory Allocator" }},
|
{ DisableVulkanMemAllocator,{ "Video", "Disable Vulkan Memory Allocator" }},
|
||||||
{ AnisotropicFilterOverride,{ "Video", "Anisotropic Filter Override" }},
|
{ AnisotropicFilterOverride,{ "Video", "Anisotropic Filter Override" }},
|
||||||
{ ResolutionScale, { "Video", "Resolution Scale" }},
|
{ ResolutionScale, { "Video", "Resolution Scale" }},
|
||||||
{ MinimumScalableDimension, { "Video", "Minimum Scalable Dimension" }},
|
{ MinimumScalableDimension, { "Video", "Minimum Scalable Dimension" }},
|
||||||
{ D3D12Adapter, { "Video", "D3D12", "Adapter"}},
|
{ D3D12Adapter, { "Video", "D3D12", "Adapter"}},
|
||||||
{ VulkanAdapter, { "Video", "Vulkan", "Adapter"}},
|
{ VulkanAdapter, { "Video", "Vulkan", "Adapter"}},
|
||||||
|
|
||||||
|
// Performance Overlay
|
||||||
|
{ PerfOverlayEnabled, { "Video", "Performance Overlay", "Enabled" } },
|
||||||
|
{ PerfOverlayDetailLevel, { "Video", "Performance Overlay", "Detail level" } },
|
||||||
|
{ PerfOverlayUpdateInterval,{ "Video", "Performance Overlay", "Metrics update interval (ms)" } },
|
||||||
|
{ PerfOverlayFontSize, { "Video", "Performance Overlay", "Font size (px)" } },
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
{ AudioRenderer, { "Audio", "Renderer"}},
|
{ AudioRenderer, { "Audio", "Renderer"}},
|
||||||
{ DumpToFile, { "Audio", "Dump to file"}},
|
{ DumpToFile, { "Audio", "Dump to file"}},
|
||||||
|
|
|
@ -80,8 +80,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
QJsonObject json_sys = json_obj.value("system").toObject();
|
QJsonObject json_sys = json_obj.value("system").toObject();
|
||||||
QJsonObject json_net = json_obj.value("network").toObject();
|
QJsonObject json_net = json_obj.value("network").toObject();
|
||||||
|
|
||||||
QJsonObject json_emu = json_obj.value("emulator").toObject();
|
QJsonObject json_emu = json_obj.value("emulator").toObject();
|
||||||
QJsonObject json_emu_misc = json_emu.value("misc").toObject();
|
QJsonObject json_emu_misc = json_emu.value("misc").toObject();
|
||||||
|
QJsonObject json_emu_overlay = json_emu.value("overlay").toObject();
|
||||||
|
|
||||||
QJsonObject json_gui = json_obj.value("gui").toObject();
|
QJsonObject json_gui = json_obj.value("gui").toObject();
|
||||||
|
|
||||||
|
@ -699,6 +700,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
SubscribeTooltip(ui->maxLLVMThreads, json_emu_misc["maxLLVMThreads"].toString());
|
SubscribeTooltip(ui->maxLLVMThreads, json_emu_misc["maxLLVMThreads"].toString());
|
||||||
ui->maxLLVMThreads->setItemText(ui->maxLLVMThreads->findData("0"), tr("All (%1)").arg(std::thread::hardware_concurrency()));
|
ui->maxLLVMThreads->setItemText(ui->maxLLVMThreads->findData("0"), tr("All (%1)").arg(std::thread::hardware_concurrency()));
|
||||||
|
|
||||||
|
xemu_settings->EnhanceComboBox(ui->perfOverlayDetailLevel, emu_settings::PerfOverlayDetailLevel);
|
||||||
|
SubscribeTooltip(ui->perfOverlayDetailLevel, json_emu_overlay["perfOverlayDetailLevel"].toString());
|
||||||
|
|
||||||
// Checkboxes
|
// Checkboxes
|
||||||
|
|
||||||
SubscribeTooltip(ui->gs_resizeOnBoot, json_emu_misc["gs_resizeOnBoot"].toString());
|
SubscribeTooltip(ui->gs_resizeOnBoot, json_emu_misc["gs_resizeOnBoot"].toString());
|
||||||
|
@ -726,6 +730,39 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
xemu_settings->EnhanceCheckBox(ui->showShaderCompilationHint, emu_settings::ShowShaderCompilationHint);
|
xemu_settings->EnhanceCheckBox(ui->showShaderCompilationHint, emu_settings::ShowShaderCompilationHint);
|
||||||
SubscribeTooltip(ui->showShaderCompilationHint, json_emu_misc["showShaderCompilationHint"].toString());
|
SubscribeTooltip(ui->showShaderCompilationHint, json_emu_misc["showShaderCompilationHint"].toString());
|
||||||
|
|
||||||
|
xemu_settings->EnhanceCheckBox(ui->perfOverlayEnabled, emu_settings::PerfOverlayEnabled);
|
||||||
|
SubscribeTooltip(ui->perfOverlayEnabled, json_emu_overlay["perfOverlayEnabled"].toString());
|
||||||
|
auto EnablePerfOverlayOptions = [this](bool enabled)
|
||||||
|
{
|
||||||
|
ui->label_detail_level->setEnabled(enabled);
|
||||||
|
ui->label_update_interval->setEnabled(enabled);
|
||||||
|
ui->label_font_size->setEnabled(enabled);
|
||||||
|
ui->perfOverlayDetailLevel->setEnabled(enabled);
|
||||||
|
ui->perfOverlayUpdateInterval->setEnabled(enabled);
|
||||||
|
ui->perfOverlayFontSize->setEnabled(enabled);
|
||||||
|
};
|
||||||
|
EnablePerfOverlayOptions(ui->perfOverlayEnabled->isChecked());
|
||||||
|
connect(ui->perfOverlayEnabled, &QCheckBox::clicked, EnablePerfOverlayOptions);
|
||||||
|
|
||||||
|
// Sliders
|
||||||
|
|
||||||
|
xemu_settings->EnhanceSlider(ui->perfOverlayUpdateInterval, emu_settings::PerfOverlayUpdateInterval, true);
|
||||||
|
SubscribeTooltip(ui->perfOverlayUpdateInterval, json_emu_overlay["perfOverlayUpdateInterval"].toString());
|
||||||
|
ui->label_update_interval->setText(tr("Update Interval: %0 ms").arg(ui->perfOverlayUpdateInterval->value()));
|
||||||
|
connect(ui->perfOverlayUpdateInterval, &QSlider::valueChanged, [this](int value)
|
||||||
|
{
|
||||||
|
ui->label_update_interval->setText(tr("Update Interval: %0 ms").arg(value));
|
||||||
|
});
|
||||||
|
|
||||||
|
xemu_settings->EnhanceSlider(ui->perfOverlayFontSize, emu_settings::PerfOverlayFontSize, true);
|
||||||
|
SubscribeTooltip(ui->perfOverlayFontSize, json_emu_overlay["perfOverlayFontSize"].toString());
|
||||||
|
ui->label_font_size->setText(tr("Font Size: %0 px").arg(ui->perfOverlayFontSize->value()));
|
||||||
|
connect(ui->perfOverlayFontSize, &QSlider::valueChanged, [this](int value)
|
||||||
|
{
|
||||||
|
ui->label_font_size->setText(tr("Font Size: %0 px").arg(value));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global settings (gui_settings)
|
||||||
if (!game)
|
if (!game)
|
||||||
{
|
{
|
||||||
ui->gs_disableMouse->setChecked(xgui_settings->GetValue(gui::gs_disableMouse).toBool());
|
ui->gs_disableMouse->setChecked(xgui_settings->GetValue(gui::gs_disableMouse).toBool());
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>7</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="coreTab">
|
<widget class="QWidget" name="coreTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1401,29 +1401,106 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_14">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_14">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_58"/>
|
<layout class="QVBoxLayout" name="verticalLayout_58">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gb_performance_overlay">
|
||||||
|
<property name="title">
|
||||||
|
<string>Performance Overlay</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_67">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="perfOverlayEnabled">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable performance overlay</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_detail_level">
|
||||||
|
<property name="text">
|
||||||
|
<string>Detail Level:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="perfOverlayDetailLevel"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_update_interval">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update Interval:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="perfOverlayUpdateInterval">
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_font_size">
|
||||||
|
<property name="text">
|
||||||
|
<string>Font Size: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="perfOverlayFontSize">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_18">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>55</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue