diff --git a/cocos2dx/platform/android/jni/DPIJni.cpp b/cocos2dx/platform/android/jni/DPIJni.cpp index 7c045255d4..430b17aff9 100644 --- a/cocos2dx/platform/android/jni/DPIJni.cpp +++ b/cocos2dx/platform/android/jni/DPIJni.cpp @@ -8,7 +8,7 @@ extern "C" { int getDPIJNI() { JniMethodInfo t; - jfloat ret = 0.0f; + jint ret = -1; if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/lib/Cocos2dxActivity", "getDPI", "()I")) { ret = t.env->CallStaticIntMethod(t.classID, t.methodID); t.env->DeleteLocalRef(t.classID);