axmol/cocos2dx/platform/android/jni/DPIJni.cpp

19 lines
378 B
C++
Raw Normal View History

#include "DPIJni.h"
#include "jni/JniHelper.h"
USING_NS_CC;
extern "C" {
int getDPIJNI()
{
JniMethodInfo t;
2013-02-17 17:21:11 +08:00
jint ret = -1;
if (JniHelper::getStaticMethodInfo(t, "org/cocos2dx/lib/Cocos2dxHelper", "getDPI", "()I")) {
ret = t.env->CallStaticIntMethod(t.classID, t.methodID);
t.env->DeleteLocalRef(t.classID);
}
return ret;
}
} // extern "C"