get nq-server working properly

This commit is contained in:
Bill Currie 2003-04-16 05:06:19 +00:00
parent f55bac4c06
commit 589c3e4e49
4 changed files with 5 additions and 5 deletions

View File

@ -448,6 +448,7 @@ C_ProcessInput (void)
#endif
while (1) {
const char *cmd = Sys_ConsoleInput ();
printf ("%s\n", cmd);
if (!cmd)
break;
Cbuf_AddText (con_data.cbuf, cmd);

View File

@ -516,7 +516,7 @@ Sys_CheckInput (int idle, int net_socket)
}
_timeout.tv_sec = 0;
_timeout.tv_usec = 100;
_timeout.tv_usec = net_socket < 0 ? 0 : 100;
timeout = &_timeout;
if (_kbhit ()) {
stdin_ready = 1;
@ -524,7 +524,7 @@ Sys_CheckInput (int idle, int net_socket)
}
#else
_timeout.tv_sec = 0;
_timeout.tv_usec = 10000;
_timeout.tv_usec = net_socket < 0 ? 0 : 10000;
#endif
// select on the net socket and stdin
// the only reason we have a timeout at all is so that if the last

View File

@ -604,7 +604,7 @@ _Host_Frame (float time)
// check for commands typed to the host
Host_GetConsoleCommands ();
GIB_Thread_Execute ();
// process console commands

View File

@ -108,8 +108,7 @@ main (int argc, const char **argv)
oldtime = Sys_DoubleTime () - 0.1;
while (1) { // Main message loop
if (!Sys_CheckInput (0, -1))
continue;
Sys_CheckInput (0, -1);
// find time spent rendering last frame
newtime = Sys_DoubleTime ();