Add IrrlichtDevice::isWindowVisible for Android

This commit is contained in:
grorp 2024-01-04 16:48:35 +01:00 committed by GitHub
parent 03dd8b0336
commit 54b82aad26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

@ -177,6 +177,10 @@ namespace irr
/** \return True if window is fullscreen. */ /** \return True if window is fullscreen. */
virtual bool isFullscreen() const = 0; 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 //! Get the current color format of the window
/** \return Color format of the window. */ /** \return Color format of the window. */
virtual video::ECOLOR_FORMAT getColorFormat() const = 0; virtual video::ECOLOR_FORMAT getColorFormat() const = 0;

@ -193,6 +193,11 @@ bool CIrrDeviceAndroid::isWindowMinimized() const
return !Focused; return !Focused;
} }
bool CIrrDeviceAndroid::isWindowVisible() const
{
return !Paused;
}
void CIrrDeviceAndroid::closeDevice() void CIrrDeviceAndroid::closeDevice()
{ {
ANativeActivity_finish(Android->activity); ANativeActivity_finish(Android->activity);

@ -36,6 +36,8 @@ namespace irr
virtual bool isWindowMinimized() const; virtual bool isWindowMinimized() const;
virtual bool isWindowVisible() const;
virtual void closeDevice(); virtual void closeDevice();
virtual void setResizable(bool resize = false); virtual void setResizable(bool resize = false);