diff options
author | Stefano Bonicatti <smjert@gmail.com> | 2017-12-08 17:58:28 +0100 |
---|---|---|
committer | Stefano Bonicatti <smjert@gmail.com> | 2017-12-09 01:43:23 +0100 |
commit | c067cf2c6a81172d28cf522d281ec94ff608a48d (patch) | |
tree | caa1f532469c73ba70071105451e6df138c3d4c0 /main/main.cpp | |
parent | 146bdf031d053d2af771622aa15f70ad04b0720a (diff) |
Fixes vsync setting ignored when using a separate thread for rendering
Setting the vsync in the main thread, after the rendering thread starts
and takes the OpenGL context fails, so we need to do that before.
Also, for some reason, the main thread cannot make current the context
anymore.
Fixes #13447
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index b2f091e76a..1328807121 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -819,7 +819,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false); } - use_vsync = GLOBAL_DEF("display/window/vsync/use_vsync", true); + video_mode.use_vsync = GLOBAL_DEF("display/window/vsync/use_vsync", true); GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2); GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3); @@ -993,8 +993,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) { // also init our arvr_server from here arvr_server = memnew(ARVRServer); - OS::get_singleton()->set_use_vsync(use_vsync); - register_core_singletons(); MAIN_PRINT("Main: Setup Logo"); |