From 27a04a806e8383adabbf8e7eb44f2768ef2f0987 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:30:16 +0300 Subject: [PATCH] [Qt] Make null renderer create a GL context for vsync purposes --- src/panda_qt/main_window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index a7901f09..0a201c55 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -32,14 +32,14 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) emuThread = std::thread([&]() { const RendererType rendererType = emu->getConfig().rendererType; - if (rendererType == RendererType::OpenGL || rendererType == RendererType::Software) { + if (rendererType == RendererType::OpenGL || rendererType == RendererType::Software || rendererType == RendererType::Null) { // Make GL context current for this thread, enable VSync GL::Context* glContext = screen.getGLContext(); glContext->MakeCurrent(); glContext->SetSwapInterval(1); emu->initGraphicsContext(glContext); - } else if (rendererType != RendererType::Null) { + } else { Helpers::panic("Unsupported renderer type for the Qt backend! Vulkan on Qt is currently WIP, try the SDL frontend instead!"); }