Skip to content
Permalink
Browse files

Merge pull request #8392 from JosJuice/audio-backend-dropdown-default

DolphinQt: When audio backend is invalid, show nothing in dropdown
  • Loading branch information...
stenzek committed Oct 7, 2019
2 parents b6545ea + 02ba893 commit 12b47c94873e0c30db97ce5666f1d3cd05ee2cbe
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 12b47c9

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