Rename Fast Disc Speed to Emulate Disc Speed and invert option

This commit is contained in:
Charles Lombardo 2023-02-07 14:50:43 -05:00
parent d0941342d2
commit 0ed64b080f
2 changed files with 26 additions and 10 deletions

View File

@ -38,8 +38,8 @@ GameConfigEdit::GameConfigEdit(QWidget* parent, QString path, bool read_only)
"cause issues. Defaults to <b>True</b>")); "cause issues. Defaults to <b>True</b>"));
AddDescription(QStringLiteral("FastDiscSpeed"), AddDescription(QStringLiteral("FastDiscSpeed"),
tr("Shortens loading times but may break some games. Can have negative effects on " tr("Emulate the disc speed of real hardware. Disabling can cause instability. "
"performance. Defaults to <b>False</b>")); "Defaults to <b>True</b>"));
AddDescription(QStringLiteral("MMU"), tr("Controls whether or not the Memory Management Unit " AddDescription(QStringLiteral("MMU"), tr("Controls whether or not the Memory Management Unit "
"should be emulated fully. Few games require it.")); "should be emulated fully. Few games require it."));

View File

@ -88,7 +88,7 @@ void GameConfigWidget::CreateWidgets()
m_enable_mmu = new QCheckBox(tr("Enable MMU")); m_enable_mmu = new QCheckBox(tr("Enable MMU"));
m_enable_fprf = new QCheckBox(tr("Enable FPRF")); m_enable_fprf = new QCheckBox(tr("Enable FPRF"));
m_sync_gpu = new QCheckBox(tr("Synchronize GPU thread")); m_sync_gpu = new QCheckBox(tr("Synchronize GPU thread"));
m_enable_fast_disc = new QCheckBox(tr("Speed up Disc Transfer Rate")); m_enable_fast_disc = new QCheckBox(tr("Emulate Disc Speed"));
m_use_dsp_hle = new QCheckBox(tr("DSP HLE (fast)")); m_use_dsp_hle = new QCheckBox(tr("DSP HLE (fast)"));
m_deterministic_dual_core = new QComboBox; m_deterministic_dual_core = new QComboBox;
@ -102,8 +102,9 @@ void GameConfigWidget::CreateWidgets()
"games. (ON = Compatible, OFF = Fast)")); "games. (ON = Compatible, OFF = Fast)"));
m_sync_gpu->setToolTip(tr("Synchronizes the GPU and CPU threads to help prevent random freezes " m_sync_gpu->setToolTip(tr("Synchronizes the GPU and CPU threads to help prevent random freezes "
"in Dual core mode. (ON = Compatible, OFF = Fast)")); "in Dual core mode. (ON = Compatible, OFF = Fast)"));
m_enable_fast_disc->setToolTip(tr("Enable fast disc access. This can cause crashes and other " m_enable_fast_disc->setToolTip(tr("Enable emulated disc speed. Disabling this can cause crashes "
"problems in some games. (ON = Fast, OFF = Compatible)")); "and other problems in some games. "
"(ON = Compatible, OFF = Unlocked)"));
core_layout->addWidget(m_enable_dual_core, 0, 0); core_layout->addWidget(m_enable_dual_core, 0, 0);
core_layout->addWidget(m_enable_mmu, 1, 0); core_layout->addWidget(m_enable_mmu, 1, 0);
@ -221,13 +222,22 @@ void GameConfigWidget::LoadCheckBox(QCheckBox* checkbox, const std::string& sect
const std::string& key) const std::string& key)
{ {
bool checked; bool checked;
if (key == "FastDiscSpeed")
{
if (m_gameini_local.GetOrCreateSection(section)->Get("FastDiscSpeed", &checked))
return checkbox->setCheckState(!checked ? Qt::Checked : Qt::Unchecked);
if (m_gameini_local.GetOrCreateSection(section)->Get(key, &checked)) if (m_gameini_default.GetOrCreateSection(section)->Get("FastDiscSpeed", &checked))
return checkbox->setCheckState(checked ? Qt::Checked : Qt::Unchecked); return checkbox->setCheckState(!checked ? Qt::Checked : Qt::Unchecked);
}
if (m_gameini_default.GetOrCreateSection(section)->Get(key, &checked)) else
return checkbox->setCheckState(checked ? Qt::Checked : Qt::Unchecked); {
if (m_gameini_local.GetOrCreateSection(section)->Get(key, &checked))
return checkbox->setCheckState(checked ? Qt::Checked : Qt::Unchecked);
if (m_gameini_default.GetOrCreateSection(section)->Get(key, &checked))
return checkbox->setCheckState(checked ? Qt::Checked : Qt::Unchecked);
}
checkbox->setCheckState(Qt::PartiallyChecked); checkbox->setCheckState(Qt::PartiallyChecked);
} }
@ -248,6 +258,12 @@ void GameConfigWidget::SaveCheckBox(QCheckBox* checkbox, const std::string& sect
bool checked = checkbox->checkState() == Qt::Checked; bool checked = checkbox->checkState() == Qt::Checked;
if (key == "FastDiscSpeed")
{
m_gameini_local.GetOrCreateSection(section)->Set(key, !checked);
return;
}
if (m_gameini_default.Exists(section, key)) if (m_gameini_default.Exists(section, key))
{ {
bool default_value; bool default_value;