Skip to content

Reset UI on WebGL context loss - #3282

Merged
Ghabry merged 1 commit into
EasyRPG:masterfrom
Desdaemon:webgl-restore
Oct 13, 2024
Merged

Reset UI on WebGL context loss#3282
Ghabry merged 1 commit into
EasyRPG:masterfrom
Desdaemon:webgl-restore

Conversation

@Desdaemon

@Desdaemon Desdaemon commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

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
@ghost
ghost requested a review from Ghabry October 11, 2024 02:25
@ghost ghost removed the Building label Oct 11, 2024
@Ghabry Ghabry added this to the 0.8.1 milestone Oct 13, 2024
@Ghabry
Ghabry merged commit f6419e3 into EasyRPG:master Oct 13, 2024
@Desdaemon
Desdaemon deleted the webgl-restore branch October 27, 2024 01:28
sevenc-nanashi pushed a commit to sevenc-nanashi/easyrpg-player that referenced this pull request May 31, 2026
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.

2 participants