mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Somehow it works but JNI signatures were incorrect
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "../lib/mapping/CMap.h"
|
||||
#include "../lib/rmg/CMapGenOptions.h"
|
||||
#ifdef VCMI_ANDROID
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
#include "lib/CAndroidVMHelper.h"
|
||||
#elif !defined(VCMI_IOS)
|
||||
#include "../lib/Interprocess.h"
|
||||
@@ -1118,12 +1120,21 @@ int main(int argc, char * argv[])
|
||||
}
|
||||
|
||||
#ifdef VCMI_ANDROID
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_createServer(JNIEnv * env, jclass cls)
|
||||
{
|
||||
__android_log_write(ANDROID_LOG_INFO, "VCMI", "Got jni call to init server");
|
||||
CAndroidVMHelper::cacheVM(env);
|
||||
CVCMIServer::create();
|
||||
}
|
||||
|
||||
void CVCMIServer::create()
|
||||
{
|
||||
const char * foo = "android-server";
|
||||
std::vector<const void *> argv = {foo};
|
||||
main(argv.size(), reinterpret_cast<char **>(const_cast<void **>(&*argv.begin())));
|
||||
}
|
||||
|
||||
#elif defined(SINGLE_PROCESS_APP)
|
||||
void CVCMIServer::create(boost::condition_variable * cond, const std::vector<std::string> & args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user