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