Browse Source

Merge pull request #19767 from Chaosus/vsync_fix

Fix vsync initialization
Rémi Verschelde 7 years ago
parent
commit
80d6882ccd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      main/main.cpp

+ 2 - 0
main/main.cpp

@@ -867,6 +867,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
 	OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/allow_per_pixel_transparency", false);
 	OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/allow_per_pixel_transparency", false);
 
 
 	video_mode.use_vsync = GLOBAL_DEF("display/window/vsync/use_vsync", true);
 	video_mode.use_vsync = GLOBAL_DEF("display/window/vsync/use_vsync", true);
+	OS::get_singleton()->_use_vsync = video_mode.use_vsync;
+
 	video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency", false);
 	video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency", false);
 	video_mode.layered_splash = GLOBAL_DEF("display/window/per_pixel_transparency_splash", false);
 	video_mode.layered_splash = GLOBAL_DEF("display/window/per_pixel_transparency_splash", false);