project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.cpp
changeset 7167 0b3b306f129a
parent 6597 814683bbd230
child 7185 92a045156255
equal deleted inserted replaced
7165:aad1aea05f1e 7167:0b3b306f129a
   636 extern "C" int Android_JNI_FileClose(SDL_RWops* ctx)
   636 extern "C" int Android_JNI_FileClose(SDL_RWops* ctx)
   637 {
   637 {
   638     return Android_JNI_FileClose(ctx, true);
   638     return Android_JNI_FileClose(ctx, true);
   639 }
   639 }
   640 
   640 
       
   641 /*******************************************************************************
       
   642              Functions called by the hwengine into Java
       
   643 *******************************************************************************/
       
   644 
       
   645 extern "C" float Android_JNI_getDensity(){
       
   646     jmethodID mid;
       
   647     jfloat density;
       
   648     //SDLActivity.getDensity()
       
   649     mid = mEnv->GetStaticMethodID(mActivityClass, "getDensity", "()F");
       
   650         if(!mid) return 1.5f;
       
   651     density = mEnv->CallStaticFloatMethod(mActivityClass, mid);
       
   652     return density;
       
   653 
       
   654 }
       
   655 
   641 #endif /* __ANDROID__ */
   656 #endif /* __ANDROID__ */
   642 
   657 
   643 /* vi: set ts=4 sw=4 expandtab: */
   658 /* vi: set ts=4 sw=4 expandtab: */