summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-10 01:02:23 +0200
committerGitHub <noreply@github.com>2021-07-10 01:02:23 +0200
commita2d5f191d8d91f241a09233586da0f7e9deb8a76 (patch)
tree0ecf6d68975c6816d1cee621fc6e56d34b110467 /scene/main
parent0ee235822d97a4b2a1586b5fd1c092e9f53d2fff (diff)
parent043ae9156086a2fc9fdb520539411123256b3aeb (diff)
Merge pull request #48622 from Geometror/reimplement-disableable-vsync
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/window.cpp3
1 files changed, 2 insertions, 1 deletions
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);