Commit ccba8d469174b3cb0afb4eb5431ebe824ed83c53

Sylvain Becker 2019-06-24T18:08:11

Android: export Lock/Unlock activity API

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index a4a2e1c..b0a2be3 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -711,6 +711,15 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)(
     SDL_SendDropComplete(NULL);
 }
 
+/* Lock / Unlock Mutex */
+void Android_ActivityMutex_Lock() {
+    SDL_LockMutex(Android_ActivityMutex);
+}
+
+void Android_ActivityMutex_Unlock() {
+    SDL_UnlockMutex(Android_ActivityMutex);
+}
+
 /* Set screen resolution */
 JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)(
                                     JNIEnv *env, jclass jcls,
diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index 837c3a4..b345b05 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -131,6 +131,9 @@ SDL_bool SDL_IsAndroidTV(void);
 SDL_bool SDL_IsChromebook(void);
 SDL_bool SDL_IsDeXMode(void);
 
+void Android_ActivityMutex_Lock(void);
+void Android_ActivityMutex_Unlock(void);
+
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 /* *INDENT-OFF* */