emscripten: Let SDL hints be set by URL parameters.
Any parameters (key/value pairs after the '?' in a URL) that have a keyname that starts with `SDL_` will be put into Emscripten's environment variable emulation table at startup, before SDL_main runs. This lets users set hints the same way they might set them from a shell's command line on a desktop platform: For example: `https://example.com/my_sdl3_application.html?SDL_RENDER_DRIVER=software` Fixes #10154.
This commit is contained in:
@@ -1480,6 +1480,8 @@ elseif(EMSCRIPTEN)
|
||||
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
|
||||
sdl_compile_options(PRIVATE "-Wno-warn-absolute-paths")
|
||||
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/emscripten/*.c")
|
||||
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/main/emscripten/*.c")
|
||||
set(HAVE_SDL_MAIN_CALLBACKS TRUE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user