mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-07 17:56:50 +02:00
DolphinQt/GeneralWidget: Eliminate unnecessary g_Config usage.
This commit is contained in:
parent
5ed8b7bc9d
commit
5b88c0b90e
@ -165,7 +165,6 @@ void GeneralWidget::ConnectWidgets()
|
||||
// Video Backend
|
||||
connect(m_backend_combo, &QComboBox::currentIndexChanged, this, &GeneralWidget::BackendWarning);
|
||||
connect(m_adapter_combo, &QComboBox::currentIndexChanged, this, [&](int index) {
|
||||
g_Config.iAdapter = index;
|
||||
Config::SetBaseOrCurrent(Config::GFX_ADAPTER, index);
|
||||
emit BackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
||||
});
|
||||
@ -369,7 +368,10 @@ void GeneralWidget::OnBackendChanged(const QString& backend_name)
|
||||
|
||||
const bool supports_adapters = !adapters.empty();
|
||||
|
||||
m_adapter_combo->setCurrentIndex(g_Config.iAdapter);
|
||||
const int adapter_index = Config::Get(Config::GFX_ADAPTER);
|
||||
if (adapter_index < m_adapter_combo->count())
|
||||
m_adapter_combo->setCurrentIndex(adapter_index);
|
||||
|
||||
m_adapter_combo->setEnabled(supports_adapters &&
|
||||
Core::IsUninitialized(Core::System::GetInstance()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user