scummvm/dists/emscripten/custom_shell-pre.js
Christian Kündig bc3679e928 EMSCRIPTEN: Major build improvements
- Updated Emscripten to version 3.1.8 (+ additional patches)
- Support for dynamic plugins
- Adding ScummvmFS with support for HTTP Range Requests for game data
- Automated games/demos bundling and ini config generation during build
- Allow passing CLI arguments via fragment identifier of the website (i.e. scummvm.html#—debuglevel=9 )
- UI improvements with nicer status messages, splash screen + favicon
- Fixed HiDPI handling and responsiveness
- Bugfix: Don't crash if gamepad support isn't available
2022-06-12 14:34:13 +02:00

18 lines
707 B
JavaScript

/*global Module*/
Module["arguments"] = [];
Module["arguments"].push("--config=/local/scummvm.ini");
// https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API only works in secure contexts and supported browsers.
// This disables joystick support to avoid a crash when initializing the sdl subsystem without the gamepad API being available.
if (!navigator.getGamepads && !navigator.webkitGetGamepads) {
Module["arguments"].push("--joystick=-1")
}
// Add all parameters passed via the fragment identifier
if (window.location.hash.length > 0) {
params = decodeURI(window.location.hash.substring(1)).split(" ")
params.forEach((param) => {
Module["arguments"].push(param);
})
}