-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Proper surface reset when resuming app on Android #39004
Proper surface reset when resuming app on Android #39004
Conversation
cc @m4gr3d for review |
// Update the native renderer instead of restarting the app. | ||
// GodotLib.newcontext should not be called here once it's done. | ||
GodotLib.newcontext(surface, false) | ||
GodotLib.resetsurface(surface) |
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.
Seems the call order here is important since DisplayServerAndroid
uses the size set by GodotLib.resize
here to reset the window.
Would it be simpler to merge the two methods? Or to expand resetsurface
to also take a width
and height
arguments and drop the call to resize
for the VkRenderer
?
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.
Ok, no problem to merge them.
Just re-creating the window instead of restarting the app entirely.
2de5580
to
b987677
Compare
Changes from review done! |
Thanks! |
Just re-creating the window instead of restarting the app entirely after pausing and resuming.
Addresses remaining issue listed in #36919:
Properly handle
onVkSurfaceChanged
event to update the rendering system