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
|
@ -424,9 +424,12 @@ void OpenGLESPage::SetVisibility(bool isVisible)
|
||||||
{
|
{
|
||||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
if (!mVisible)
|
||||||
mVisible = true;
|
{
|
||||||
mSleepCondition.notify_one();
|
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||||
|
mVisible = true;
|
||||||
|
mSleepCondition.notify_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -424,9 +424,12 @@ void OpenGLESPage::SetVisibility(bool isVisible)
|
||||||
{
|
{
|
||||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
if (!mVisible)
|
||||||
mVisible = true;
|
{
|
||||||
mSleepCondition.notify_one();
|
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||||
|
mVisible = true;
|
||||||
|
mSleepCondition.notify_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -424,9 +424,12 @@ void OpenGLESPage::SetVisibility(bool isVisible)
|
||||||
{
|
{
|
||||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
if (!mVisible)
|
||||||
mVisible = true;
|
{
|
||||||
mSleepCondition.notify_one();
|
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||||
|
mVisible = true;
|
||||||
|
mSleepCondition.notify_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -424,9 +424,12 @@ void OpenGLESPage::SetVisibility(bool isVisible)
|
||||||
{
|
{
|
||||||
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
if (isVisible && mRenderSurface != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> locker(mSleepMutex);
|
if (!mVisible)
|
||||||
mVisible = true;
|
{
|
||||||
mSleepCondition.notify_one();
|
std::unique_lock<std::mutex> locker(mSleepMutex);
|
||||||
|
mVisible = true;
|
||||||
|
mSleepCondition.notify_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue