Emscripten: Fix a crash from SDL2 by disabling asserts

Clearly not ideal.
This commit is contained in:
Tamás Bálint Misius 2023-08-19 20:53:09 +02:00
parent dca5e25b3b
commit 3d4ce09a80
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -126,6 +126,12 @@ namespace Platform
void SetupCrt() void SetupCrt()
{ {
EM_ASM({ EM_ASM({
// If we don't castrate assert here, we get a crash from within the emscripten port of
// SDL2 having to do with registering a callback that reports to the main thread, ever
// since this "fix" https://github.com/emscripten-core/emscripten/pull/19691/files
// TODO: Review later.
assert = () => {};
let ddir = UTF8ToString($0); let ddir = UTF8ToString($0);
let prefix = ddir + '/'; let prefix = ddir + '/';
let shouldSyncFs = Module.cwrap( let shouldSyncFs = Module.cwrap(