From 11a59cea4ef8e891ce4017a141d345241835b88a Mon Sep 17 00:00:00 2001 From: rebb Date: Sat, 13 Nov 2021 10:33:40 +0100 Subject: [PATCH] Fix CPU cycles being halved when application regains focus in SDL2 while using "priority = ?, pause". This was only fixed in the SDL1 build before --- src/gui/sdlmain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 540449ec3..87944d92d 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -7881,7 +7881,9 @@ void GFX_Events() { #endif SetPriority(sdl.priority.nofocus); GFX_LosingFocus(); - CPU_Enable_SkipAutoAdjust(); + if( sdl.priority.nofocus != PRIORITY_LEVEL_PAUSE ) { + CPU_Enable_SkipAutoAdjust(); + } break; default: ;