From 2923c8014a45e8f9542aa22a6e670071e8294196 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 May 2013 17:06:08 +0000 Subject: [PATCH] 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. " --- examples/osgAndroidExampleGLES1/jni/osgNativeLib.cpp | 6 +++--- examples/osgAndroidExampleGLES2/jni/osgNativeLib.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/osgAndroidExampleGLES1/jni/osgNativeLib.cpp b/examples/osgAndroidExampleGLES1/jni/osgNativeLib.cpp index 4c8efc3f2..8dd6b63cc 100644 --- a/examples/osgAndroidExampleGLES1/jni/osgNativeLib.cpp +++ b/examples/osgAndroidExampleGLES1/jni/osgNativeLib.cpp @@ -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)); diff --git a/examples/osgAndroidExampleGLES2/jni/osgNativeLib.cpp b/examples/osgAndroidExampleGLES2/jni/osgNativeLib.cpp index 4c8efc3f2..8dd6b63cc 100644 --- a/examples/osgAndroidExampleGLES2/jni/osgNativeLib.cpp +++ b/examples/osgAndroidExampleGLES2/jni/osgNativeLib.cpp @@ -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));