aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
AgeCommit message (Collapse)Author
2014-03-28fix SDL bug where freeing the surface screen did not work properlyAlon Zakai
2014-03-18Merge pull request #2241 from Noxalus/incomingAlon Zakai
Complete the list of properly supported keys
2014-03-18Complete the list of properly supported keysNoxalus
Sort the key code and scan code maps by key and add many missing keys.
2014-03-17Merge pull request #2234 from Noxalus/incomingAlon Zakai
Fix numepad 0 key and add few other keys
2014-03-17Fix numepad 0 key and add few other keysNoxalus
The scan code of the numepad 0 key is 98, not 88 since that correspond to the scan code of KP_ENTER. I took the opportunity to add the missing numepad keys like KP_PLUS, KP_MULTIPLY, etc... Some other keys like caps lock weren't properly detected either.
2014-03-14Fix SDL Web Audio to work on Safari 6.0.5. That browser does not implement ↵Jukka Jylänki
the AudioBufferSourceNode.start() method, but only has the older .noteOn() method, and the audio ctors don't come out as functions, but strongly typed ctor objects.
2014-03-05Allow going fullscreen in response to mousedown eventsjonas echterhoff
2014-02-26make sdl canvas copy warning a one-time thing; fixes #2167Alon Zakai
2014-02-13Fix Mozilla Audio Data API usage after my previous commit that added the use ↵Jukka Jylänki
of ScriptProcessorNode to Web Audio backend. Fixes #2126.
2014-02-11initialize pixel buffer inside of makeSurface for SDL_SWSURFACEAnthony Pesch
2014-02-12Implement SDL audio buffer queueing to use Web Audio ScriptProcessorNode in ↵Jukka Jylänki
the special case when the requested SDL_OpenAudio sampling rate matches the Web Audio graph native sampling rate. Using ScriptProcessorNode should have the benefit that it pulls audio buffer updates with better granularity/precision than using setTimeout, which suffers from too much jitter (even spikes as long as 230msecs seen).
2014-02-11Merge branch 'incoming' of github.com:mgerhardy/emscripten into incomingAlon Zakai
Conflicts: src/library_sdl.js
2014-02-11refactor mouse wheel handling code to be shared across SDL, glfw, glutAlon Zakai
2014-02-09move emscripten_GetProcAddress to a C library, so that it is less hackish ↵1.10.3Alon Zakai
and can work in fastcomp
2014-02-06Always preventDefault() on keydown if keypress is not needed.Boris Gjenero
Some browser shortcut keys activate if event.preventDefault() is not called for the keydown event. This will prevent all such hotkeys when keypress events aren't needed.
2014-02-04Improve Web Audio buffering.Boris Gjenero
This changes the Web Audio code to increase buffers according to SDL.audio.numSimultaneouslyQueuedBuffers, which can be changed via Module['SDL_numSimultaneouslyQueuedBuffers']. It becomes more similar to Mozilla Audio Data code. Multiple pending timers are used to improve sound when there is high CPU usage.
2014-02-04lazily initialize SDL surface bufferAnthony Pesch
2014-01-22fix some sdl typos that error on safe heap in asm mode, and add test ↵Alon Zakai
coverage; fixes #2044
2014-01-17add missing ;sAlon Zakai
2014-01-03optimize main loop in SDL_UnlockSurface to avoid a branchAlon Zakai
2014-01-03[SDL] Actually fix SDL_UnlockSurface in IE10/IE11.John Vilk
The previous revision did not copy over pixel data properly. This time, I have reverted the IE path to the code used in this method prior to the breaking change, and have tested it with JSMESS.
2014-01-03[SDL] Fixing SDL_UnlockSurface in IE10/IE11.John Vilk
Previously, just calling SDL_UnlockSurface in IE10/IE11 would throw an exception, since Emscripten assumed that the ImageData's `data` property was Uint8ClampedArray, which has a backing buffer. IE10/IE11 still uses the deprecated CanvasPixelArray, which does not have a backing buffer property: https://developer.mozilla.org/en-US/docs/Web/API/CanvasPixelArray I've added an additional path to SDL_UnlockSurface for these browsers.
2013-12-27Fix missing SDL_LockSurface referenceRichard Quirk
Prior to this change, when blitting from the screen to a memory buffer the code could throw a "ReferenceError: _SDL_LockSurface is not defined" if SDL_LockSurface was not used elsewhere in the C code.
2013-12-14simplifies with aliasLu Wang
2013-12-03[SDL Audio] Refactoring Mix_LoadWAV_RW to use new FS API.John Vilk
The old API was causing issues with certain file systems, as the `read` property required the execute bit AND the read bit to be set before it would return `true`. As a side benefit, the new code is simpler and cleaner.
2013-11-26naive implement of SDL_LowerBlitLu Wang
2013-11-19[SDL] SDL_JoystickEventState should default to SDL_ENABLE, not SDL_DISABLE.John Vilk
2013-11-16Don't throw an exception on SDL_ThreadID()DopefishJustin
2013-11-15Merge pull request #1806 from juj/sdl_audio_queueingjuj
Sdl audio queueing
2013-11-16Add a configuration option Module.SDL_numSimultaneouslyQueuedBuffers to ↵Jukka Jylänki
allow user code to configure how many SDL audio buffers to keep simultaneously queued up for the audio backend. More buffers means less change of starving (and cracking audio), but increases latency. Fewer buffers lower the latency at the risk of playback glitches. Make minimum audio buffer size 128, which should be way below anything reasonable already. Clean up commented out code.
2013-11-10Support SDL audio sample size of 512 samples. Make the SDL audio buffer ↵Jukka Jylänki
queueing logic more resilient for jitter, and factor out a common parameter 'SDL.audio.numSimultaneouslyQueuedBuffers' that can be used to tune for a good quality<->latency balance.
2013-11-10[SDL] Joystick API implementation using HTML5 Gamepad APIJohn Vilk
Works in browsers that implement the working draft of the standard (current Chrome / Firefox stable): http://www.w3.org/TR/2012/WD-gamepad-20120529/#gamepad-interface ...and browsers that implement the editor's draft (current Firefox Nightly): https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#idl-def-Gamepad Contains unit tests for both event types.
2013-11-06Merge pull request #1748 from caiiiycuk/fix_sdl_colorsAlon Zakai
Fix SDL_SetColors && SDL_envets
2013-11-04Give names to most manually assigned functions in the .js files, in form ↵Jukka Jylänki
"var x = function()" -> "function x()" so that error stack traces and profiling stack traces are more informative and do not contain anonymous functions.
2013-10-30add some more sdl scancodesAlon Zakai
2013-10-31Fix handling of backspace SDL scancode.Bruce Mitchener
Fixes #1749.
2013-10-30Fix SDL_SetColors && SDL_envetsAleksander Guryanov
2013-10-24map depth and stencil buffers activation from SDL to WebGLAntoine Lambert
2013-10-23Implement SDL_SetVideoMode(0,0, ...) to create the canvas in whatever size ↵Jukka Jylänki
the <canvas> was in, and not try to resize the canvas to 0x0 pixels. Derive a new test for that from sdl_ogl.c. Fixes #1059.
2013-10-16Merge branch 'antialiasing' of github.com:wsmind/emscripten into incomingAlon Zakai
Conflicts: AUTHORS
2013-10-14Minor fixes and improvementsRemi Papillie
2013-10-14Merge branch 'fix-rotozoom' of github.com:fhd/emscripten into incomingAlon Zakai
2013-10-13Implemented MSAA for SDL.Remi Papillie
2013-10-13Implemented SDL_GL_SetAttribute and SDL_GL_GetAttribute.Remi Papillie
2013-10-03Make SDL_rotozoomSurface rotate into the correct directionFelix H. Dahlke
2013-10-01fix C_STRUCT usage in sdlAlon Zakai
2013-09-30Merge branch 'incoming' of github.com:ngld/emscripten into incoming1.6.4Alon Zakai
Conflicts: AUTHORS src/library_sdl.js tools/shared.py
2013-09-25Replace references to QUANTUM_SIZE with C_STRUCTS equivalents.ngld
2013-09-24Fix entire surface alpha blending with SDL_SetAlphaRichard Quirk
2013-09-24Hide logging in Web Audio intended mostly for debugging.Jukka Jylänki