author Ryan C. Gordon <>
Mon, 20 Apr 2015 12:22:44 -0400
changeset 9566 7454bfce9202
parent 9302 2ddb65f75084
child 9782 fcf237e5e834
permissions -rw-r--r--
Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.



    $ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2"
    $ emmake make

Or with cmake:

    $ emconfigure cmake ..
    $ make

To build one of the tests:

    $ cd test/
    $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html

Uses GLES2 renderer or software


Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):

SDL_mixer (

    $ EMCONFIGURE_JS=1 emconfigure ../configure
    build as usual...

SDL_gfx (

    $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
    build as usual...