Fix GC adapter not being detected when you enable controller in settings

GCAdapter::UseAdapter() reads s_is_adapter_wanted, which gets
initialized by config_guard.~ConfigChangeCallbackGuard(). So we must
wait until after destroying the config guard to know whether we have any
controllers set to GC Adapter.
This commit is contained in:
nyanpasu64 2023-06-29 22:50:01 -07:00 committed by Nayla Hanegan
parent 3434b44c13
commit a5a165a38e
No known key found for this signature in database
GPG key ID: 3075216CED0DB01D

View file

@ -198,12 +198,11 @@ void GamecubeControllersWidget::SaveSettings()
static_cast<s32>(i));
}
}
if (GCAdapter::UseAdapter())
GCAdapter::StartScanThread();
else
GCAdapter::StopScanThread();
}
if (GCAdapter::UseAdapter())
GCAdapter::StartScanThread();
else
GCAdapter::StopScanThread();
SConfig::GetInstance().SaveSettings();
}