Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10527 from AdmiralCurtiss/speedlimit-combobox-fix
DolphinQt: Set emulation speed setting only when the combobox is actually touched.
  • Loading branch information
AdmiralCurtiss committed Mar 22, 2022
2 parents b466b9e + c661a75 commit c4dfd47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source/Core/DolphinQt/Settings/GeneralPane.cpp
Expand Up @@ -112,8 +112,11 @@ void GeneralPane::ConnectLayout()
}

// Advanced
connect(m_combobox_speedlimit, qOverload<int>(&QComboBox::currentIndexChanged),
[this]() { OnSaveConfig(); });
connect(m_combobox_speedlimit, qOverload<int>(&QComboBox::currentIndexChanged), [this]() {
Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
m_combobox_speedlimit->currentIndex() * 0.1f);
Config::Save();
});

connect(m_combobox_fallback_region, qOverload<int>(&QComboBox::currentIndexChanged), this,
&GeneralPane::OnSaveConfig);
Expand Down Expand Up @@ -354,8 +357,6 @@ void GeneralPane::OnSaveConfig()
m_checkbox_override_region_settings->isChecked());
Config::SetBase(Config::MAIN_AUTO_DISC_CHANGE, m_checkbox_auto_disc_change->isChecked());
Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, m_checkbox_cheats->isChecked());
Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
m_combobox_speedlimit->currentIndex() * 0.1f);
Settings::Instance().SetFallbackRegion(
UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex()));

Expand Down

0 comments on commit c4dfd47

Please sign in to comment.