Skip to content

Commit

Permalink
Emscripten: resize canvas to 0x0 in DestroyWindow
Browse files Browse the repository at this point in the history
Closest we can get to actually destroying it
  • Loading branch information
Daft-Freak committed Jan 29, 2019
1 parent d60546a commit 04b1494
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/emscripten/SDL_emscriptenvideo.c
Expand Up @@ -293,6 +293,10 @@ Emscripten_DestroyWindow(_THIS, SDL_Window * window)
data->egl_surface = EGL_NO_SURFACE;
}
#endif

/* We can't destroy the canvas, so resize it to zero instead */
emscripten_set_canvas_element_size(NULL, 0, 0);

SDL_free(window->driverdata);
window->driverdata = NULL;
}
Expand Down

0 comments on commit 04b1494

Please sign in to comment.