diff --git a/include/IrrlichtDevice.h b/include/IrrlichtDevice.h index 6dcdb49..c6d5298 100644 --- a/include/IrrlichtDevice.h +++ b/include/IrrlichtDevice.h @@ -177,6 +177,10 @@ namespace irr /** \return True if window is fullscreen. */ virtual bool isFullscreen() const = 0; + //! Checks if the window could possibly be visible. + //! Currently, this only returns false when the app is paused on Android. + virtual bool isWindowVisible() const { return true; }; + //! Get the current color format of the window /** \return Color format of the window. */ virtual video::ECOLOR_FORMAT getColorFormat() const = 0; diff --git a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp index b1df885..4ad3773 100644 --- a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp +++ b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp @@ -193,6 +193,11 @@ bool CIrrDeviceAndroid::isWindowMinimized() const return !Focused; } +bool CIrrDeviceAndroid::isWindowVisible() const +{ + return !Paused; +} + void CIrrDeviceAndroid::closeDevice() { ANativeActivity_finish(Android->activity); diff --git a/source/Irrlicht/Android/CIrrDeviceAndroid.h b/source/Irrlicht/Android/CIrrDeviceAndroid.h index 656c456..e771082 100644 --- a/source/Irrlicht/Android/CIrrDeviceAndroid.h +++ b/source/Irrlicht/Android/CIrrDeviceAndroid.h @@ -36,6 +36,8 @@ namespace irr virtual bool isWindowMinimized() const; + virtual bool isWindowVisible() const; + virtual void closeDevice(); virtual void setResizable(bool resize = false);