added check to see if app is already visible

This commit is contained in:
Dale Stammen 2015-10-20 10:38:42 -07:00
parent 3f359381dc
commit d8e10981db
4 changed files with 24 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;