mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-19 16:51:53 +00:00
Emscripten: disable TERMIOS support
This commit is contained in:
parent
538f1b6985
commit
cc026cf5d2
1 changed files with 11 additions and 0 deletions
|
@ -103,6 +103,10 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#undef HAVE_TERMIOS // do not read on /dev/tty, JavaScript alert() are blocking
|
||||
#endif
|
||||
|
||||
#if defined(UNIXCOMMON)
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
@ -799,6 +803,11 @@ static inline void I_StartupConsole(void)
|
|||
|
||||
framebuffer = M_CheckParm("-framebuffer");
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
framebuffer = SDL_FALSE;
|
||||
consolevent = SDL_TRUE;
|
||||
#endif
|
||||
|
||||
if (framebuffer)
|
||||
consolevent = SDL_FALSE;
|
||||
}
|
||||
|
@ -972,7 +981,9 @@ void I_OutputMsg(const char *fmt, ...)
|
|||
#endif
|
||||
|
||||
if (!framebuffer)
|
||||
{
|
||||
fprintf(stderr, "%s", txt);
|
||||
}
|
||||
#ifdef HAVE_TERMIOS
|
||||
if (consolevent && txt[len-1] == '\n')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue