mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Merge pull request #8392 from JosJuice/audio-backend-dropdown-default
DolphinQt: When audio backend is invalid, show nothing in dropdown
This commit is contained in:
commit
12b47c9487
@ -181,12 +181,18 @@ void AudioPane::LoadSettings()
|
|||||||
|
|
||||||
// Backend
|
// Backend
|
||||||
const auto current = SConfig::GetInstance().sBackend;
|
const auto current = SConfig::GetInstance().sBackend;
|
||||||
|
bool selection_set = false;
|
||||||
for (const auto& backend : AudioCommon::GetSoundBackends())
|
for (const auto& backend : AudioCommon::GetSoundBackends())
|
||||||
{
|
{
|
||||||
m_backend_combo->addItem(tr(backend.c_str()), QVariant(QString::fromStdString(backend)));
|
m_backend_combo->addItem(tr(backend.c_str()), QVariant(QString::fromStdString(backend)));
|
||||||
if (backend == current)
|
if (backend == current)
|
||||||
|
{
|
||||||
m_backend_combo->setCurrentIndex(m_backend_combo->count() - 1);
|
m_backend_combo->setCurrentIndex(m_backend_combo->count() - 1);
|
||||||
|
selection_set = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!selection_set)
|
||||||
|
m_backend_combo->setCurrentIndex(-1);
|
||||||
|
|
||||||
OnBackendChanged();
|
OnBackendChanged();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user