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

Reset UI on WebGL context loss #3282

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Conversation

Desdaemon
Copy link
Contributor

@Desdaemon Desdaemon commented Oct 11, 2024

Adds a new API to be called when the webglcontextrestored event has been fired by the browser, after restoring the context to the canvas.

On Emscripten, the WebGL context may be loss for any reason, for example
when restoring the application from the background, the GPU force-
refreshed the application to reclaim memory, etc. In these cases, canvas
data is lost and this commit accommodates that situation by reinitiali-
zing the UI when the browser has restored the context.
@github-actions github-actions bot added Building Emscripten WebAssembly/JavaScript port for web browsers labels Oct 11, 2024
@fdelapena fdelapena requested a review from Ghabry October 11, 2024 02:25
@Ghabry Ghabry added this to the 0.8.1 milestone Oct 13, 2024
@Ghabry Ghabry merged commit f6419e3 into EasyRPG:master Oct 13, 2024
15 checks passed
@Desdaemon Desdaemon deleted the webgl-restore branch October 27, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emscripten WebAssembly/JavaScript port for web browsers
Development

Successfully merging this pull request may close these issues.

3 participants