aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Vilk <jvilk@cs.umass.edu>2014-01-03 15:26:47 -0500
committerJohn Vilk <jvilk@cs.umass.edu>2014-01-03 15:26:47 -0500
commit2268e7b0b65b532f4bc762b394e8d1c4a590fefc (patch)
tree1151e22b6fc45b4ab438c4f8b5f82c6fffc723a7 /tests
parenta1faa7ef09a250599f2a4a2e4803c4f571aa9558 (diff)
[SDL] Fixing SDL_UnlockSurface in IE10/IE11.
Previously, just calling SDL_UnlockSurface in IE10/IE11 would throw an exception, since Emscripten assumed that the ImageData's `data` property was Uint8ClampedArray, which has a backing buffer. IE10/IE11 still uses the deprecated CanvasPixelArray, which does not have a backing buffer property: https://developer.mozilla.org/en-US/docs/Web/API/CanvasPixelArray I've added an additional path to SDL_UnlockSurface for these browsers.
Diffstat (limited to 'tests')
-rw-r--r--tests/sdl_canvas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c
index 6bd659b8..cab48985 100644
--- a/tests/sdl_canvas.c
+++ b/tests/sdl_canvas.c
@@ -62,6 +62,8 @@ int main(int argc, char **argv) {
printf("you should see two lines of text in different colors and a blue rectangle\n");
+ SDL_UnlockSurface(screen);
+
SDL_Quit();
printf("done.\n");