Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/src/duckstation-qt/advancedsettingswidget.cpp
4242 views
1
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <[email protected]>
2
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
3
4
#include "advancedsettingswidget.h"
5
#include "logwindow.h"
6
#include "mainwindow.h"
7
#include "qtutils.h"
8
#include "settingswindow.h"
9
#include "settingwidgetbinder.h"
10
11
#include "core/gpu_types.h"
12
13
#include <QtGui/QCursor>
14
#include <QtWidgets/QMenu>
15
16
#include "moc_advancedsettingswidget.cpp"
17
18
static QCheckBox* addBooleanTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
19
std::string key, bool default_value)
20
{
21
const int row = table->rowCount();
22
23
table->insertRow(row);
24
25
QTableWidgetItem* name_item = new QTableWidgetItem(name);
26
name_item->setFlags(name_item->flags() & ~(Qt::ItemIsEditable | Qt::ItemIsSelectable));
27
table->setItem(row, 0, name_item);
28
29
QCheckBox* cb = new QCheckBox(table);
30
if (!section.empty() || !key.empty())
31
{
32
SettingWidgetBinder::BindWidgetToBoolSetting(dialog->getSettingsInterface(), cb, std::move(section), std::move(key),
33
default_value);
34
}
35
36
table->setCellWidget(row, 1, cb);
37
return cb;
38
}
39
40
static QCheckBox* setBooleanTweakOption(QTableWidget* table, int row, bool value)
41
{
42
QWidget* widget = table->cellWidget(row, 1);
43
QCheckBox* cb = qobject_cast<QCheckBox*>(widget);
44
Assert(cb);
45
cb->setChecked(value);
46
return cb;
47
}
48
49
static QSpinBox* addIntRangeTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
50
std::string key, int min_value, int max_value, int default_value,
51
const QString& suffix = QString())
52
{
53
const int row = table->rowCount();
54
55
table->insertRow(row);
56
57
QTableWidgetItem* name_item = new QTableWidgetItem(name);
58
name_item->setFlags(name_item->flags() & ~(Qt::ItemIsEditable | Qt::ItemIsSelectable));
59
table->setItem(row, 0, name_item);
60
61
QSpinBox* cb = new QSpinBox(table);
62
cb->setMinimum(min_value);
63
cb->setMaximum(max_value);
64
if (!suffix.isEmpty())
65
cb->setSuffix(suffix);
66
67
if (!section.empty() || !key.empty())
68
{
69
SettingWidgetBinder::BindWidgetToIntSetting(dialog->getSettingsInterface(), cb, std::move(section), std::move(key),
70
default_value);
71
}
72
73
table->setCellWidget(row, 1, cb);
74
return cb;
75
}
76
77
static QSpinBox* setIntRangeTweakOption(QTableWidget* table, int row, int value)
78
{
79
QWidget* widget = table->cellWidget(row, 1);
80
QSpinBox* cb = qobject_cast<QSpinBox*>(widget);
81
Assert(cb);
82
cb->setValue(value);
83
return cb;
84
}
85
86
template<typename T>
87
static QComboBox* addChoiceTweakOption(SettingsWindow* dialog, QTableWidget* table, QString name, std::string section,
88
std::string key, std::optional<T> (*parse_callback)(const char*),
89
const char* (*get_value_callback)(T), const char* (*get_display_callback)(T),
90
u32 num_values, T default_value)
91
{
92
const int row = table->rowCount();
93
94
table->insertRow(row);
95
96
QTableWidgetItem* name_item = new QTableWidgetItem(name);
97
name_item->setFlags(name_item->flags() & ~(Qt::ItemIsEditable | Qt::ItemIsSelectable));
98
table->setItem(row, 0, name_item);
99
100
QComboBox* cb = new QComboBox(table);
101
for (u32 i = 0; i < num_values; i++)
102
cb->addItem(QString::fromUtf8(get_display_callback(static_cast<T>(i))));
103
104
if (!section.empty() || !key.empty())
105
{
106
SettingWidgetBinder::BindWidgetToEnumSetting(dialog->getSettingsInterface(), cb, std::move(section), std::move(key),
107
parse_callback, get_value_callback, default_value);
108
}
109
110
table->setCellWidget(row, 1, cb);
111
return cb;
112
}
113
114
template<typename T>
115
static void setChoiceTweakOption(QTableWidget* table, int row, T value)
116
{
117
QWidget* widget = table->cellWidget(row, 1);
118
QComboBox* cb = qobject_cast<QComboBox*>(widget);
119
Assert(cb);
120
cb->setCurrentIndex(static_cast<int>(value));
121
}
122
123
static void addDirectoryOption(SettingsWindow* dialog, QTableWidget* table, const QString& name, std::string section,
124
std::string key)
125
{
126
const int row = table->rowCount();
127
128
table->insertRow(row);
129
130
QTableWidgetItem* name_item = new QTableWidgetItem(name);
131
name_item->setFlags(name_item->flags() & ~(Qt::ItemIsEditable | Qt::ItemIsSelectable));
132
table->setItem(row, 0, name_item);
133
134
QWidget* container = new QWidget(table);
135
136
QHBoxLayout* layout = new QHBoxLayout(container);
137
layout->setContentsMargins(0, 0, 0, 0);
138
139
QLineEdit* value = new QLineEdit(container);
140
value->setObjectName(QStringLiteral("value"));
141
SettingWidgetBinder::BindWidgetToStringSetting(dialog->getSettingsInterface(), value, std::move(section),
142
std::move(key));
143
layout->addWidget(value, 1);
144
145
QPushButton* browse = new QPushButton(container);
146
browse->setText(QStringLiteral("..."));
147
browse->setMaximumWidth(32);
148
QObject::connect(browse, &QPushButton::clicked, browse, [browse, value, name]() {
149
const QString path(QDir::toNativeSeparators(QFileDialog::getExistingDirectory(
150
QtUtils::GetRootWidget(browse), qApp->translate("AdvancedSettingsWidget", "Select folder for %1").arg(name),
151
value->text())));
152
if (!path.isEmpty())
153
value->setText(path);
154
});
155
layout->addWidget(browse, 0);
156
157
table->setCellWidget(row, 1, container);
158
}
159
160
static void setDirectoryOption(QTableWidget* table, int row, const char* value)
161
{
162
QWidget* widget = table->cellWidget(row, 1);
163
Assert(widget);
164
QLineEdit* valuew = widget->findChild<QLineEdit*>(QStringLiteral("value"));
165
Assert(valuew);
166
valuew->setText(QString::fromUtf8(value));
167
}
168
169
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
170
: QWidget(parent), m_dialog(dialog)
171
{
172
SettingsInterface* sif = dialog->getSettingsInterface();
173
174
m_ui.setupUi(this);
175
176
for (u32 i = 0; i < static_cast<u32>(Log::Level::MaxCount); i++)
177
m_ui.logLevel->addItem(QString::fromUtf8(Settings::GetLogLevelDisplayName(static_cast<Log::Level>(i))));
178
179
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.logLevel, "Logging", "LogLevel", &Settings::ParseLogLevelName,
180
&Settings::GetLogLevelName, Settings::DEFAULT_LOG_LEVEL);
181
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logToConsole, "Logging", "LogToConsole", false);
182
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logToDebug, "Logging", "LogToDebug", false);
183
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logToWindow, "Logging", "LogToWindow", false);
184
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logToFile, "Logging", "LogToFile", false);
185
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logTimestamps, "Logging", "LogTimestamps", true);
186
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.logFileTimestamps, "Logging", "LogFileTimestamps", false);
187
connect(m_ui.logToConsole, &QCheckBox::checkStateChanged, this, &AdvancedSettingsWidget::onAnyLogSinksChanged);
188
connect(m_ui.logToWindow, &QCheckBox::checkStateChanged, this, &AdvancedSettingsWidget::onAnyLogSinksChanged);
189
connect(m_ui.logToFile, &QCheckBox::checkStateChanged, this, &AdvancedSettingsWidget::onAnyLogSinksChanged);
190
onAnyLogSinksChanged(); // initialize enabled/disabled state of checkboxes
191
192
connect(m_ui.logChannels, &QToolButton::clicked, this, &AdvancedSettingsWidget::onLogChannelsButtonClicked);
193
194
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.showDebugMenu, "Main", "ShowDebugMenu", false);
195
connect(m_ui.showDebugMenu, &QCheckBox::checkStateChanged, g_main_window, &MainWindow::updateDebugMenuVisibility,
196
Qt::QueuedConnection);
197
connect(m_ui.showDebugMenu, &QCheckBox::checkStateChanged, this,
198
&AdvancedSettingsWidget::onShowDebugOptionsStateChanged);
199
200
connect(m_ui.resetToDefaultButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::onResetToDefaultClicked);
201
202
m_ui.tweakOptionTable->setColumnWidth(0, 380);
203
m_ui.tweakOptionTable->setColumnWidth(1, 170);
204
205
addTweakOptions();
206
207
dialog->registerWidgetHelp(m_ui.logLevel, tr("Log Level"), tr("Information"),
208
tr("Sets the verbosity of messages logged. Higher levels will log more messages."));
209
dialog->registerWidgetHelp(m_ui.logToConsole, tr("Log To System Console"), tr("User Preference"),
210
tr("Logs messages to the console window."));
211
dialog->registerWidgetHelp(m_ui.logToDebug, tr("Log To Debug Console"), tr("User Preference"),
212
tr("Logs messages to the debug console where supported."));
213
dialog->registerWidgetHelp(m_ui.logToWindow, tr("Log To Window"), tr("User Preference"),
214
tr("Logs messages to the window."));
215
dialog->registerWidgetHelp(m_ui.logToFile, tr("Log To File"), tr("User Preference"),
216
tr("Logs messages to duckstation.log in the user directory."));
217
dialog->registerWidgetHelp(m_ui.logTimestamps, tr("Log Timestamps"), tr("User Preference"),
218
tr("Includes the elapsed time since the application start in window and console logs."));
219
dialog->registerWidgetHelp(m_ui.logFileTimestamps, tr("Log File Timestamps"), tr("User Preference"),
220
tr("Includes the elapsed time since the application start in file logs."));
221
dialog->registerWidgetHelp(m_ui.showDebugMenu, tr("Show Debug Menu"), tr("Unchecked"),
222
tr("Shows a debug menu bar with additional statistics and quick settings."));
223
}
224
225
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;
226
227
void AdvancedSettingsWidget::onLogChannelsButtonClicked()
228
{
229
QMenu menu;
230
LogWindow::populateFilterMenu(&menu);
231
menu.exec(QCursor::pos());
232
}
233
234
void AdvancedSettingsWidget::onAnyLogSinksChanged()
235
{
236
const bool log_to_console = m_dialog->getEffectiveBoolValue("Logging", "LogToConsole", false);
237
const bool log_to_window = m_dialog->getEffectiveBoolValue("Logging", "LogToWindow", false);
238
const bool log_to_file = m_dialog->getEffectiveBoolValue("Logging", "LogToFile", false);
239
240
m_ui.logTimestamps->setEnabled(log_to_console || log_to_window);
241
m_ui.logFileTimestamps->setEnabled(log_to_file);
242
}
243
244
void AdvancedSettingsWidget::onShowDebugOptionsStateChanged()
245
{
246
const bool enabled = QtHost::ShouldShowDebugOptions();
247
emit onShowDebugOptionsChanged(enabled);
248
}
249
250
void AdvancedSettingsWidget::addTweakOptions()
251
{
252
if (!m_dialog->isPerGameSettings())
253
{
254
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Apply Game Settings"), "Main", "ApplyGameSettings",
255
true);
256
}
257
258
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Apply Compatibility Settings"), "Main",
259
"ApplyCompatibilitySettings", true);
260
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Load Devices From Save States"), "Main",
261
"LoadDevicesFromSaveStates", false);
262
addChoiceTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Save State Compression"), "Main", "SaveStateCompression",
263
&Settings::ParseSaveStateCompressionModeName, &Settings::GetSaveStateCompressionModeName,
264
&Settings::GetSaveStateCompressionModeDisplayName,
265
static_cast<u32>(SaveStateCompressionMode::Count),
266
Settings::DEFAULT_SAVE_STATE_COMPRESSION_MODE);
267
268
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Disable Window Rounded Corners"), "Main",
269
"DisableWindowRoundedCorners", false);
270
271
if (m_dialog->isPerGameSettings())
272
{
273
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Display Active Start Offset"), "Display",
274
"ActiveStartOffset", -5000, 5000, 0);
275
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Display Active End Offset"), "Display",
276
"ActiveEndOffset", -5000, 5000, 0);
277
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Display Line Start Offset"), "Display",
278
"LineStartOffset", -128, 127, 0);
279
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Display Line End Offset"), "Display", "LineEndOffset",
280
-128, 127, 0);
281
}
282
283
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("DMA Max Slice Ticks"), "Hacks", "DMAMaxSliceTicks", 1,
284
10000, Settings::DEFAULT_DMA_MAX_SLICE_TICKS, tr(" cycles"));
285
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("DMA Halt Ticks"), "Hacks", "DMAHaltTicks", 1, 10000,
286
Settings::DEFAULT_DMA_HALT_TICKS, tr(" cycles"));
287
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("GPU FIFO Size"), "Hacks", "GPUFIFOSize", 16, 4096,
288
Settings::DEFAULT_GPU_FIFO_SIZE, tr(" words"));
289
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("GPU Max Runahead"), "Hacks", "GPUMaxRunAhead", 0, 1000,
290
Settings::DEFAULT_GPU_MAX_RUN_AHEAD, tr(" cycles"));
291
292
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable Recompiler Memory Exceptions"), "CPU",
293
"RecompilerMemoryExceptions", false);
294
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable Recompiler Block Linking"), "CPU",
295
"RecompilerBlockLinking", true);
296
addChoiceTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable Recompiler Fast Memory Access"), "CPU",
297
"FastmemMode", Settings::ParseCPUFastmemMode, Settings::GetCPUFastmemModeName,
298
Settings::GetCPUFastmemModeDisplayName, static_cast<u32>(CPUFastmemMode::Count),
299
Settings::DEFAULT_CPU_FASTMEM_MODE);
300
301
addChoiceTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Mechacon Version"), "CDROM", "MechaconVersion",
302
Settings::ParseCDROMMechVersionName, Settings::GetCDROMMechVersionName,
303
Settings::GetCDROMMechVersionDisplayName, static_cast<u8>(CDROMMechaconVersion::Count),
304
Settings::DEFAULT_CDROM_MECHACON_VERSION);
305
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Readahead Sectors"), "CDROM", "ReadaheadSectors",
306
0, 32, Settings::DEFAULT_CDROM_READAHEAD_SECTORS, tr(" sectors"));
307
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Max Read Speedup Cycles"), "CDROM",
308
"MaxReadSpeedupCycles", 1, 1000000, Settings::DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES,
309
tr(" cycles"));
310
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Max Seek Speedup Cycles"), "CDROM",
311
"MaxSeekSpeedupCycles", 1, 1000000, Settings::DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES,
312
tr(" cycles"));
313
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Disable Speedup on MDEC"), "CDROM",
314
"DisableSpeedupOnMDEC", false);
315
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Region Check"), "CDROM", "RegionCheck", false);
316
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM SubQ Skew"), "CDROM", "SubQSkew", false);
317
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Allow Booting Without SBI File"), "CDROM",
318
"AllowBootingWithoutSBIFile", false);
319
320
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable GDB Server"), "Debug", "EnableGDBServer", false);
321
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("GDB Server Port"), "Debug", "GDBServerPort", 1, 65535,
322
Settings::DEFAULT_GDB_SERVER_PORT);
323
324
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Export Shared Memory"), "Hacks", "ExportSharedMemory",
325
false);
326
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Redirect SIO to TTY"), "SIO", "RedirectToTTY", false);
327
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable PCDrv"), "PCDrv", "Enabled", false);
328
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Enable PCDrv Writes"), "PCDrv", "EnableWrites", false);
329
addDirectoryOption(m_dialog, m_ui.tweakOptionTable, tr("PCDrv Root Directory"), "PCDrv", "Root");
330
}
331
332
void AdvancedSettingsWidget::onResetToDefaultClicked()
333
{
334
if (!m_dialog->isPerGameSettings())
335
{
336
int i = 0;
337
338
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply Game Settings
339
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply Compatibility settings
340
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Load Devices From Save States
341
setChoiceTweakOption(m_ui.tweakOptionTable, i++,
342
Settings::DEFAULT_SAVE_STATE_COMPRESSION_MODE); // Save State Compression
343
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Window Rounded Corners
344
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
345
static_cast<int>(Settings::DEFAULT_DMA_MAX_SLICE_TICKS)); // DMA max slice ticks
346
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
347
static_cast<int>(Settings::DEFAULT_DMA_HALT_TICKS)); // DMA halt ticks
348
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
349
static_cast<int>(Settings::DEFAULT_GPU_FIFO_SIZE)); // GPU FIFO size
350
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
351
static_cast<int>(Settings::DEFAULT_GPU_MAX_RUN_AHEAD)); // GPU max runahead
352
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Recompiler memory exceptions
353
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Recompiler block linking
354
setChoiceTweakOption(m_ui.tweakOptionTable, i++,
355
Settings::DEFAULT_CPU_FASTMEM_MODE); // Recompiler fastmem mode
356
setChoiceTweakOption(m_ui.tweakOptionTable, i++,
357
Settings::DEFAULT_CDROM_MECHACON_VERSION); // CDROM Mechacon Version
358
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
359
Settings::DEFAULT_CDROM_READAHEAD_SECTORS); // CD-ROM Readahead Sectors
360
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
361
Settings::DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES); // CD-ROM Max Speedup Read Cycles
362
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
363
Settings::DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES); // CD-ROM Max Speedup Seek Cycles
364
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM Disable Speedup on MDEC
365
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM Region Check
366
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM SubQ Skew
367
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Allow booting without SBI file
368
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable GDB Server
369
setIntRangeTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_GDB_SERVER_PORT); // GDB Server Port
370
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Export Shared Memory
371
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Redirect SIO to TTY
372
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable PCDRV
373
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable PCDRV Writes
374
setDirectoryOption(m_ui.tweakOptionTable, i++, ""); // PCDrv Root Directory
375
376
return;
377
}
378
379
// for per-game it's easier to just clear and recreate
380
INISettingsInterface* sif = m_dialog->getSettingsInterface();
381
sif->DeleteValue("Main", "ApplyCompatibilitySettings");
382
sif->DeleteValue("Main", "LoadDevicesFromSaveStates");
383
sif->DeleteValue("Main", "CompressSaveStates");
384
sif->DeleteValue("Main", "DisableWindowRoundedCorners");
385
sif->DeleteValue("Display", "ActiveStartOffset");
386
sif->DeleteValue("Display", "ActiveEndOffset");
387
sif->DeleteValue("Display", "LineStartOffset");
388
sif->DeleteValue("Display", "LineEndOffset");
389
sif->DeleteValue("Hacks", "DMAMaxSliceTicks");
390
sif->DeleteValue("Hacks", "DMAHaltTicks");
391
sif->DeleteValue("Hacks", "GPUFIFOSize");
392
sif->DeleteValue("Hacks", "GPUMaxRunAhead");
393
sif->DeleteValue("Hacks", "ExportSharedMemory");
394
sif->DeleteValue("CPU", "RecompilerMemoryExceptions");
395
sif->DeleteValue("CPU", "RecompilerBlockLinking");
396
sif->DeleteValue("CPU", "FastmemMode");
397
sif->DeleteValue("CDROM", "MechaconVersion");
398
sif->DeleteValue("CDROM", "ReadaheadSectors");
399
sif->DeleteValue("CDROM", "MaxReadSpeedupCycles");
400
sif->DeleteValue("CDROM", "MaxSeekSpeedupCycles");
401
sif->DeleteValue("CDROM", "DisableSpeedupOnMDEC");
402
sif->DeleteValue("CDROM", "RegionCheck");
403
sif->DeleteValue("CDROM", "SubQSkew");
404
sif->DeleteValue("CDROM", "AllowBootingWithoutSBIFile");
405
sif->DeleteValue("Debug", "EnableGDBServer");
406
sif->DeleteValue("Debug", "GDBServerPort");
407
sif->DeleteValue("SIO", "RedirectToTTY");
408
sif->DeleteValue("PCDrv", "Enabled");
409
sif->DeleteValue("PCDrv", "EnableWrites");
410
sif->DeleteValue("PCDrv", "Root");
411
sif->Save();
412
while (m_ui.tweakOptionTable->rowCount() > 0)
413
m_ui.tweakOptionTable->removeRow(m_ui.tweakOptionTable->rowCount() - 1);
414
addTweakOptions();
415
}
416
417