From 4fd6777cf461b1066e1a4428a746e8f8e99d4d9a Mon Sep 17 00:00:00 2001 From: Riteo Date: Sun, 24 Sep 2023 04:35:06 +0200 Subject: [PATCH] Linux/OpenGL: don't force vsync in the editor I couldn't tell whether this has an actual purpose and it feels more like a debug remnant. We also need to be able to disable vsync in the editor for the WIP Wayland backend (in the EGL driver) as it does manual frame throttling. --- drivers/egl/egl_manager.cpp | 6 ------ platform/linuxbsd/x11/gl_manager_x11.cpp | 6 ------ 2 files changed, 12 deletions(-) diff --git a/drivers/egl/egl_manager.cpp b/drivers/egl/egl_manager.cpp index ac80bc8111eb..0faae8cf6fcf 100644 --- a/drivers/egl/egl_manager.cpp +++ b/drivers/egl/egl_manager.cpp @@ -290,12 +290,6 @@ void EGLManager::window_make_current(DisplayServer::WindowID p_window_id) { } void EGLManager::set_use_vsync(bool p_use) { - // Force vsync in the editor for now, as a safety measure. - bool is_editor = Engine::get_singleton()->is_editor_hint(); - if (is_editor) { - p_use = true; - } - // We need an active window to get a display to set the vsync. if (!current_window) { return; diff --git a/platform/linuxbsd/x11/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp index 25c427260730..95947301cf27 100644 --- a/platform/linuxbsd/x11/gl_manager_x11.cpp +++ b/platform/linuxbsd/x11/gl_manager_x11.cpp @@ -347,12 +347,6 @@ Error GLManager_X11::initialize(Display *p_display) { } void GLManager_X11::set_use_vsync(bool p_use) { - // force vsync in the editor for now, as a safety measure - bool is_editor = Engine::get_singleton()->is_editor_hint(); - if (is_editor) { - p_use = true; - } - // we need an active window to get a display to set the vsync if (!_current_window) { return;