From 860a778f652e5ef924d758cadfb53ba5cea2422c Mon Sep 17 00:00:00 2001 From: molivier Date: Mon, 5 Apr 2004 06:45:47 +0000 Subject: [PATCH] Fixed Win32 dedicated server input git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4082 d7cf8633-e32d-0410-b094-e92efae38249 --- sys_linux.c | 20 ++++++++++---------- todo | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys_linux.c b/sys_linux.c index 9e8b155c..ed68eec9 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -139,7 +139,7 @@ char *Sys_ConsoleInput(void) if (cls.state == ca_dedicated) { static char text[256]; - int len = 0; + static int len = 0; #ifdef WIN32 int c; @@ -147,30 +147,30 @@ char *Sys_ConsoleInput(void) while (_kbhit ()) { c = _getch (); - putch (c); if (c == '\r') { - text[len] = 0; + text[len] = '\0'; putch ('\n'); len = 0; return text; } - if (c == 8) + if (c == '\b') { if (len) { + putch (c); putch (' '); putch (c); len--; - text[len] = 0; } continue; } - text[len] = c; - len++; - text[len] = 0; - if (len == sizeof (text)) - len = 0; + if (len < sizeof (text) - 1) + { + putch (c); + text[len] = c; + len++; + } } #else fd_set fdset; diff --git a/todo b/todo index 79d7e5d6..e24b45e4 100644 --- a/todo +++ b/todo @@ -389,7 +389,7 @@ f darkplaces: pointcontents crash when building harvester in gvb2? (yummyluv) 4 darkplaces: add qw protocol support (making darkplaces work as a qwcl client) (tell Fuh) 4 darkplaces: add traceboxwithcontents function (same as tracebox but adds the startcontents parameter) (LTH, SeienAbunae, http://forums.inside3d.com/showflat.pl?Board=Engine&Number=909 ) 4 darkplaces: add wav music playback (tell Joseph Caporale, tell Static_Fiend) -4 darkplaces: figure out what is wrong with dedicated server console on win32 and fix it (and tell willis@deathmask.net) +-n darkplaces: figure out what is wrong with dedicated server console on win32 and fix it (and tell willis@deathmask.net) 4 darkplaces: ingame mod switching 4 darkplaces: make hqbsp save mip textures to bsp if tga textures are found 4 darkplaces: rewrite sound system! (FrikaC, Static_Fiend, SeienAbunae) -- 2.39.2