[emscripten] Remove reference to Module['createContext']

Backported from https://github.com/libsdl-org/SDL/pull/12970

(cherry picked from commit c0f78dee5e)
This commit is contained in:
Sam Clegg
2025-05-06 13:04:37 -07:00
committed by Sam Lantinga
parent 4ed1fc5bff
commit dc69988fdf

View File

@@ -79,7 +79,7 @@ int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect
if (!Module['SDL2']) Module['SDL2'] = {};
var SDL2 = Module['SDL2'];
if (SDL2.ctxCanvas !== Module['canvas']) {
SDL2.ctx = Module['createContext'](Module['canvas'], false, true);
SDL2.ctx = Browser.createContext(Module['canvas'], false, true);
SDL2.ctxCanvas = Module['canvas'];
}
if (SDL2.w !== w || SDL2.h !== h || SDL2.imageCtx !== SDL2.ctx) {