Merge pull request #270 from psyke83/vsync_fix

Pi: use vsync by default and fix vsync on case
This commit is contained in:
Jools Wills 2017-10-27 06:27:06 +01:00 committed by GitHub
commit f1b0896ec1
2 changed files with 2 additions and 8 deletions

View file

@ -105,9 +105,9 @@ namespace Renderer
// 1 for updates synchronized with the vertical retrace,
// or -1 for late swap tearing.
// SDL_GL_SetSwapInterval returns 0 on success, -1 on error.
// if vsync is requested, try late swap tearing; if that doesn't work, try normal vsync
// if vsync is requested, try normal vsync; if that doesn't work, try late swap tearing
// if that doesn't work, report an error
if(SDL_GL_SetSwapInterval(-1) != 0 && SDL_GL_SetSwapInterval(1) != 0)
if(SDL_GL_SetSwapInterval(1) != 0 && SDL_GL_SetSwapInterval(-1) != 0)
LOG(LogWarning) << "Tried to enable vsync, but failed! (" << SDL_GetError() << ")";
}
else

View file

@ -49,13 +49,7 @@ void Settings::setDefaults()
mBoolMap["SplashScreen"] = true;
mStringMap["StartupSystem"] = "";
#ifdef _RPI_
// don't enable VSync by default on the Pi, since it already
// has trouble trying to render things at 60fps in certain menus
mBoolMap["VSync"] = false;
#else
mBoolMap["VSync"] = true;
#endif
mBoolMap["EnableSounds"] = true;
mBoolMap["ShowHelpPrompts"] = true;