Merge remote-tracking branch 'sandstranger/command-line-support-for-Android'
commit
e6e02714a0
@ -0,0 +1,18 @@
|
|||||||
|
#include "android_commandLine.h"
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
|
const char *argvData[15];
|
||||||
|
int argcData;
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_ui_activity_GameActivity_commandLine(JNIEnv *env,
|
||||||
|
jobject obj, jint argc, jobjectArray stringArray) {
|
||||||
|
jboolean iscopy;
|
||||||
|
argcData = (int) argc;
|
||||||
|
argvData[0]="openmw";
|
||||||
|
for (int i = 0; i < argcData; i++) {
|
||||||
|
jstring string = (jstring) (*env).GetObjectArrayElement(stringArray, i);
|
||||||
|
argvData[i+1] = (env)->GetStringUTFChars(string, &iscopy);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||||
|
#include <jni.h>
|
||||||
|
#ifndef _Included_ui_activity_GameActivity_commandLine
|
||||||
|
#define _Included_ui_activity_GameActivity_commandLine
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_ui_activity_GameActivity_commandLine(JNIEnv *env, jobject obj,jint argcData, jobjectArray stringArray);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
Loading…
Reference in New Issue