Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

VSync config option #1085

Merged
merged 1 commit into from

2 participants

@Luomu
Owner

Very simple, uses the SDL video option. It works on my nvidia/windows and ati/ubuntu machines, but maybe not everywhere (like AA...).

@robn robn merged commit fb45a9c into pioneerspacesim:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 17, 2012
  1. @Luomu
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +1 −0  src/GameConfig.cpp
  2. +1 −0  src/Pi.cpp
View
1  src/GameConfig.cpp
@@ -27,6 +27,7 @@ GameConfig::GameConfig(const std::string &filename) : IniConfig(filename)
m_map["MaxPhysicsCyclesPerRender"] = "4";
m_map["AntiAliasingMode"] = "2";
m_map["JoystickDeadzone"] = "0.1";
+ m_map["VSync"] = "0";
#ifdef _WIN32
m_map["RedirectStdio"] = "1";
View
1  src/Pi.cpp
@@ -464,6 +464,7 @@ void Pi::Init()
const int requestedSamples = config->Int("AntiAliasingMode");
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, requestedSamples ? 1 : 0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, requestedSamples);
+ SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, config->Int("VSync"));
Uint32 flags = SDL_OPENGL;
if (config->Int("StartFullscreen")) flags |= SDL_FULLSCREEN;
Something went wrong with that request. Please try again.