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
parent 5d0f1bd10b
commit c8df26554b
1 changed files with 4 additions and 5 deletions

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();
}