From 2f9e0a43849f877abccd89748e58e3025d46d79b Mon Sep 17 00:00:00 2001 From: RSDuck Date: Thu, 13 Oct 2022 19:55:06 +0200 Subject: [PATCH] don't let the emuthread deinit OGL if there's no OGL --- src/frontend/qt_sdl/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index d719c0ec..5e4bd46b 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1891,9 +1891,12 @@ MainWindow::~MainWindow() void MainWindow::closeEvent(QCloseEvent* event) { - printf("close event\n"); - emuThread->emuPause(); - emuThread->deinitContext(); + if (hasOGL) + { + // we intentionally don't unpause here + emuThread->emuPause(); + emuThread->deinitContext(); + } QMainWindow::closeEvent(event); }