Skip to content
Permalink
Browse files

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.)
  • Loading branch information...
JosJuice committed Oct 6, 2019
1 parent b6545ea commit 02ba89380324183c66d4874280e2c2dccf529132
Showing with 6 additions and 0 deletions.
  1. +6 −0 Source/Core/DolphinQt/Settings/AudioPane.cpp
@@ -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();

0 comments on commit 02ba893

Please sign in to comment.
You can’t perform that action at this time.