El modo demo ya no se pausa al perder el foco

This commit is contained in:
2024-07-05 23:51:43 +02:00
parent 3119e02d2c
commit d36f3539cc
2 changed files with 6 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ bool Director::initSDL()
} }
} }
#ifndef RASPI #ifndef RASPI
if (options->video.shaders) //if (options->video.shaders)
if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl")) if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"))
{ {
if (options->console) if (options->console)
@@ -229,7 +229,7 @@ bool Director::initSDL()
} }
#ifndef RASPI #ifndef RASPI
// La aceleración se activa según las opciones // La aceleración se activa según las opciones
if (options->video.shaders || true) //if (options->video.shaders)
{ {
flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE; flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
} }

View File

@@ -3224,7 +3224,10 @@ void Game::checkEvents()
{ {
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_LOST) if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_LOST)
{ {
pause(true); if (!demo.enabled)
{
pause(true);
}
} }
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_GAINED) if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_GAINED)