Skip to content
This repository
Browse code

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

…o device
  • Loading branch information...
commit 0a84744ee4ea7276a4014385a27720908f488340 1 parent 6b99d90
Sascha Montellese authored November 22, 2012
7  xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -2910,8 +2910,11 @@ void CGUIWindowSettingsCategory::FillInAudioDevices(CSetting* pSetting, bool Pas
2910 2910
   if (selectedValue < 0)
2911 2911
   {
2912 2912
     CLog::Log(LOGWARNING, "Failed to find previously selected audio sink");
2913  
-    pControl->AddLabel(currentDevice, numberSinks);
2914  
-    pControl->SetValue(numberSinks);
  2913
+    pControl->SetValue(0);
  2914
+    if (!Passthrough)
  2915
+      ((CSettingString*)pSetting)->SetData(m_AnalogAudioSinkMap[pControl->GetCurrentLabel()]);
  2916
+    else
  2917
+      ((CSettingString*)pSetting)->SetData(m_DigitalAudioSinkMap[pControl->GetCurrentLabel()]);
2915 2918
   }
2916 2919
   else
2917 2920
     pControl->SetValue(selectedValue);

0 notes on commit 0a84744

Please sign in to comment.
Something went wrong with that request. Please try again.