From bd8cc29f4e545d232c9fc880f4dac8ff81dd63b4 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 15 Dec 2011 15:51:28 +0000 Subject: [PATCH] sys_sdl_unix.c, sys_sdl_win.c (Sys_ConsoleInput): Moved isDedicated check to... host.c (Host_GetConsoleCommands): ... here, where it should be. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@520 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/host.c | 3 +++ quakespasm/Quake/sys_sdl_unix.c | 3 --- quakespasm/Quake/sys_sdl_win.c | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/quakespasm/Quake/host.c b/quakespasm/Quake/host.c index 7fff5435..01820629 100644 --- a/quakespasm/Quake/host.c +++ b/quakespasm/Quake/host.c @@ -600,6 +600,9 @@ void Host_GetConsoleCommands (void) { const char *cmd; + if (!isDedicated) + return; // no stdin necessary in graphical mode + while (1) { cmd = Sys_ConsoleInput (); diff --git a/quakespasm/Quake/sys_sdl_unix.c b/quakespasm/Quake/sys_sdl_unix.c index 502c87ee..75cb9a80 100644 --- a/quakespasm/Quake/sys_sdl_unix.c +++ b/quakespasm/Quake/sys_sdl_unix.c @@ -210,9 +210,6 @@ const char *Sys_ConsoleInput (void) fd_set set; struct timeval timeout; - if (!isDedicated) - return NULL; // no stdin necessary in graphical mode - FD_ZERO (&set); FD_SET (0, &set); // stdin timeout.tv_sec = 0; diff --git a/quakespasm/Quake/sys_sdl_win.c b/quakespasm/Quake/sys_sdl_win.c index 1c891db7..5ba2ae51 100644 --- a/quakespasm/Quake/sys_sdl_win.c +++ b/quakespasm/Quake/sys_sdl_win.c @@ -285,9 +285,6 @@ const char *Sys_ConsoleInput (void) int ch; DWORD dummy, numread, numevents; - if (!isDedicated) - return NULL; - for ( ;; ) { if (GetNumberOfConsoleInputEvents(hinput, &numevents) == 0)