mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 23:49:12 +00:00
Clear any errors from a previous run
The error is thread-local, and the java thread may run onCreate initialization multiple times depending on the Android life cycle
This commit is contained in:
parent
a197efe3a7
commit
53cda988f4
1 changed files with 3 additions and 0 deletions
|
@ -573,6 +573,9 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cl
|
||||||
{
|
{
|
||||||
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeSetupJNI()");
|
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeSetupJNI()");
|
||||||
|
|
||||||
|
/* Start with a clean slate */
|
||||||
|
SDL_ClearError();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
|
* Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
|
||||||
* Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
|
* Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue