Android: Do not create an input thread for Android

git-svn-id: http://mc-server.googlecode.com/svn/trunk@760 0a769ca7-a7f5-676a-18bf-c427514a06d6
master
faketruth 2012-08-19 16:57:22 +00:00
parent 8560ceeef5
commit 5b36aa1567
1 changed files with 4 additions and 4 deletions

View File

@ -77,9 +77,6 @@ cRoot::~cRoot()
void cRoot::InputThread(void * a_Params)
{
#if defined(ANDROID_NDK)
return;
#else
cRoot & self = *(cRoot*)a_Params;
while (!(self.m_bStop || self.m_bRestart))
@ -88,7 +85,6 @@ void cRoot::InputThread(void * a_Params)
std::getline(std::cin, Command);
self.ServerCommand(Command);
}
#endif
}
@ -159,9 +155,11 @@ void cRoot::Start()
m_Server->StartListenThread();
//cHeartBeat* HeartBeat = new cHeartBeat();
#if !defined(ANDROID_NDK)
LOG("Starting InputThread...");
m_InputThread = new cThread( InputThread, this, "cRoot::InputThread" );
m_InputThread->Start( false ); //we should NOT wait? Otherwise we can´t stop the server from other threads than the input thread
#endif
LOG("Initialization done, server running now.");
while( !m_bStop && !m_bRestart ) // These are modified by external threads
@ -169,7 +167,9 @@ void cRoot::Start()
cSleep::MilliSleep( 1000 );
}
#if !defined(ANDROID_NDK)
delete m_InputThread; m_InputThread = 0;
#endif
// Deallocate stuffs
LOG("Shutting down server...");