mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
commit
8798e6e52b
3
.gitignore
vendored
3
.gitignore
vendored
@ -51,4 +51,5 @@ VCMI_VS11.opensdf
|
||||
/test/RD
|
||||
/VCMI_VS11.VC.opendb
|
||||
/AI/FuzzyLite.lib
|
||||
/deps
|
||||
/deps
|
||||
.vs/
|
||||
|
@ -32,6 +32,8 @@ matrix:
|
||||
env: VCMI_PLATFORM='mac'
|
||||
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
coverity_scan:
|
||||
project:
|
||||
name: vcmi/vcmi
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#ifndef VCMI_ANDROID
|
||||
#include "../lib/Interprocess.h"
|
||||
#else
|
||||
#include "../lib/CAndroidVMHelper.h"
|
||||
#endif
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
@ -44,6 +46,10 @@
|
||||
|
||||
template<typename T> class CApplyOnLobby;
|
||||
|
||||
#ifdef VCMI_ANDROID
|
||||
extern std::atomic_bool androidTestServerReadyFlag;
|
||||
#endif
|
||||
|
||||
class CBaseForLobbyApply
|
||||
{
|
||||
public:
|
||||
@ -149,8 +155,10 @@ void CServerHandler::startLocalServerAndConnect()
|
||||
|
||||
th->update();
|
||||
#ifdef VCMI_ANDROID
|
||||
CAndroidVMHelper envHelper;
|
||||
envHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "startServer", true);
|
||||
{
|
||||
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
|
||||
|
@ -633,12 +633,12 @@ void CTextInput::notifyAndroidTextInputChanged(std::string & text)
|
||||
auto fun = [&text](JNIEnv * env, jclass cls, jmethodID method)
|
||||
{
|
||||
auto jtext = env->NewStringUTF(text.c_str());
|
||||
env->CallStaticObjectMethod(cls, method, jtext);
|
||||
env->CallStaticVoidMethod(cls, method, jtext);
|
||||
env->DeleteLocalRef(jtext);
|
||||
};
|
||||
CAndroidVMHelper vmHelper;
|
||||
vmHelper.callCustomMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "notifyTextInputChanged",
|
||||
"(Ljava/lang/String;)V", fun);
|
||||
"(Ljava/lang/String;)V", fun, true);
|
||||
}
|
||||
#endif //VCMI_ANDROID
|
||||
|
||||
|
@ -42,7 +42,6 @@ CAndroidVMHelper::CAndroidVMHelper()
|
||||
detachInDestructor = false;
|
||||
}
|
||||
}
|
||||
|
||||
CAndroidVMHelper::~CAndroidVMHelper()
|
||||
{
|
||||
if(envPtr && detachInDestructor)
|
||||
|
@ -168,10 +168,10 @@ set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
|
||||
)
|
||||
|
||||
set(lib_HEADERS
|
||||
${CMAKE_HOME_DIRECTORY}/include/vstd/CLoggerBase.h
|
||||
${CMAKE_HOME_DIRECTORY}/include/vstd/ContainerUtils.h
|
||||
${CMAKE_HOME_DIRECTORY}/include/vstd/RNG.h
|
||||
${CMAKE_HOME_DIRECTORY}/include/vstd/StringUtils.h
|
||||
../include/vstd/CLoggerBase.h
|
||||
../include/vstd/ContainerUtils.h
|
||||
../include/vstd/RNG.h
|
||||
../include/vstd/StringUtils.h
|
||||
StdInc.h
|
||||
../Global.h
|
||||
|
||||
|
@ -170,10 +170,16 @@ void CVCMIServer::run()
|
||||
#endif
|
||||
|
||||
startAsyncAccept();
|
||||
|
||||
#ifndef VCMI_ANDROID
|
||||
if(shm)
|
||||
{
|
||||
shm->sr->setToReadyAndNotify(port);
|
||||
}
|
||||
#else
|
||||
CAndroidVMHelper vmHelper;
|
||||
vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "onServerReady");
|
||||
#endif
|
||||
}
|
||||
|
||||
while(state == EServerState::LOBBY || state == EServerState::GAMEPLAY_STARTING)
|
||||
|
Loading…
Reference in New Issue
Block a user