Moved VSync setting from Experimental to Setup
parent
359abf9a82
commit
608d59f07b
|
@ -815,14 +815,14 @@ bool CApplication::CreateVideoSurface()
|
||||||
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
|
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
|
||||||
|
|
||||||
int vsync = 0;
|
int vsync = 0;
|
||||||
if (GetConfigFile().GetIntProperty("Experimental", "VSync", vsync))
|
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
|
||||||
{
|
{
|
||||||
if (SDL_GL_SetSwapInterval(vsync) == -1)
|
if (SDL_GL_SetSwapInterval(vsync) == -1)
|
||||||
{
|
{
|
||||||
GetLogger()->Warn("Adaptive sync not supported.\n");
|
GetLogger()->Warn("Adaptive sync not supported.\n");
|
||||||
vsync = 1;
|
vsync = 1;
|
||||||
SDL_GL_SetSwapInterval(vsync);
|
SDL_GL_SetSwapInterval(vsync);
|
||||||
GetConfigFile().SetIntProperty("Experimental", "VSync", vsync);
|
GetConfigFile().SetIntProperty("Setup", "VSync", vsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
|
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
|
||||||
|
|
|
@ -112,7 +112,7 @@ void CSettings::SaveSettings()
|
||||||
|
|
||||||
// Experimental settings
|
// Experimental settings
|
||||||
GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", engine->GetTerrainShadows());
|
GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", engine->GetTerrainShadows());
|
||||||
GetConfigFile().SetIntProperty("Experimental", "VSync", engine->GetVSync());
|
GetConfigFile().SetIntProperty("Setup", "VSync", engine->GetVSync());
|
||||||
|
|
||||||
CInput::GetInstancePointer()->SaveKeyBindings();
|
CInput::GetInstancePointer()->SaveKeyBindings();
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ void CSettings::LoadSettings()
|
||||||
|
|
||||||
if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", bValue))
|
if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", bValue))
|
||||||
engine->SetTerrainShadows(bValue);
|
engine->SetTerrainShadows(bValue);
|
||||||
if (GetConfigFile().GetIntProperty("Experimental", "VSync", iValue))
|
if (GetConfigFile().GetIntProperty("Setup", "VSync", iValue))
|
||||||
{
|
{
|
||||||
engine->SetVSync(iValue);
|
engine->SetVSync(iValue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue