diff --git a/Common.mak b/Common.mak index f6411bf..9c50960 100644 --- a/Common.mak +++ b/Common.mak @@ -1038,7 +1038,7 @@ ifeq ($(RENDERTYPE),SDL) # locals; the Emscripten default 64KB stack is too small. Give it a real # stack. C_ParseCommand recurses per CON nesting level; keep it off the # Asyncify stack so its deep recursion is not instrumented. - LINKERFLAGS += -sSTACK_SIZE=16MB -sINITIAL_MEMORY=256MB -sASYNCIFY_REMOVE='C_ParseCommand(bool)' + LINKERFLAGS += -sSTACK_SIZE=16MB -sINITIAL_MEMORY=128MB -sASYNCIFY_REMOVE='C_ParseCommand(bool)' # ASYNCIFY spills the live locals of every function on the C stack at each # emscripten_sleep into a fixed buffer. EDuke32's deep call chains reach the # sleep in handleevents()/videoShowFrame(), so the default buffer overflows diff --git a/source/build/src/baselayer.cpp b/source/build/src/baselayer.cpp index d1fa14e..cbdb6df 100644 --- a/source/build/src/baselayer.cpp +++ b/source/build/src/baselayer.cpp @@ -862,7 +862,10 @@ int32_t baselayer_init(void) void maybe_redirect_outputs(void) { -#if !(defined __APPLE__ && defined __BIG_ENDIAN__) +#if defined(__EMSCRIPTEN__) + // Emscripten's FILE is opaque, and the browser build never redirects stdout. + return; +#elif !(defined __APPLE__ && defined __BIG_ENDIAN__) char *argp; // pipe standard outputs to files