aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-03-31 17:59:02 +1300
committerJonathan Marshall <jmarshall@xbmc.org>2014-03-31 18:02:06 +1300
commit5e9c7c569718d06931a502e0b30401f4680e35f5 (patch)
tree1fa3a1f2712068fa2f50c1d847730d857d26f8d5
parent5e4160d0956d49abc5cf25ca730b1b58f79c7b82 (diff)
Merge pull request #4463 from jmarshallnz/osx_vsync_always
[osx] vsync should default to always
-rw-r--r--system/settings/freebsd.xml10
-rw-r--r--system/settings/linux.xml5
-rw-r--r--system/settings/rbp.xml5
-rw-r--r--system/settings/settings.xml5
-rw-r--r--system/settings/win32.xml5
-rw-r--r--xbmc/settings/DisplaySettings.cpp13
-rw-r--r--xbmc/settings/Settings.cpp1
7 files changed, 31 insertions, 13 deletions
diff --git a/system/settings/freebsd.xml b/system/settings/freebsd.xml
index ccc0c81a0d..3e5915e917 100644
--- a/system/settings/freebsd.xml
+++ b/system/settings/freebsd.xml
@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<settings>
-
+ <section id="system">
+ <category id="videoscreen">
+ <group id="3">
+ <setting id="videoscreen.vsync">
+ <default>3</default> <!-- VSYNC_DRIVER -->
+ </setting>
+ </group>
+ </category>
+ </section>
</settings>
diff --git a/system/settings/linux.xml b/system/settings/linux.xml
index a6b8d44378..14104a0f5b 100644
--- a/system/settings/linux.xml
+++ b/system/settings/linux.xml
@@ -7,6 +7,11 @@
<visible>false</visible>
</setting>
</group>
+ <group id="3">
+ <setting id="videoscreen.vsync">
+ <default>3</default> <!-- VSYNC_DRIVER -->
+ </setting>
+ </group>
</category>
<category id="input">
<group id="2">
diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml
index 6f5889f5c2..2b7d0a636b 100644
--- a/system/settings/rbp.xml
+++ b/system/settings/rbp.xml
@@ -48,11 +48,6 @@
<control type="edit" format="integer" />
</setting>
</group>
- <group id="3">
- <setting id="videoscreen.vsync">
- <default>2</default> <!-- VSYNC_ALWAYS -->
- </setting>
- </group>
</category>
<category id="audiooutput">
<group id="1">
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 042c09ec33..42ddb22d70 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2326,10 +2326,13 @@
<group id="3">
<setting id="videoscreen.vsync" type="integer" label="13105" help="36356">
<level>2</level>
- <default>3</default> <!-- VSYNC_DRIVER -->
+ <default>2</default> <!-- VSYNC_ALWAYS -->
<constraints>
<options>verticalsyncs</options>
</constraints>
+ <updates>
+ <update type="change" />
+ </updates>
<control type="spinner" format="string" />
</setting>
<setting id="videoscreen.guicalibration" type="action" label="214" help="36357">
diff --git a/system/settings/win32.xml b/system/settings/win32.xml
index 987f974ec6..5895062f26 100644
--- a/system/settings/win32.xml
+++ b/system/settings/win32.xml
@@ -38,11 +38,6 @@
<requirement negated="true">HAS_GL</requirement>
</setting>
</group>
- <group id="3">
- <setting id="videoscreen.vsync">
- <default>2</default> <!-- VSYNC_ALWAYS -->
- </setting>
- </group>
</category>
<category id="audiooutput" label="772" help="36360">
<group id="1">
diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp
index c8c2bbd5de..fbd79d4192 100644
--- a/xbmc/settings/DisplaySettings.cpp
+++ b/xbmc/settings/DisplaySettings.cpp
@@ -277,6 +277,16 @@ bool CDisplaySettings::OnSettingUpdate(CSetting* &setting, const char *oldSettin
if (screenmode.size() == 21)
return screenmodeSetting->SetValue(screenmode + "std");
}
+ else if (settingId == "videoscreen.vsync")
+ {
+ // This ifdef is intended to catch everything except Linux and FreeBSD
+#if !defined(TARGET_LINUX) || defined(TARGET_DARWIN) || defined(TARGET_ANDROID) || defined(TARGET_RASPBERRY_PI)
+ // in the Gotham alphas through beta3 the default value for darwin and android was set incorrectly.
+ CSettingInt *vsyncSetting = (CSettingInt*)setting;
+ if (vsyncSetting->GetValue() == VSYNC_DRIVER)
+ return vsyncSetting->SetValue(VSYNC_ALWAYS);
+#endif
+ }
return false;
}
@@ -640,7 +650,8 @@ void CDisplaySettings::SettingOptionsScreensFiller(const CSetting *setting, std:
void CDisplaySettings::SettingOptionsVerticalSyncsFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int &current)
{
-#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN)
+ // This ifdef is intended to catch everything except Linux and FreeBSD
+#if defined(TARGET_LINUX) && !defined(TARGET_DARWIN) && !defined(TARGET_ANDROID) && !defined(TARGET_RASPBERRY_PI)
list.push_back(make_pair(g_localizeStrings.Get(13101), VSYNC_DRIVER));
#endif
list.push_back(make_pair(g_localizeStrings.Get(13106), VSYNC_DISABLED));
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 606edf8fd8..6188bd6a45 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -1017,6 +1017,7 @@ void CSettings::InitializeISettingCallbacks()
settingSet.insert("videoscreen.screen");
settingSet.insert("videoscreen.resolution");
settingSet.insert("videoscreen.screenmode");
+ settingSet.insert("videoscreen.vsync");
m_settingsManager->RegisterCallback(&CDisplaySettings::Get(), settingSet);
settingSet.clear();