diff options
author | Martin Gerhardy <martin.gerhardy@gmail.com> | 2013-05-06 20:19:00 +0200 |
---|---|---|
committer | Martin Gerhardy <martin.gerhardy@gmail.com> | 2013-05-07 06:44:32 +0200 |
commit | 8485632cff9d1b1ffd18315aed5690e995f1ec59 (patch) | |
tree | ff1affbaeec6a4650adbec1144c98a015e77b7c0 | |
parent | 3aeac5cb31f0cdfab95ad52ec152f88754dab340 (diff) |
* more SDL2 stuff
-rw-r--r-- | src/library_sdl.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 11051dd4..f5112abe 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1711,6 +1711,50 @@ var LibrarySDL = { return Module.ctx.getExtension(extension); }, + 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) { |