mirror of https://github.com/axmolengine/axmol.git
added check to see if app is already visible
This commit is contained in:
parent
3f359381dc
commit
d8e10981db
|
@ -423,11 +423,14 @@ void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args
|
|||
void OpenGLESPage::SetVisibility(bool isVisible)
|
||||
{
|
||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||
{
|
||||
if (!mVisible)
|
||||
{
|
||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||
mVisible = true;
|
||||
mSleepCondition.notify_one();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mVisible = false;
|
||||
|
|
|
@ -423,11 +423,14 @@ void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args
|
|||
void OpenGLESPage::SetVisibility(bool isVisible)
|
||||
{
|
||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||
{
|
||||
if (!mVisible)
|
||||
{
|
||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||
mVisible = true;
|
||||
mSleepCondition.notify_one();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mVisible = false;
|
||||
|
|
|
@ -423,11 +423,14 @@ void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args
|
|||
void OpenGLESPage::SetVisibility(bool isVisible)
|
||||
{
|
||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||
{
|
||||
if (!mVisible)
|
||||
{
|
||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||
mVisible = true;
|
||||
mSleepCondition.notify_one();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mVisible = false;
|
||||
|
|
|
@ -423,11 +423,14 @@ void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args
|
|||
void OpenGLESPage::SetVisibility(bool isVisible)
|
||||
{
|
||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||
{
|
||||
if (!mVisible)
|
||||
{
|
||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||
mVisible = true;
|
||||
mSleepCondition.notify_one();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mVisible = false;
|
||||
|
|
Loading…
Reference in New Issue