Skip to content

Proper surface reset when resuming app on Android#39004

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
nekomatata:android-reset-surface
May 24, 2020
Merged

Proper surface reset when resuming app on Android#39004
akien-mga merged 1 commit into
godotengine:masterfrom
nekomatata:android-reset-surface

Conversation

@pouleyKetchoupp

Copy link
Copy Markdown
Contributor

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

@pouleyKetchoupp

Copy link
Copy Markdown
Contributor Author

cc @m4gr3d for review

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

@m4gr3d m4gr3d requested a review from a team May 24, 2020 17:09
Just re-creating the window instead of restarting the app entirely.
@pouleyKetchoupp pouleyKetchoupp force-pushed the android-reset-surface branch from 2de5580 to b987677 Compare May 24, 2020 18:43
@pouleyKetchoupp

Copy link
Copy Markdown
Contributor Author

Changes from review done!

@akien-mga akien-mga merged commit 3ecdc27 into godotengine:master May 24, 2020
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@pouleyKetchoupp pouleyKetchoupp deleted the android-reset-surface branch May 24, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants