You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/android_commandLine.cpp

21 lines
517 B
C++

#include "android_commandLine.h"
#include "string.h"
const char **argvData;
int argcData;
JNIEXPORT void JNICALL Java_ui_activity_GameActivity_commandLine(JNIEnv *env,
jobject obj, jint argc, jobjectArray stringArray) {
jboolean iscopy;
argcData = (int) argc;
argvData= new const char * [argcData+1];
argvData[0] = "openmw";
for (int i = 1; i < argcData+1; i++) {
jstring string = (jstring) (*env).GetObjectArrayElement(stringArray, i-1);
argvData[i] = (env)->GetStringUTFChars(string, &iscopy);
}
}