aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 15:18:17 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 15:18:17 -0400
commitd00a990ab26652c778396580ee0b96adeb732f1f (patch)
tree4ac0ada25f3880a11f77189097a8121b8197285a /src/library_sdl.js
parentffae4e81b6eec71922b662eea9a75f5693994cb2 (diff)
Make SDL functions depend on
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 11431e4e..8f7f4c08 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -75,7 +75,7 @@
//
// * SDL_Quit does nothing.
-mergeInto(LibraryManager.library, {
+var LibrarySDL = {
$SDL__deps: ['$FS', '$Browser'],
$SDL: {
defaults: {
@@ -420,7 +420,6 @@ mergeInto(LibraryManager.library, {
return SDL.version;
},
- SDL_Init__deps: ['$SDL'],
SDL_Init: function(what) {
SDL.startTime = Date.now();
['keydown', 'keyup'].forEach(function(event) {
@@ -988,5 +987,8 @@ mergeInto(LibraryManager.library, {
window.clearTimeout(id);
return true;
}
-});
+};
+
+autoAddDeps(LibrarySDL, '$SDL');
+mergeInto(LibraryManager.library, LibrarySDL);