Rename global bool IsVisible by IsSDLWindowVisible
This commit is contained in:
parent
e7ef406888
commit
e68d435a90
3 changed files with 7 additions and 7 deletions
src
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue