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