Rename global bool IsVisible by IsSDLWindowVisible

This commit is contained in:
Joris Dauphin 2010-11-16 18:58:55 +01:00
parent e7ef406888
commit e68d435a90
3 changed files with 7 additions and 7 deletions
src
include
stratagus
video

View file

@ -199,7 +199,7 @@ extern bool GodMode;
/// Whether the map is the only thing displayed or not
extern char BigMapMode;
/// Flag telling if the SDL window is visible
extern bool IsVisible;
extern bool IsSDLWindowVisible;
/// pressed mouse buttons (normal,double,dragged,long)
extern int MouseButtons;

View file

@ -369,7 +369,7 @@ static int RealVideoSyncSpeed;
static void DisplayLoop(void)
{
#ifdef USE_MAEMO
if (!IsVisible) {
if (!IsSDLWindowVisible) {
// On Maemo do not redraw/update screen when SDL window is not visible
// This stop draining battery power on Nokia N900
return;

View file

@ -118,7 +118,7 @@ static int FrameFraction; /// Frame fractional term
const EventCallback *Callbacks;
static bool RegenerateScreen = false;
bool IsVisible = true;
bool IsSDLWindowVisible = true;
/*----------------------------------------------------------------------------
-- Functions
@ -775,14 +775,14 @@ static void SdlDoEvent(const EventCallback *callbacks, const SDL_Event *event)
if (event->active.state & SDL_APPACTIVE || SDL_GetAppState() & SDL_APPACTIVE) {
static bool DoTogglePause = false;
if (IsVisible && !event->active.gain) {
IsVisible = false;
if (IsSDLWindowVisible && !event->active.gain) {
IsSDLWindowVisible = false;
if (!GamePaused) {
DoTogglePause = true;
UiTogglePause();
}
} else if (!IsVisible && event->active.gain) {
IsVisible = true;
} else if (!IsSDLWindowVisible && event->active.gain) {
IsSDLWindowVisible = true;
if (GamePaused && DoTogglePause) {
DoTogglePause = false;
UiTogglePause();