mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
get nq-server working properly
This commit is contained in:
parent
f55bac4c06
commit
589c3e4e49
4 changed files with 5 additions and 5 deletions
|
@ -448,6 +448,7 @@ C_ProcessInput (void)
|
||||||
#endif
|
#endif
|
||||||
while (1) {
|
while (1) {
|
||||||
const char *cmd = Sys_ConsoleInput ();
|
const char *cmd = Sys_ConsoleInput ();
|
||||||
|
printf ("%s\n", cmd);
|
||||||
if (!cmd)
|
if (!cmd)
|
||||||
break;
|
break;
|
||||||
Cbuf_AddText (con_data.cbuf, cmd);
|
Cbuf_AddText (con_data.cbuf, cmd);
|
||||||
|
|
|
@ -516,7 +516,7 @@ Sys_CheckInput (int idle, int net_socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
_timeout.tv_sec = 0;
|
_timeout.tv_sec = 0;
|
||||||
_timeout.tv_usec = 100;
|
_timeout.tv_usec = net_socket < 0 ? 0 : 100;
|
||||||
timeout = &_timeout;
|
timeout = &_timeout;
|
||||||
if (_kbhit ()) {
|
if (_kbhit ()) {
|
||||||
stdin_ready = 1;
|
stdin_ready = 1;
|
||||||
|
@ -524,7 +524,7 @@ Sys_CheckInput (int idle, int net_socket)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
_timeout.tv_sec = 0;
|
_timeout.tv_sec = 0;
|
||||||
_timeout.tv_usec = 10000;
|
_timeout.tv_usec = net_socket < 0 ? 0 : 10000;
|
||||||
#endif
|
#endif
|
||||||
// select on the net socket and stdin
|
// select on the net socket and stdin
|
||||||
// the only reason we have a timeout at all is so that if the last
|
// the only reason we have a timeout at all is so that if the last
|
||||||
|
|
|
@ -108,8 +108,7 @@ main (int argc, const char **argv)
|
||||||
|
|
||||||
oldtime = Sys_DoubleTime () - 0.1;
|
oldtime = Sys_DoubleTime () - 0.1;
|
||||||
while (1) { // Main message loop
|
while (1) { // Main message loop
|
||||||
if (!Sys_CheckInput (0, -1))
|
Sys_CheckInput (0, -1);
|
||||||
continue;
|
|
||||||
|
|
||||||
// find time spent rendering last frame
|
// find time spent rendering last frame
|
||||||
newtime = Sys_DoubleTime ();
|
newtime = Sys_DoubleTime ();
|
||||||
|
|
Loading…
Reference in a new issue