android/testproject/jni/app-android.cpp
changeset 4714 0f05f2f16fad
parent 4713 ba38983b10c2
child 4715 9bb98766eed0
equal deleted inserted replaced
4713:ba38983b10c2 4714:0f05f2f16fad
    81 
    81 
    82 extern "C" void Java_org_libsdl_android_SDLActivity_onNativeKeyDown(JNIEnv*  env, 
    82 extern "C" void Java_org_libsdl_android_SDLActivity_onNativeKeyDown(JNIEnv*  env, 
    83                jobject obj, jint keycode){
    83                jobject obj, jint keycode){
    84     
    84     
    85     int r = Android_OnKeyDown(keycode);
    85     int r = Android_OnKeyDown(keycode);
    86     __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: native key down %d, %d\n", keycode, r);
    86     __android_log_print(ANDROID_LOG_INFO, "SDL", 
       
    87                         "SDL: native key down %d, %d\n", keycode, r);
    87 }
    88 }
    88 
    89 
    89 extern "C" void Java_org_libsdl_android_SDLActivity_onNativeKeyUp(JNIEnv*  env, 
    90 extern "C" void Java_org_libsdl_android_SDLActivity_onNativeKeyUp(JNIEnv*  env, 
    90                jobject obj, jint keycode){
    91                jobject obj, jint keycode){
    91     
    92     
    92     int r = Android_OnKeyUp(keycode);
    93     int r = Android_OnKeyUp(keycode);
    93     __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: native key up %d, %d\n", keycode, r);
    94     __android_log_print(ANDROID_LOG_INFO, "SDL", 
       
    95                         "SDL: native key up %d, %d\n", keycode, r);
       
    96 }
       
    97 
       
    98 extern "C" void Java_org_libsdl_android_SDLActivity_onNativeTouch(JNIEnv*  env, 
       
    99                jobject obj, jint action, jfloat x, jfloat y, jfloat p){
       
   100     __android_log_print(ANDROID_LOG_INFO, "SDL", 
       
   101                         "SDL: native touch event %d @ %f/%f, pressure %f\n", 
       
   102                         action, x, y, p);
    94 }
   103 }
    95 
   104 
    96 
   105 
    97 
   106 
    98 /*******************************************************************************
   107 /*******************************************************************************