From ce933b4c4162563fe0289c557c2301a3bbd60374 Mon Sep 17 00:00:00 2001 From: kervala <none@none> Date: Wed, 18 Aug 2010 18:14:58 +0200 Subject: [PATCH] Fixed: chatclient sample compilation --- code/nel/samples/net/chat/kbhit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/samples/net/chat/kbhit.cpp b/code/nel/samples/net/chat/kbhit.cpp index 261b203e9..b6fb247a1 100644 --- a/code/nel/samples/net/chat/kbhit.cpp +++ b/code/nel/samples/net/chat/kbhit.cpp @@ -46,7 +46,7 @@ int kbhit() int nread; if (peek_character != -1) return 1; - + new_settings.c_cc[VMIN]=0; tcsetattr(STDIN_FILENO, TCSANOW, &new_settings); nread = read(STDIN_FILENO,&ch,1); @@ -71,8 +71,8 @@ int getch() peek_character = -1; return ch; } - if (read(STDIN_FILENO,&ch,1) != 1) - nlwarning("Can't read keyboard"); + if (read(STDIN_FILENO,&ch,1) != 1) return ' '; + return ch; }