Qt: Move debug GPU device to advanced options

This commit is contained in:
Connor McLaughlin 2020-08-09 00:03:07 +10:00
parent 70767dc6bf
commit 96b86acb4f
4 changed files with 25 additions and 13 deletions

View file

@ -1,4 +1,5 @@
#include "advancedsettingswidget.h"
#include "settingsdialog.h"
#include "settingwidgetbinder.h"
AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog)
@ -26,7 +27,13 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.cpuRecompilerMemoryExceptions, "CPU",
"RecompilerMemoryExceptions", false);
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.gpuUseDebugDevice, "GPU", "UseDebugDevice");
connect(m_ui.resetToDefaultButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::onResetToDefaultClicked);
dialog->registerWidgetHelp(m_ui.gpuUseDebugDevice, tr("Use Debug Host GPU Device"), tr("Unchecked"),
tr("Enables the usage of debug devices and shaders for rendering APIs which support them. "
"Should only be used when debugging the emulator."));
}
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>502</width>
<height>501</height>
<height>623</height>
</rect>
</property>
<property name="windowTitle">
@ -201,6 +201,22 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>System Settings</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="gpuUseDebugDevice">
<property name="text">
<string>Use Debug Host GPU Device</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">

View file

@ -19,7 +19,6 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
SettingWidgetBinder::BindWidgetToEnumSetting(m_host_interface, m_ui.renderer, "GPU", "Renderer",
&Settings::ParseRendererName, &Settings::GetRendererName,
Settings::DEFAULT_GPU_RENDERER);
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.useDebugDevice, "GPU", "UseDebugDevice");
SettingWidgetBinder::BindWidgetToEnumSetting(m_host_interface, m_ui.displayAspectRatio, "Display", "AspectRatio",
&Settings::ParseDisplayAspectRatio, &Settings::GetDisplayAspectRatioName,
Settings::DEFAULT_DISPLAY_ASPECT_RATIO);
@ -70,9 +69,6 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
m_ui.adapter, tr("Adapter"), tr("(Default)"),
tr("If your system contains multiple GPUs or adapters, you can select which GPU you wish to use for the hardware "
"renderers. This option is only supported in Direct3D and Vulkan, OpenGL will always use the default device."));
dialog->registerWidgetHelp(m_ui.useDebugDevice, tr("Use Debug Device"), tr("Unchecked"),
tr("Enables the usage of debug devices and shaders for rendering APIs which support them. "
"Should only be used when debugging the emulator."));
dialog->registerWidgetHelp(
m_ui.displayAspectRatio, tr("Aspect Ratio"), QStringLiteral("4:3"),
tr("Changes the aspect ratio used to display the console's output to the screen. The default "

View file

@ -37,7 +37,7 @@
<x>0</x>
<y>0</y>
<width>423</width>
<height>762</height>
<height>756</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
@ -67,13 +67,6 @@
<item row="1" column="1">
<widget class="QComboBox" name="adapter"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="useDebugDevice">
<property name="text">
<string>Use Debug Device</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>