El modo demo ya no se pausa al perder el foco
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3223,9 +3223,12 @@ void Game::checkEvents()
|
|||||||
else if (eventHandler->type == SDL_WINDOWEVENT)
|
else if (eventHandler->type == SDL_WINDOWEVENT)
|
||||||
{
|
{
|
||||||
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_LOST)
|
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_LOST)
|
||||||
|
{
|
||||||
|
if (!demo.enabled)
|
||||||
{
|
{
|
||||||
pause(true);
|
pause(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
|
if (eventHandler->window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user