Commit 8cab5ae30031e3cbffbce1dd18cac97d259163e1

Philipp Wiesemann 2014-11-25T22:31:14

Fixed limitation for number of custom main() arguments on Android. Limitation was size of the reference table because local refs were not deleted.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/main/android/SDL_android_main.c b/src/main/android/SDL_android_main.c
index 08102f8..3a53d09 100644
--- a/src/main/android/SDL_android_main.c
+++ b/src/main/android/SDL_android_main.c
@@ -47,6 +47,7 @@ int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject 
                 arg = SDL_strdup(utf);
                 (*env)->ReleaseStringUTFChars(env, string, utf);
             }
+            (*env)->DeleteLocalRef(env, string);
         }
         if (!arg) {
             arg = SDL_strdup("");