Files
scummvm-cursorfix/dists/emscripten/custom_shell-post.js
2026-02-02 04:50:13 +01:00

11 lines
439 B
JavaScript

// Workaround for https://github.com/emscripten-core/emscripten/pull/9803
// which results in mouse events not working anymore after context switches
// (i.e. when launching a game)
/*global JSEvents*/
JSEvents.removeAllHandlersOnTarget = function(){};
// Make sure to release any resources (e.g. RetroWave or Midi Devices) when leaving the page
window.addEventListener("beforeunload", function (e) {
Module["_raise"](2); // SIGINT
});