xbmc: add toto patch :-)

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-02-12 01:39:11 +01:00
parent ddad2a85e0
commit 93b88a2c6d

View File

@ -0,0 +1,75 @@
From bf4d77aeb9ff7c198914031ec0d8268dae0c5973 Mon Sep 17 00:00:00 2001
From: unknown <fernetmenta@online.de>
Date: Fri, 18 Jan 2013 15:16:38 +0100
Subject: [PATCH] multi-screen: fix compilation on windows
---
xbmc/settings/GUIWindowSettingsCategory.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp
index bb29daa..c468a73 100644
--- a/xbmc/settings/GUIWindowSettingsCategory.cpp
+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -525,12 +525,14 @@ void CGUIWindowSettingsCategory::CreateSettings()
FillInRefreshRates(strSetting, g_guiSettings.GetResolution(), false);
continue;
}
+#if defined(HAS_GLX)
else if (strSetting.Equals("videoscreen.monitor"))
{
AddSetting(pSetting, group->GetWidth(), iControlID);
FillInMonitors(strSetting);
continue;
}
+#endif
else if (strSetting.Equals("lookandfeel.skintheme"))
{
AddSetting(pSetting, group->GetWidth(), iControlID);
@@ -1463,6 +1465,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting
// Cascade
FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true);
}
+#if defined(HAS_GLX)
else if (strSetting.Equals("videoscreen.monitor"))
{
CSettingString *pSettingString = (CSettingString *)pSettingControl->GetSetting();
@@ -1477,6 +1480,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting
FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true);
}
}
+#endif
else if (strSetting.Equals("videoscreen.resolution"))
{
RESOLUTION nextRes = (RESOLUTION) g_guiSettings.GetInt("videoscreen.resolution");
@@ -2431,6 +2435,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES
void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting)
{
+#if defined(HAS_GLX)
// we expect "videoscreen.monitor" but it might be hidden on some platforms,
// so check that we actually have a visable control.
BaseSettingControlPtr control = GetSetting(strSetting);
@@ -2456,6 +2461,7 @@ void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting)
pControl->SetValue(currentMonitor);
g_guiSettings.SetString("videoscreen.monitor", g_settings.m_ResInfo[RES_DESKTOP].strOutput);
}
+#endif
}
@@ -2587,7 +2593,10 @@ void CGUIWindowSettingsCategory::OnRefreshRateChanged(RESOLUTION nextRes)
RESOLUTION lastRes = g_graphicsContext.GetVideoResolution();
bool cancelled = false;
- bool outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor"));
+ bool outputChanged = true;
+#if defined(HAS_GLX)
+ outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor"));
+#endif
g_guiSettings.SetResolution(nextRes);
g_graphicsContext.SetVideoResolution(nextRes, outputChanged);
--
1.7.10