Skip to content

Commit

Permalink
use Module.createContext for 2D rendering in emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Sep 13, 2016
1 parent bec5573 commit 1b6565f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/emscripten/SDL_emscriptenframebuffer.c
Expand Up @@ -76,7 +76,7 @@ int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rec
if (!Module['SDL2']) Module['SDL2'] = {};
var SDL2 = Module['SDL2'];
if (SDL2.ctxCanvas !== Module['canvas']) {
SDL2.ctx = Module['canvas'].getContext('2d');
SDL2.ctx = Module['createContext'](Module['canvas'], false, true);
SDL2.ctxCanvas = Module['canvas'];
}
if (SDL2.w !== w || SDL2.h !== h || SDL2.imageCtx !== SDL2.ctx) {
Expand Down

0 comments on commit 1b6565f

Please sign in to comment.