Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osx] vsync should default to always #4463

Merged
merged 2 commits into from Mar 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion 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>
5 changes: 5 additions & 0 deletions system/settings/linux.xml
Expand Up @@ -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">
Expand Down
5 changes: 0 additions & 5 deletions system/settings/rbp.xml
Expand Up @@ -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">
Expand Down
5 changes: 4 additions & 1 deletion system/settings/settings.xml
Expand Up @@ -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">
Expand Down
5 changes: 0 additions & 5 deletions system/settings/win32.xml
Expand Up @@ -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">
Expand Down
13 changes: 12 additions & 1 deletion xbmc/settings/DisplaySettings.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/Settings.cpp
Expand Up @@ -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();
Expand Down