mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 12:05:39 +00:00
Merge pull request #270 from psyke83/vsync_fix
Pi: use vsync by default and fix vsync on case
This commit is contained in:
commit
f1b0896ec1
|
@ -105,9 +105,9 @@ namespace Renderer
|
||||||
// 1 for updates synchronized with the vertical retrace,
|
// 1 for updates synchronized with the vertical retrace,
|
||||||
// or -1 for late swap tearing.
|
// or -1 for late swap tearing.
|
||||||
// SDL_GL_SetSwapInterval returns 0 on success, -1 on error.
|
// 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 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() << ")";
|
LOG(LogWarning) << "Tried to enable vsync, but failed! (" << SDL_GetError() << ")";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -49,13 +49,7 @@ void Settings::setDefaults()
|
||||||
mBoolMap["SplashScreen"] = true;
|
mBoolMap["SplashScreen"] = true;
|
||||||
mStringMap["StartupSystem"] = "";
|
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;
|
mBoolMap["VSync"] = true;
|
||||||
#endif
|
|
||||||
|
|
||||||
mBoolMap["EnableSounds"] = true;
|
mBoolMap["EnableSounds"] = true;
|
||||||
mBoolMap["ShowHelpPrompts"] = true;
|
mBoolMap["ShowHelpPrompts"] = true;
|
||||||
|
|
Loading…
Reference in a new issue