You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user