Android: export Lock/Unlock activity API

This commit is contained in:
Sylvain Becker 2019-06-24 18:08:11 +02:00
parent 7f78d0f0d3
commit ccba8d4691
2 changed files with 12 additions and 0 deletions

View File

@ -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,

View File

@ -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* */