Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CGUIWindowSettingsCategory: don't allow to choose a non-existing audi…

…o device
  • Loading branch information...
commit 0a84744ee4ea7276a4014385a27720908f488340 1 parent 6b99d90
Sascha Montellese Montellese authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 xbmc/settings/GUIWindowSettingsCategory.cpp
7 xbmc/settings/GUIWindowSettingsCategory.cpp
View
@@ -2910,8 +2910,11 @@ void CGUIWindowSettingsCategory::FillInAudioDevices(CSetting* pSetting, bool Pas
if (selectedValue < 0)
{
CLog::Log(LOGWARNING, "Failed to find previously selected audio sink");
- pControl->AddLabel(currentDevice, numberSinks);
- pControl->SetValue(numberSinks);
+ pControl->SetValue(0);
+ if (!Passthrough)
+ ((CSettingString*)pSetting)->SetData(m_AnalogAudioSinkMap[pControl->GetCurrentLabel()]);
+ else
+ ((CSettingString*)pSetting)->SetData(m_DigitalAudioSinkMap[pControl->GetCurrentLabel()]);
}
else
pControl->SetValue(selectedValue);
Please sign in to comment.
Something went wrong with that request. Please try again.