Android: export Lock/Unlock activity API
authorSylvain Becker <sylvain.becker@gmail.com>
Mon, 24 Jun 2019 18:08:11 +0200
changeset 1290250d0c0ade376
parent 12901 5cbf6472a916
child 12903 33332d9dc905
Android: export Lock/Unlock activity API
src/core/android/SDL_android.c
src/core/android/SDL_android.h
     1.1 --- a/src/core/android/SDL_android.c	Fri Jun 21 22:01:27 2019 -0700
     1.2 +++ b/src/core/android/SDL_android.c	Mon Jun 24 18:08:11 2019 +0200
     1.3 @@ -711,6 +711,15 @@
     1.4      SDL_SendDropComplete(NULL);
     1.5  }
     1.6  
     1.7 +/* Lock / Unlock Mutex */
     1.8 +void Android_ActivityMutex_Lock() {
     1.9 +    SDL_LockMutex(Android_ActivityMutex);
    1.10 +}
    1.11 +
    1.12 +void Android_ActivityMutex_Unlock() {
    1.13 +    SDL_UnlockMutex(Android_ActivityMutex);
    1.14 +}
    1.15 +
    1.16  /* Set screen resolution */
    1.17  JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)(
    1.18                                      JNIEnv *env, jclass jcls,
     2.1 --- a/src/core/android/SDL_android.h	Fri Jun 21 22:01:27 2019 -0700
     2.2 +++ b/src/core/android/SDL_android.h	Mon Jun 24 18:08:11 2019 +0200
     2.3 @@ -131,6 +131,9 @@
     2.4  SDL_bool SDL_IsChromebook(void);
     2.5  SDL_bool SDL_IsDeXMode(void);
     2.6  
     2.7 +void Android_ActivityMutex_Lock(void);
     2.8 +void Android_ActivityMutex_Unlock(void);
     2.9 +
    2.10  /* Ends C function definitions when using C++ */
    2.11  #ifdef __cplusplus
    2.12  /* *INDENT-OFF* */