src/core/android/SDL_android.c
changeset 7612 627d571587d3
parent 7575 930f21eaacd7
child 7659 ac4ce59c40e7
equal deleted inserted replaced
7611:ed6f4b8557e4 7612:627d571587d3
    44 #define LOGI(...) do {} while (false)
    44 #define LOGI(...) do {} while (false)
    45 #define LOGE(...) do {} while (false)
    45 #define LOGE(...) do {} while (false)
    46 
    46 
    47 /* Uncomment this to log messages entering and exiting methods in this file */
    47 /* Uncomment this to log messages entering and exiting methods in this file */
    48 //#define DEBUG_JNI
    48 //#define DEBUG_JNI
    49 
       
    50 /* Implemented in audio/android/SDL_androidaudio.c */
       
    51 extern void Android_RunAudioThread();
       
    52 
    49 
    53 static void Android_JNI_ThreadDestroyed(void*);
    50 static void Android_JNI_ThreadDestroyed(void*);
    54 
    51 
    55 /*******************************************************************************
    52 /*******************************************************************************
    56  This file links the Java side of Android with libsdl
    53  This file links the Java side of Android with libsdl
   241          */
   238          */
   242         if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
   239         if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
   243         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
   240         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
   244         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
   241         SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
   245     }
   242     }
   246 }
       
   247 
       
   248 void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
       
   249                                     JNIEnv* env, jclass cls)
       
   250 {
       
   251     /* This is the audio thread, with a different environment */
       
   252     Android_JNI_SetupThread();
       
   253 
       
   254     Android_RunAudioThread();
       
   255 }
   243 }
   256 
   244 
   257 void Java_org_libsdl_app_SDLInputConnection_nativeCommitText(
   245 void Java_org_libsdl_app_SDLInputConnection_nativeCommitText(
   258                                     JNIEnv* env, jclass cls,
   246                                     JNIEnv* env, jclass cls,
   259                                     jstring text, jint newCursorPosition)
   247                                     jstring text, jint newCursorPosition)
  1372 }
  1360 }
  1373 
  1361 
  1374 #endif /* __ANDROID__ */
  1362 #endif /* __ANDROID__ */
  1375 
  1363 
  1376 /* vi: set ts=4 sw=4 expandtab: */
  1364 /* vi: set ts=4 sw=4 expandtab: */
       
  1365