From 9e75c53c1945f8b43302d06d7986fa50f58deffc Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 14 Jan 2023 19:04:58 +0000 Subject: [PATCH] fix SW renderer frozen after coming back from Alt/Tab (fullscreen mode). close #1053 --- Sources/Gui/SDLRunner.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Gui/SDLRunner.cpp b/Sources/Gui/SDLRunner.cpp index 356808da5..2c7e84526 100644 --- a/Sources/Gui/SDLRunner.cpp +++ b/Sources/Gui/SDLRunner.cpp @@ -525,6 +525,10 @@ namespace spades { } #endif + if (rtype == RendererType::SW) { + SDL_SetHint("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0"); + } + RunClientLoop(renderer.GetPointerOrNull(), audio.GetPointerOrNull()); // `SDL_Window` and its associated resources will be inaccessible