mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Fixed bug 4739 - Android: loading native libs, generated by bundletool (Thanks akk0rd87)
This commit is contained in:
parent
39e8b007a7
commit
18bcafffce
@ -629,6 +629,17 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls,
|
||||
|
||||
library_file = (*env)->GetStringUTFChars(env, library, NULL);
|
||||
library_handle = dlopen(library_file, RTLD_GLOBAL);
|
||||
|
||||
if (!library_handle) {
|
||||
/* When deploying android app bundle format uncompressed native libs may not extract from apk to filesystem.
|
||||
In this case we should use lib name without path. https://bugzilla.libsdl.org/show_bug.cgi?id=4739 */
|
||||
const char *library_name = SDL_strrchr(library_file, '/');
|
||||
if (library_name && *library_name) {
|
||||
library_name += 1;
|
||||
library_handle = dlopen(library_name, RTLD_GLOBAL);
|
||||
}
|
||||
}
|
||||
|
||||
if (library_handle) {
|
||||
const char *function_name;
|
||||
SDL_main_func SDL_main;
|
||||
|
Loading…
Reference in New Issue
Block a user