Qt: Move blit swap chain option to display settings

This commit is contained in:
Connor McLaughlin 2020-12-25 17:42:07 +10:00
parent 4bca193ee1
commit 6de53054c1
3 changed files with 46 additions and 35 deletions

View file

@ -144,6 +144,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
m_ui.tweakOptionTable->setColumnWidth(0, 380); m_ui.tweakOptionTable->setColumnWidth(0, 380);
addIntRangeTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Display FPS Limit"), "Display", "MaxFPS", 0, 1000,
0);
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP Vertex Cache"), "GPU", "PGXPVertexCache", addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP Vertex Cache"), "GPU", "PGXPVertexCache",
false); false);
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP CPU Mode"), "GPU", "PGXPCPU", false); addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("PGXP CPU Mode"), "GPU", "PGXPCPU", false);
@ -173,36 +176,28 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
1000, Settings::DEFAULT_GPU_MAX_RUN_AHEAD); 1000, Settings::DEFAULT_GPU_MAX_RUN_AHEAD);
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Use Debug Host GPU Device"), "GPU", addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Use Debug Host GPU Device"), "GPU",
"UseDebugDevice", false); "UseDebugDevice", false);
addIntRangeTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Display FPS Limit"), "Display", "MaxFPS", 0, 1000,
0);
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Increase Timer Resolution"), "Main", addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Increase Timer Resolution"), "Main",
"IncreaseTimerResolution", true); "IncreaseTimerResolution", true);
#ifdef WIN32
addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Use Blit Swap Chain"), "Display",
"UseBlitSwapChain", false);
#endif
} }
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default; AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;
void AdvancedSettingsWidget::onResetToDefaultClicked() void AdvancedSettingsWidget::onResetToDefaultClicked()
{ {
setBooleanTweakOption(m_ui.tweakOptionTable, 0, false); setIntRangeTweakOption(m_ui.tweakOptionTable, 0, 0);
setBooleanTweakOption(m_ui.tweakOptionTable, 1, false); setBooleanTweakOption(m_ui.tweakOptionTable, 1, false);
setBooleanTweakOption(m_ui.tweakOptionTable, 2, false); setBooleanTweakOption(m_ui.tweakOptionTable, 2, false);
setFloatRangeTweakOption(m_ui.tweakOptionTable, 3, -1.0f); setBooleanTweakOption(m_ui.tweakOptionTable, 3, false);
setFloatRangeTweakOption(m_ui.tweakOptionTable, 4, Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD); setFloatRangeTweakOption(m_ui.tweakOptionTable, 4, -1.0f);
setBooleanTweakOption(m_ui.tweakOptionTable, 5, false); setFloatRangeTweakOption(m_ui.tweakOptionTable, 5, Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD);
setChoiceTweakOption(m_ui.tweakOptionTable, 6, Settings::DEFAULT_CPU_FASTMEM_MODE); setBooleanTweakOption(m_ui.tweakOptionTable, 6, false);
setBooleanTweakOption(m_ui.tweakOptionTable, 7, false); setChoiceTweakOption(m_ui.tweakOptionTable, 7, Settings::DEFAULT_CPU_FASTMEM_MODE);
setIntRangeTweakOption(m_ui.tweakOptionTable, 8, static_cast<int>(Settings::DEFAULT_DMA_MAX_SLICE_TICKS)); setBooleanTweakOption(m_ui.tweakOptionTable, 8, false);
setIntRangeTweakOption(m_ui.tweakOptionTable, 9, static_cast<int>(Settings::DEFAULT_DMA_HALT_TICKS)); setIntRangeTweakOption(m_ui.tweakOptionTable, 9, static_cast<int>(Settings::DEFAULT_DMA_MAX_SLICE_TICKS));
setIntRangeTweakOption(m_ui.tweakOptionTable, 10, static_cast<int>(Settings::DEFAULT_GPU_FIFO_SIZE)); setIntRangeTweakOption(m_ui.tweakOptionTable, 10, static_cast<int>(Settings::DEFAULT_DMA_HALT_TICKS));
setIntRangeTweakOption(m_ui.tweakOptionTable, 11, static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD)); setIntRangeTweakOption(m_ui.tweakOptionTable, 11, static_cast<int>(Settings::DEFAULT_GPU_FIFO_SIZE));
setBooleanTweakOption(m_ui.tweakOptionTable, 12, false); setIntRangeTweakOption(m_ui.tweakOptionTable, 12, static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD));
setIntRangeTweakOption(m_ui.tweakOptionTable, 13, 0); setBooleanTweakOption(m_ui.tweakOptionTable, 13, false);
setBooleanTweakOption(m_ui.tweakOptionTable, 14, true); setBooleanTweakOption(m_ui.tweakOptionTable, 14, true);
#ifdef WIN32
setBooleanTweakOption(m_ui.tweakOptionTable, 15, false);
#endif
} }

View file

@ -99,6 +99,18 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
dialog->registerWidgetHelp( dialog->registerWidgetHelp(
m_ui.showSpeed, tr("Show Speed"), tr("Unchecked"), m_ui.showSpeed, tr("Show Speed"), tr("Unchecked"),
tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage.")); tr("Shows the current emulation speed of the system in the top-right corner of the display as a percentage."));
#ifdef _WIN32
{
QCheckBox* cb = new QCheckBox(tr("Use Blit Swap Chain"), m_ui.basicGroupBox);
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, cb, "Display", "UseBlitSwapChain", false);
m_ui.basicCheckboxGridLayout->addWidget(cb, 1, 0, 1, 1);
dialog->registerWidgetHelp(cb, tr("Use Blit Swap Chain"), tr("Unchecked"),
tr("Uses a blit presentation model instead of flipping when using the Direct3D 11 "
"renderer. This usually results in slower performance, but may be required for some "
"streaming applications, or to uncap framerates on some systems."));
}
#endif
} }
DisplaySettingsWidget::~DisplaySettingsWidget() = default; DisplaySettingsWidget::~DisplaySettingsWidget() = default;

View file

@ -27,11 +27,11 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="basicGroupBox">
<property name="title"> <property name="title">
<string>Basic</string> <string>Basic</string>
</property> </property>
<layout class="QFormLayout" name="formLayout_3"> <layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@ -63,18 +63,22 @@
<widget class="QComboBox" name="fullscreenMode"/> <widget class="QComboBox" name="fullscreenMode"/>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="gpuThread"> <layout class="QGridLayout" name="basicCheckboxGridLayout">
<property name="text"> <item row="0" column="0">
<string>Threaded Rendering</string> <widget class="QCheckBox" name="gpuThread">
</property> <property name="text">
</widget> <string>Threaded Rendering</string>
</item> </property>
<item row="4" column="0" colspan="2"> </widget>
<widget class="QCheckBox" name="vsync"> </item>
<property name="text"> <item row="0" column="1">
<string>VSync</string> <widget class="QCheckBox" name="vsync">
</property> <property name="text">
</widget> <string>VSync</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>