Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix black screen when return from background #1918

Merged
merged 1 commit into from Nov 1, 2019

Conversation

minggo
Copy link
Contributor

@minggo minggo commented Nov 1, 2019

This issue happend by on some iOS devices with iOS13 by doing these operations:

  • lock the screen when the application is running
  • unlock the screen and return to the application

This issue happend by on some iOS devices with iOS13 by doing these operations:
- lock the screen when the application is running
- unlock the screen and return to the application
@holycanvas holycanvas merged commit daa0c54 into cocos:v2.2.1-release Nov 1, 2019
1 check passed
// will return false if lock screen when running application, which make framebuffer in invalid state.
// FIXME: do binding framebuffer in other place?
UIApplicationState state = [[UIApplication sharedApplication] applicationState];
if (state == UIApplicationStateBackground)
Copy link
Contributor

@dumganhar dumganhar Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是不是应该判断 state != UIApplicationStateActive 比较合适?因为 Inactive 和 background 的时候都不能调用 GL 函数的。
WeChatecb53846cb9798dc5f8ee790ff239324

Copy link
Contributor Author

@minggo minggo Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该也可以。目前的实现会出现什么问题吗?

Copy link
Contributor

@dumganhar dumganhar Nov 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

进游戏,马上最小化,好像还是会黑屏呢。

Copy link
Contributor Author

@minggo minggo Nov 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我测试过,没问题啊。

@lanxuaner
Copy link

@lanxuaner lanxuaner commented Jan 2, 2020

引擎版本:2.2.1
微信版本:7.0.9
ios系统版本:13.3
锁屏后,仍然会卡屏,大概8s之后,就自动恢复,。大大们,可以关注下这个问题吗?

@minggo
Copy link
Contributor Author

@minggo minggo commented Jan 3, 2020

你说的是微信小游戏运行的问题?如果是的话,那这个 PR 不是解决这个问题的。这个 PR 解决的是Creator 发布为 iOS 原生游戏的问题。

@lanxuaner
Copy link

@lanxuaner lanxuaner commented Jan 4, 2020

哦哦,好的,那ios13上微信小游戏卡屏的问题你们能解决吗?

@minggo
Copy link
Contributor Author

@minggo minggo commented Jan 4, 2020

这个能麻烦在论坛建立帖子详细描述一下吗?我让同事看一下。

@lanxuaner
Copy link

@lanxuaner lanxuaner commented Jan 4, 2020

可以的,我正在建立一个空的工程测试看看,然后发个帖子。

@minggo minggo deleted the ios-back-screen-v2.2.1 branch Jan 13, 2020
@RinzzHot
Copy link

@RinzzHot RinzzHot commented Jan 13, 2020

我测试的是2.2.2 版本也有这个问题,微信小游戏在ios13上,有时是卡8s有时是直接把微信给干退了。微信都闪退了。十分影响用户体验,求解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants