Skip to content
Snippets Groups Projects
Commit cc026cf5 authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Emscripten: disable TERMIOS support

parent 538f1b69
Branches
No related tags found
1 merge request!2658WASM port
...@@ -103,6 +103,10 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); ...@@ -103,6 +103,10 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#endif #endif
#endif #endif
#ifdef __EMSCRIPTEN__
#undef HAVE_TERMIOS // do not read on /dev/tty, JavaScript alert() are blocking
#endif
#if defined(UNIXCOMMON) #if defined(UNIXCOMMON)
#include <poll.h> #include <poll.h>
#endif #endif
...@@ -799,6 +803,11 @@ static inline void I_StartupConsole(void) ...@@ -799,6 +803,11 @@ static inline void I_StartupConsole(void)
framebuffer = M_CheckParm("-framebuffer"); framebuffer = M_CheckParm("-framebuffer");
#ifdef __EMSCRIPTEN__
framebuffer = SDL_FALSE;
consolevent = SDL_TRUE;
#endif
if (framebuffer) if (framebuffer)
consolevent = SDL_FALSE; consolevent = SDL_FALSE;
} }
...@@ -972,7 +981,9 @@ void I_OutputMsg(const char *fmt, ...) ...@@ -972,7 +981,9 @@ void I_OutputMsg(const char *fmt, ...)
#endif #endif
if (!framebuffer) if (!framebuffer)
{
fprintf(stderr, "%s", txt); fprintf(stderr, "%s", txt);
}
#ifdef HAVE_TERMIOS #ifdef HAVE_TERMIOS
if (consolevent && txt[len-1] == '\n') if (consolevent && txt[len-1] == '\n')
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment