-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Don't update when suspended to avoid GPU use on iOS. #2482
Conversation
Ideally we would want to stop only the render part of the update when suspended, but that's much more complicated... This is a good solution I think until we can do that 👍 (unless the rendering rework offers a better solution?) Do you know if that fixes the similar issue on android? |
bors try |
tryBuild failed: |
@mockersf I have not tested this on Android. |
bors try |
tryBuild succeeded: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a solid solution until we can decouple rendering from updates. I'm sold!
bors r+ |
# Objective This fixes a crash caused by iOS preventing GPU access when not focused: #2296 ## Solution This skips `app.update()` in `winit_runner` when `winit` sends the `Suspended` event, until `Resumed`. I've tested that this works for me on my iOS app.
@HackerFoo could you comment on #2373 if you're ok with the license change? |
@mockersf Done. |
thanks! |
Pull request successfully merged into main. Build succeeded: |
# Objective This fixes a crash caused by iOS preventing GPU access when not focused: bevyengine#2296 ## Solution This skips `app.update()` in `winit_runner` when `winit` sends the `Suspended` event, until `Resumed`. I've tested that this works for me on my iOS app.
Objective
This fixes a crash caused by iOS preventing GPU access when not focused: #2296
Solution
This skips
app.update()
inwinit_runner
whenwinit
sends theSuspended
event, untilResumed
.I've tested that this works for me on my iOS app.