aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
AgeCommit message (Collapse)Author
2013-06-17Fix SDL color encoding.Jez Ng
Little-endian + RGBA means that red is located at the lowest-order bits, not the highest. The hello_world_sdl test is now portable, because we no longer write to individual bytes. We also add a test for a completely blank screen, which should be black, not red. Closes #1287, #761, #765.
2013-06-17Merge pull request #1283 from juj/SDL_CreateRGBSurfaceFromAlon Zakai
Don't throw when SDL_CreateRGBSurfaceFrom is called, but at least give a...
2013-06-16Merge pull request #1282 from juj/sdl_addtimerAlon Zakai
Fix SDL_AddTimer dyncall signature. The timer callback is of form 'typed...
2013-06-13Add no-op SDL_WM_SetIcon.Jukka Jylänki
2013-06-13Don't throw when SDL_CreateRGBSurfaceFrom is called, but at least give an ↵Jukka Jylänki
uninitialized surface.
2013-06-13Fix SDL_AddTimer dyncall signature. The timer callback is of form 'typedef ↵Jukka Jylänki
Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);'.
2013-06-08 - Fix for mod property of SDL key eventsAnthony Pesch
- Added misc SDL functions (SDL_GetKeyName, SDL_GetAppState, SDL_SetGammaRamp) - Added modifiers to test_sdl_key
2013-06-07better erroring in SDL_Delay; issue #1255Alon Zakai
2013-06-05sdl fixes; fixes #1251Alon Zakai
2013-06-05return the best we can from SDL_OpenAudio, fixes #1253Alon Zakai
2013-05-29Free old surface before creating new oneAnthony Pesch
2013-05-22do not call code-running callbacks if ABORTing; fixes #1191Alon Zakai
2013-05-20Make looping behavior on effects match background music.James Gregory
2013-05-20According to http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.pdf, 0 ↵James Gregory
is the only value for the loop argument that does not cause looping on Mix_PlayMusic. Update Emscripten's implementation to respect this.
2013-05-16fix test_sdl_alloctextAlon Zakai
2013-05-14* Switch to using offscren canvas for TTF size estimation in SDLJames Gregory
* use the actual font the user asked for.
2013-05-13use Browser mouse calculations in glutAlon Zakai
2013-05-13refactor mouse movement handling from SDL into BrowserAlon Zakai
2013-05-09misc sdl fixes to pull #1146Alon Zakai
2013-05-07* SDL_GL_ExtensionSupported: fixed integer valueMartin Gerhardy
* added myself to the AUTHORS file
2013-05-07* more SDL2 stuffMartin Gerhardy
2013-05-07* some SDL2 stuffMartin Gerhardy
2013-05-02fix SDL.keyboardState size to add safe buffer zoneAlon Zakai
2013-05-01unpress keys when losing focusAlon Zakai
2013-05-01preparation for key releasing when losing focus in SDLAlon Zakai
2013-03-30Support rotozoomSurfaceFelix H. Dahlke
2013-03-20fix indentationAlon Zakai
2013-03-19Make SDL handle the case where canvas backbuffer and canvas CSS element are ↵Vladimir Vukicevic
not the same size
2013-03-17optimize SDL.offsetsAlon Zakai
2013-03-17Fix offsets for canvasAleksander Guryanov
2013-03-12make sure SDL.channelMinimumNumber is initialized; fixes SDL audio testsAlon Zakai
2013-03-08Added test and fixed bugs exposed by the test.Michael Bishop
2013-03-08Add support for `Mix_ReserveChannels`Michael Bishop
2013-03-06Further improvement of the full screen support:Michael Riss
- SDL_WM_ToggleFullScreen now delivers correct return values, reflecting that for a SDL program it's impossible to switch to full screen mode in the browser environment Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
2013-03-06- fixed formatting issuesMichael Riss
- bugfix: an existing pointerLockChange handler now gets properly removed before it is installed anew - completed the implementation of the SDL_ShowCursor() function: - can now query the current state of the cursor/pointer - properly delivers adequate return values - added safeguard: when not in fullscreen mode, attempts to lock the pointer are ignored as they would fail due to the security model of the browser and a return value indicating the error is returned Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
2013-03-06Improved fullscreen functionality.Michael Riss
- the requestFullScreen function now has two boolean arguments: "doLockPointer" and "doResizeCanvas" - when using "doResizeCanvas", the SDL application gets notified via the "SDL_VIDEORESIZE" event of the new resolution, the old resolution setting is saved and gets restored when the canvas returns to windowed mode - when setting "doLockPointer" to false the mouse pointer remains visible in fullscreen mode and allows e.g. RTS (Real Time Strategy) type games - the SDL application can check via the "SDL_FULLSCREEN" flag in the flags field of the SDL_Surface struct whether the canvas is currently in fullscreen mode or not. - depending on the browser the SDL application can switch out of the fullscreen mode with the "SDL_WM_ToggleFullScreen(SDL_Surface*);" call (currently chrome supports it, firefox does not) - Also, the requestFullScreen has been fixed to avoid repeated adding of the event listeners every time requestFullScreen is called. - src/shell.html got changed to demonstrate all variants to switch to fullscreen mode Note: Due to the security model of web browsers, the SDL model cannot be fully supported. What is not possible? - Initiating the switch to fullscreen from the SDL application. - Initiating the pointer lock from the SDL application when *not* in fullscreen mode How to work around the limitations? All the actions that cannot be initiated by the SDL application have to be initiated by the web browser instead. A good practice should be to start the application in windowed mode and have a button situated close to the canvas which switches the canvas into fullscreen mode and also changes the canvas size to fullscreen resolution. This way, the SDL application receives a SDL_VIDEORESIZE event and can check in the even handler whether it is now in fullscreen mode and take further actions. When leaving fullscreen mode the old windowed canvas resolution gets restored and triggers another SDL_VIDEORESIZE event which - again - can be used to adapt the application to windowed mode. Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
2013-03-05fix coding convention stuffAlon Zakai
2013-03-05Merge branch 'sd-audio' of github.com:michaeljbishop/emscripten into ↵Alon Zakai
michaeljbishop-sd-audio
2013-02-28simplify audio fix from last commitAlon Zakai
2013-02-28Make Mix_QuickLoad_RAW work againEhsan Akhgari
2013-02-27Implement SDL_TEXTINPUTEhsan Akhgari
2013-02-26return 0 in Mix_Init if no flags are provided; this allows ↵Alon Zakai
|while(Mix_Init(0)) Mix_Quit();| to work
2013-02-26Mix_QuitAlon Zakai
2013-02-22Changed formatting and fixed a bug in response to Kripken'sMichael J. Bishop
recommendations.
2013-02-22Added some SDL_Mixer calls:Michael J. Bishop
- `Mix_Playing` - `Mix_Pause` - `Mix_Pause` - `Mix_Resume`
2013-02-20Mix_InitAlon Zakai
2013-02-19Use the copy composite operation when calling drawImageEhsan Akhgari
This optimizes IMG_Load so that it just does a memcpy as opposed to try to composite. The resulting buffer will be the same, it just happens that we don't need to do all of the work involved in compositing in the first place.
2013-02-06option to not capture keyboard in SDLAlon Zakai
2013-01-29fix Mix_PlayChannel error return codes; fixes #805Alon Zakai
2013-01-24fix SDL_GetMouseState ; fixes #795Alon Zakai