mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
apply review comments for CAndroidVMHelper
This commit is contained in:
parent
ee033e9c9c
commit
dcbcff41dc
@ -155,9 +155,10 @@ void CServerHandler::startLocalServerAndConnect()
|
||||
|
||||
th->update();
|
||||
#ifdef VCMI_ANDROID
|
||||
CAndroidVMHelper envHelper;
|
||||
envHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "startServer", true);
|
||||
envHelper.Detach();
|
||||
{
|
||||
CAndroidVMHelper envHelper;
|
||||
envHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "startServer", true);
|
||||
}
|
||||
#else
|
||||
threadRunLocalServer = std::make_shared<boost::thread>(&CServerHandler::threadRunServer, this); //runs server executable;
|
||||
#endif
|
||||
|
@ -43,11 +43,6 @@ CAndroidVMHelper::CAndroidVMHelper()
|
||||
}
|
||||
}
|
||||
CAndroidVMHelper::~CAndroidVMHelper()
|
||||
{
|
||||
Detach();
|
||||
}
|
||||
|
||||
void CAndroidVMHelper::Detach()
|
||||
{
|
||||
if(envPtr && detachInDestructor)
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ public:
|
||||
|
||||
~CAndroidVMHelper();
|
||||
|
||||
void Detach();
|
||||
|
||||
JNIEnv * get();
|
||||
|
||||
jclass findClassloadedClass(const std::string & name);
|
||||
|
@ -179,7 +179,6 @@ void CVCMIServer::run()
|
||||
#else
|
||||
CAndroidVMHelper vmHelper;
|
||||
vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "onServerReady");
|
||||
vmHelper.Detach();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user