AssetManager: use libandroidfw instead of ARSClib for resources.arsc parsing

This reduces startup time and RAM usage. Not yet feature complete with
the ARSClib based implementation, but Gravity Defied runs already
This commit is contained in:
Julian Winkler
2024-01-26 12:42:06 +01:00
parent 6136243fec
commit 3284518418
5 changed files with 197 additions and 90 deletions

View File

@@ -314,8 +314,6 @@ static void open(GtkApplication *app, GFile** files, gint nfiles, const gchar* h
_SET_STATIC_INT_FIELD(display_class, "window_width", d->window_width);
_SET_STATIC_INT_FIELD(display_class, "window_height", d->window_height);
set_up_handle_cache(env);
/* -- register our JNI library under the appropriate classloader -- */
/* 'android/view/View' is part of the "hax.dex" package, any other function from that package would serve just as well */
@@ -331,6 +329,8 @@ static void open(GtkApplication *app, GFile** files, gint nfiles, const gchar* h
jmethodID loadLibrary_with_classloader = _METHOD(java_runtime_class, "loadLibrary", "(Ljava/lang/String;Ljava/lang/ClassLoader;)V");
(*env)->CallVoidMethod(env, java_runtime, loadLibrary_with_classloader, _JSTRING("translation_layer_main"), class_loader);
set_up_handle_cache(env);
/* -- misc -- */
// some apps need the apk path since they directly read their apk