From b4ef3cdeff50800393b02aac6e970236487d4853 Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Mon, 3 Apr 2023 14:21:49 -0300 Subject: [PATCH] bootmanager: set the surface format based on vsync --- src/citra_qt/bootmanager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index f9070da7e..5b3238b42 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -162,7 +162,7 @@ public: // disable vsync for any shared contexts auto format = share_context->format(); - format.setSwapInterval(main_surface ? Settings::values.use_vsync_new.GetValue() : 0); + format.setSwapInterval(0); context = std::make_unique(); context->setShareContext(share_context); @@ -673,6 +673,10 @@ bool GRenderWindow::InitializeOpenGL() { auto child_context = CreateSharedContext(); child->SetContext(std::move(child_context)); + auto format = child_widget->windowHandle()->format(); + format.setSwapInterval(Settings::values.use_vsync_new.GetValue()); + child_widget->windowHandle()->setFormat(format); + return true; #else QMessageBox::warning(this, tr("OpenGL not available!"),