From 043ae9156086a2fc9fdb520539411123256b3aeb Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Sat, 19 Jun 2021 17:44:59 +0200 Subject: Restructure and reimplement vsync options -Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX -Removed the V-Sync via Compositor option --- scene/main/window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene/main') diff --git a/scene/main/window.cpp b/scene/main/window.cpp index cf2a6b2adf..9299f8d6be 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -227,7 +227,8 @@ void Window::_make_window() { } } - window_id = DisplayServer::get_singleton()->create_sub_window(DisplayServer::WindowMode(mode), f, Rect2i(position, size)); + DisplayServer::VSyncMode vsync_mode = DisplayServer::get_singleton()->window_get_vsync_mode(DisplayServer::MAIN_WINDOW_ID); + window_id = DisplayServer::get_singleton()->create_sub_window(DisplayServer::WindowMode(mode), vsync_mode, f, Rect2i(position, size)); ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID); DisplayServer::get_singleton()->window_set_current_screen(current_screen, window_id); DisplayServer::get_singleton()->window_set_max_size(max_size, window_id); -- cgit v1.2.3