Polish the SDL backend and the Emscripten build.

* Remove dependency on SDL.h where possible
 * Use run-time linking where possible
 * Support both SDL 1.2 and SDL 2
 * Add device enumeration when using SDL 2

The Emscripten build currently uses SDL 1.2 because it avoids the need
for "-s USE_SDL=2" when compiling. This may change later if there's
ever a need or if there's enough demand.
This commit is contained in:
David Reid
2017-11-19 12:04:58 +10:00
parent fbecb5dedf
commit c340035fe6
3 changed files with 293 additions and 81 deletions
+1
View File
@@ -54,6 +54,7 @@ int main(int argc, char** argv)
mal_backend_oss,
mal_backend_opensl,
mal_backend_openal,
mal_backend_sdl,
mal_backend_null // Lowest priority.
};