summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 18:57:22 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 18:57:22 +0200
commit5b36aa1567f1af9f9ddebd924d4d870fc5075b6a (patch)
tree810be055e0b6d5066004e229527c8bebe05c6eb4
parentAndroid: Welcome back gen folder :P (diff)
downloadcuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar.gz
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar.bz2
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar.lz
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar.xz
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.tar.zst
cuberite-5b36aa1567f1af9f9ddebd924d4d870fc5075b6a.zip
-rw-r--r--source/cRoot.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp
index 643b4105b..0d6ff8369 100644
--- a/source/cRoot.cpp
+++ b/source/cRoot.cpp
@@ -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...");