AlexVinS 11 年之前
父節點
當前提交
5a029c88d1
共有 1 個文件被更改,包括 13 次插入10 次删除
  1. 13 10
      client/CMT.cpp

+ 13 - 10
client/CMT.cpp

@@ -400,15 +400,18 @@ int main(int argc, char** argv)
 
     logGlobal->infoStream()<<"\tInitializing video: "<<pomtime.getDiff();
 
+#if defined(__ANDROID__) || !defined(VCMI_SDL1)
+	//on Android threaded init is broken
+	#define VCMI_NO_THREADED_LOAD
+#endif // defined
 
-//
-//#ifndef __ANDROID__
-//	//we can properly play intro only in the main thread, so we have to move loading to the separate thread
-//	boost::thread loading(init);
-//#else
-	// on Android threaded init is broken
+
+#ifndef VCMI_NO_THREADED_LOAD
+	//we can properly play intro only in the main thread, so we have to move loading to the separate thread
+	boost::thread loading(init);
+#else	 
 	init();
-//#endif
+#endif
 
 	if(!gNoGUI )
 	{
@@ -418,9 +421,9 @@ int main(int argc, char** argv)
 	}
 
 	CSDL_Ext::update(screen);
-//#ifndef __ANDROID__
-//	loading.join();
-//#endif
+#ifndef VCMI_NO_THREADED_LOAD
+	loading.join();
+#endif
     logGlobal->infoStream()<<"Initialization of VCMI (together): "<<total.getDiff();
 
 	if(!vm.count("battle"))