aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-19 17:48:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-19 17:48:48 -0700
commitcd7a868630ab58fa0edf96d982d80b96f5e58b1e (patch)
tree1ff19145774fe977fb9987e6f47b8e6777c36cf8
parent41823148baaac2cf6cf700f4c19f3107de6f9592 (diff)
allow later SDL_SetVideoMode calls to not mention GL, and add GL to the flags if so, so we stay in GL mode
-rw-r--r--src/library_sdl.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 2116afe2..eaa2b5bb 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1343,6 +1343,8 @@ var LibrarySDL = {
assert(!SDL.screen);
}
+ if (SDL.GL) flags = flags | 0x04000000; // SDL_OPENGL - if we are using GL, then later calls to SetVideoMode may not mention GL, but we do need it. Once in GL mode, we never leave it.
+
SDL.screen = SDL.makeSurface(width, height, flags, true, 'screen');
return SDL.screen;