Moved VSync setting from Experimental to Setup

1008-fix
tomangelo2 2018-07-05 20:56:38 +02:00
parent 359abf9a82
commit 608d59f07b
2 changed files with 4 additions and 4 deletions

View File

@ -815,14 +815,14 @@ bool CApplication::CreateVideoSurface()
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
int vsync = 0;
if (GetConfigFile().GetIntProperty("Experimental", "VSync", vsync))
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
{
if (SDL_GL_SetSwapInterval(vsync) == -1)
{
GetLogger()->Warn("Adaptive sync not supported.\n");
vsync = 1;
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")));

View File

@ -112,7 +112,7 @@ void CSettings::SaveSettings()
// Experimental settings
GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", engine->GetTerrainShadows());
GetConfigFile().SetIntProperty("Experimental", "VSync", engine->GetVSync());
GetConfigFile().SetIntProperty("Setup", "VSync", engine->GetVSync());
CInput::GetInstancePointer()->SaveKeyBindings();
@ -275,7 +275,7 @@ void CSettings::LoadSettings()
if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", bValue))
engine->SetTerrainShadows(bValue);
if (GetConfigFile().GetIntProperty("Experimental", "VSync", iValue))
if (GetConfigFile().GetIntProperty("Setup", "VSync", iValue))
{
engine->SetVSync(iValue);
}