diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-03-30 20:15:32 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-30 20:15:32 -0700 |
commit | 3b7d149de6bb40c9714f9e863485d613d2135b5c (patch) | |
tree | 99ac4e281aa31092bfb71d849f9a7ffcfbd4d2b5 /src/library_sdl.js | |
parent | fa8b668639e9c9656a6efa0c5ff24d33e33a9f5a (diff) | |
parent | d241868b63fcd306f3ff1007b57363391b724a46 (diff) |
Merge pull request #328 from ehsan/ogre_upstream
Upstream the work I did for porting Ogre
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r-- | src/library_sdl.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 4c28eefd..631de481 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -90,6 +90,7 @@ mergeInto(LibraryManager.library, { fonts: [null], keyboardState: null, + startTime: null, mouseX: 0, mouseY: 0, @@ -98,6 +99,7 @@ mergeInto(LibraryManager.library, { 40: 1105, // down arrow 37: 1104, // left arrow 39: 1103, // right arrow + 17: 305, // control (right, or left) 18: 308, // alt 109: 45, // minus @@ -378,7 +380,13 @@ mergeInto(LibraryManager.library, { return 0; // success }, - SDL_WasInit: function() { return 0 }, // TODO + SDL_WasInit__deps: ['SDL_Init'], + SDL_WasInit: function() { + if (SDL.startTime === null) { + _SDL_Init(); + } + return 1; + }, SDL_GetVideoInfo: function() { // %struct.SDL_VideoInfo = type { i32, i32, %struct.SDL_PixelFormat*, i32, i32 } - 5 fields of quantum size |