mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-03 07:29:37 +01:00
0e45984fa0
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
34 lines
937 B
Markdown
34 lines
937 B
Markdown
Emscripten
|
|
================================================================================
|
|
|
|
Build:
|
|
|
|
$ 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
|
|
|
|
tests: https://dl.dropboxusercontent.com/u/17360362/SDL2-em/index.html
|
|
|
|
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
|
|
|
|
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/)
|
|
|
|
$ EMCONFIGURE_JS=1 emconfigure ../configure
|
|
build as usual...
|
|
|
|
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
|
|
|
|
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
|
|
build as usual...
|