mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
fix starting local server
This commit is contained in:
parent
de05479532
commit
24a5dd797c
@ -195,7 +195,7 @@ void CServerHandler::startLocalServerAndConnect()
|
||||
threadRunLocalServer.reset();
|
||||
CSH->campaignServerRestartLock.setn(false);
|
||||
});
|
||||
// threadRunLocalServer->detach();
|
||||
threadRunLocalServer->detach();
|
||||
logNetwork->info("[ios] detach server thread");
|
||||
#else
|
||||
threadRunLocalServer = std::make_shared<boost::thread>(&CServerHandler::threadRunServer, this); //runs server executable;
|
||||
|
@ -855,6 +855,7 @@ void handleLinuxSignal(int sig)
|
||||
|
||||
static void handleCommandOptions(int argc, char * argv[], boost::program_options::variables_map & options)
|
||||
{
|
||||
#ifndef VCMI_IOS
|
||||
namespace po = boost::program_options;
|
||||
po::options_description opts("Allowed options");
|
||||
opts.add_options()
|
||||
@ -897,6 +898,7 @@ static void handleCommandOptions(int argc, char * argv[], boost::program_options
|
||||
std::cout << VCMIDirs::get().genHelpString();
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef VCMI_IOS
|
||||
@ -921,11 +923,6 @@ int main(int argc, char * argv[])
|
||||
logGlobal->info(SERVER_NAME);
|
||||
|
||||
boost::program_options::variables_map opts;
|
||||
#ifdef VCMI_IOS
|
||||
argc = 1;
|
||||
boost::condition_variable * cond = reinterpret_cast<boost::condition_variable *>(argv[1]);
|
||||
cond->notify_one();
|
||||
#else
|
||||
handleCommandOptions(argc, argv, opts);
|
||||
preinitDLL(console);
|
||||
settings.init();
|
||||
@ -933,7 +930,13 @@ int main(int argc, char * argv[])
|
||||
|
||||
loadDLLClasses();
|
||||
srand((ui32)time(nullptr));
|
||||
|
||||
#ifdef VCMI_IOS
|
||||
argc = 1;
|
||||
boost::condition_variable * cond = reinterpret_cast<boost::condition_variable *>(argv[1]);
|
||||
cond->notify_one();
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
boost::asio::io_service io_service;
|
||||
|
Loading…
Reference in New Issue
Block a user