mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 13:32:37 +00:00
Fixes the Alt + Tab crash in the fullscreen mode. Refs #4181.
Patch By: Angen Comments By: echotangoecho, Imarok, Stan Reviewed By: vladislavbelov Trac Tickets: #4181 Differential Revision: https://code.wildfiregames.com/D1212 This was SVN commit r21476.
This commit is contained in:
+6
-5
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -304,8 +304,7 @@ static void Frame()
|
||||
#endif
|
||||
ENSURE(realTimeSinceLastFrame > 0.0f);
|
||||
|
||||
// decide if update/render is necessary
|
||||
bool need_render = !g_app_minimized;
|
||||
// Decide if update is necessary
|
||||
bool need_update = true;
|
||||
|
||||
// If we are not running a multiplayer game, disable updates when the game is
|
||||
@@ -369,9 +368,11 @@ static void Frame()
|
||||
g_UserReporter.Update();
|
||||
|
||||
g_Console->Update(realTimeSinceLastFrame);
|
||||
|
||||
ogl_WarnIfError();
|
||||
if (need_render)
|
||||
|
||||
// We do not have to render an inactive fullscreen frame, because it can
|
||||
// lead to errors for some graphic card families.
|
||||
if (!g_app_minimized && (g_app_has_focus || !g_VideoMode.IsInFullscreen()))
|
||||
{
|
||||
Render();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user