From 73d4f7c1eae75f81f1607e09229e6382fab9d144 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sun, 28 Nov 2021 23:58:01 +0100 Subject: [PATCH] Ensure swap interval --- RenderingManager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/RenderingManager.cpp b/RenderingManager.cpp index 998da99..135284b 100644 --- a/RenderingManager.cpp +++ b/RenderingManager.cpp @@ -635,12 +635,11 @@ void RenderingWindow::setFullscreen_(GLFWmonitor *mo) const GLFWvidmode * mode = glfwGetVideoMode(mo); glfwSetInputMode( window_, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); glfwSetWindowMonitor( window_, mo, 0, 0, mode->width, mode->height, mode->refreshRate); - - // Enable vsync on output window only (i.e. not 0 if has a master) - // Workaround for disabled vsync in fullscreen (https://github.com/glfw/glfw/issues/1072) - glfwSwapInterval( nullptr == master_ ? 0 : Settings::application.render.vsync); } + // Enable vsync on output window only (i.e. not 0 if has a master) + // Workaround for disabled vsync in fullscreen (https://github.com/glfw/glfw/issues/1072) + glfwSwapInterval( nullptr == master_ ? 0 : Settings::application.render.vsync); } @@ -783,7 +782,7 @@ bool RenderingWindow::init(int index, GLFWwindow *share) } else { // Disable vsync on main window -// glfwSwapInterval(0); + glfwSwapInterval(0); // Enable Antialiasing multisampling if (Settings::application.render.multisampling > 0) { glEnable(GL_MULTISAMPLE);