[wpdev-commits] wolfpack console_unix.cpp,1.4,1.5
Brought to you by:
rip,
thiagocorrea
|
From: <dar...@us...> - 2003-09-12 21:04:15
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv19159
Modified Files:
console_unix.cpp
Log Message:
Probably fixed a linux bug.
Index: console_unix.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_unix.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** console_unix.cpp 11 Sep 2003 12:22:24 -0000 1.4
--- console_unix.cpp 12 Sep 2003 21:04:12 -0000 1.5
***************
*** 47,54 ****
while( serverState < SHUTDOWN )
{
! char c = cin.get();
if( c > 0 && serverState == RUNNING )
{
! Console::instance()->handleCommand( QChar( c ) );
}
else
--- 47,54 ----
while( serverState < SHUTDOWN )
{
! char c = getch();
if( c > 0 && serverState == RUNNING )
{
! Console::instance()->queueCommand( QChar( c ) );
}
else
***************
*** 77,81 ****
void cConsole::poll()
{
! // Normally we would check if there is a command in the command queue and execute it
}
--- 77,91 ----
void cConsole::poll()
{
! // Poll for new Commands
! commandMutex.lock();
! QStringList commands = commandQueue;
! commandQueue.clear();
! commandMutex.unlock();
!
! while( commands.count() > 0 )
! {
! handleCommand( commands.front() );
! commands.pop_front();
! }
}
|