From 80b7a69cd2745a211d5f9cafc6c9400662d06f76 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 30 Nov 2025 22:00:33 -0600 Subject: [PATCH] Revert "Use the default Qt render loop" This seems to cause 10+ second hangs at the StreamSegue spinner when using the Qt5-based Snap on Ubuntu 24.04's Wayland session. It's unclear if this is still an issue on Qt 6, but let's be conservative and just revert it for now. This reverts commit f57257cbfdcf1ae949b88d59ab2b13fd9b7ab529. --- app/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index dfc0e43e..cfd1dfed 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -497,6 +497,18 @@ int main(int argc, char *argv[]) } #endif +#if !defined(Q_OS_WIN32) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // Moonlight requires the non-threaded renderer because we depend + // on being able to control the render thread by blocking in the + // main thread (and pumping events from the main thread when needed). + // That doesn't work with the threaded renderer which causes all + // sorts of odd behavior depending on the platform. + // + // NB: Windows defaults to the "windows" non-threaded render loop on + // Qt 5 and the threaded render loop on Qt 6. + qputenv("QSG_RENDER_LOOP", "basic"); +#endif + #if defined(Q_OS_DARWIN) && defined(QT_DEBUG) // Enable Metal valiation for debug builds qputenv("MTL_DEBUG_LAYER", "1");