From 70a93a3622a27ddbf26771dfe2cac8153686e036 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Nov 2010 20:57:28 -0800 Subject: additional SDL stubs --- src/library_sdl.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/library_sdl.js') diff --git a/src/library_sdl.js b/src/library_sdl.js index 9c21871a..c77a684c 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -29,6 +29,8 @@ mergeInto(Library, { SDL_SetVideoMode: function(width, height, depth, flags, canvas) { // ^^^^^^ a 'canvas' parameter is added here; supply a canvas from JS there + // or, define __CANVAS__. + canvas = canvas || __CANVAS__; var surf = _malloc(14*QUANTUM_SIZE); // SDL_Surface has 14 fields of quantum size SDL_SURFACES[surf] = { width: width, @@ -82,5 +84,18 @@ mergeInto(Library, { SDL_Delay: function(delay) { // No can do... unless you were a generator... }, + + SDL_WM_SetCaption: function(title, icon) { + title = Pointer_stringify(title); + icon = Pointer_stringify(icon); + }, + + SDL_EnableKeyRepeat: function(delay, interval) { + // TODO + }, + + SDL_ShowCursor: function(toggle) { + // TODO + }, }); -- cgit v1.2.3-18-g5258