Commit abc04270b778fd9abdc35d88e9874688fc9cfeb5

Charlie Birks 2020-04-15T15:22:39

emscripten: Fix framebuffer array creation optimisation

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/emscripten/SDL_emscriptenframebuffer.c b/src/video/emscripten/SDL_emscriptenframebuffer.c
index 219d48c..95087da 100644
--- a/src/video/emscripten/SDL_emscriptenframebuffer.c
+++ b/src/video/emscripten/SDL_emscriptenframebuffer.c
@@ -109,6 +109,7 @@ int Emscripten_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rec
             if (SDL2.data32Data !== data) {
                 SDL2.data32 = new Int32Array(data.buffer);
                 SDL2.data8 = new Uint8Array(data.buffer);
+                SDL2.data32Data = data;
             }
             var data32 = SDL2.data32;
             num = data32.length;