From Jordi Torres, "We must use JNI_FALSE instead of false in JNI code. Otherwise the examples will not compile. This patch should be applied to osgAndroidExampleGLES1/jni and osgAndroidExampleGLES2/jni. the osgNativeLib.cpp is the same. "

This commit is contained in:
Robert Osfield 2013-05-24 17:06:08 +00:00
parent 88bbcaecd2
commit 2923c8014a
2 changed files with 6 additions and 6 deletions

View File

@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_setClearColor(JNIEnv
}
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
//Import Strings from JNI
const char *nativeAddress = env->GetStringUTFChars(address, false);
const char *nativeAddress = env->GetStringUTFChars(address, JNI_FALSE);
mainApp.loadObject(std::string(nativeAddress));
@ -84,8 +84,8 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv *
}
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
//Import Strings from JNI
const char *nativeAddress = env->GetStringUTFChars(address, false);
const char *nativeName = env->GetStringUTFChars(name, false);
const char *nativeAddress = env->GetStringUTFChars(address,JNI_FALSE);
const char *nativeName = env->GetStringUTFChars(name, JNI_FALSE);
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));

View File

@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_setClearColor(JNIEnv
}
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
//Import Strings from JNI
const char *nativeAddress = env->GetStringUTFChars(address, false);
const char *nativeAddress = env->GetStringUTFChars(address, JNI_FALSE);
mainApp.loadObject(std::string(nativeAddress));
@ -84,8 +84,8 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv *
}
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
//Import Strings from JNI
const char *nativeAddress = env->GetStringUTFChars(address, false);
const char *nativeName = env->GetStringUTFChars(name, false);
const char *nativeAddress = env->GetStringUTFChars(address,JNI_FALSE);
const char *nativeName = env->GetStringUTFChars(name, JNI_FALSE);
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));