aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-09 12:01:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-09 12:01:58 -0700
commitd59c69f2541240a700d0c03f22dc334314ad98c6 (patch)
tree4f3c73f60f70823c59d2d41cb5363fc63351e9ca /src/library_sdl.js
parent953484e4cf3e93fc3bf5fdb4e6e7a438299162cc (diff)
parent5123418c4a37b67309e4be386ee12ccd5ea36c8c (diff)
Merge branch 'incoming' of github.com:mgerhardy/emscripten into mgerhardy-incoming
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index a1fb871f..8a7519b9 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1705,6 +1705,62 @@ var LibrarySDL = {
SDL_GL_SwapBuffers: function() {},
+ // SDL 2
+
+ SDL_GL_ExtensionSupported: function(extension) {
+ return Module.ctx.getExtension(extension) | 0;
+ },
+
+ SDL_DestroyWindow: function(window) {},
+
+ SDL_DestroyRenderer: function(renderer) {},
+
+ SDL_GetWindowFlags: function(x, y) {
+ if (Browser.isFullScreen) {
+ return 1;
+ }
+
+ return 0;
+ },
+
+ SDL_GL_SwapWindow: function(window) {},
+
+ SDL_GL_MakeCurrent: function(window, context) {},
+
+ SDL_GL_DeleteContext: function(context) {},
+
+ SDL_GL_SetSwapInterval: function(state) {},
+
+ SDL_SetWindowTitle: function(window, title) {
+ title = title && Pointer_stringify(title);
+ },
+
+ SDL_GetWindowSize: function(window, width, height){
+ var w = Module['canvas'].width;
+ var h = Module['canvas'].height;
+ if (width) {{{ makeSetValue('width', '0', 'w', 'i32') }}};
+ if (height) {{{ makeSetValue('height', '0', 'h', 'i32') }}};
+ },
+
+ SDL_LogSetOutputFunction: function(callback, userdata) {},
+
+ SDL_SetWindowFullscreen: function(window, fullscreen) {
+ if (Browser.isFullScreen) {
+ Module['canvas'].cancelFullScreen();
+ return 1;
+ } else {
+ return 0;
+ }
+ },
+
+ SDL_GetWindowFlags: function() {},
+
+ SDL_ClearError: function() {},
+
+ SDL_getenv: function(variable) {
+ return "";
+ },
+
// TODO
SDL_SetGamma: function(r, g, b) {