mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
DolphinQt: When audio backend is invalid, show nothing in dropdown
It used to show the first option, No Audio Output (but audio output would work correctly anyway since AudioCommon didn't use this logic.)
This commit is contained in:
@ -181,12 +181,18 @@ void AudioPane::LoadSettings()
|
||||
|
||||
// Backend
|
||||
const auto current = SConfig::GetInstance().sBackend;
|
||||
bool selection_set = false;
|
||||
for (const auto& backend : AudioCommon::GetSoundBackends())
|
||||
{
|
||||
m_backend_combo->addItem(tr(backend.c_str()), QVariant(QString::fromStdString(backend)));
|
||||
if (backend == current)
|
||||
{
|
||||
m_backend_combo->setCurrentIndex(m_backend_combo->count() - 1);
|
||||
selection_set = true;
|
||||
}
|
||||
}
|
||||
if (!selection_set)
|
||||
m_backend_combo->setCurrentIndex(-1);
|
||||
|
||||
OnBackendChanged();
|
||||
|
||||
|
Reference in New Issue
Block a user