mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
android: rework loadLibrary function to fix bugs and report errors
This commit is contained in:
parent
1e7fe215c4
commit
c3096eee7b
1 changed files with 6 additions and 5 deletions
|
@ -10,19 +10,20 @@ public class Activity extends AllegroActivity {
|
|||
static void loadLibrary(String name) {
|
||||
try {
|
||||
// try loading the debug library first.
|
||||
Log.d("loadLibrary", name + "-debug");
|
||||
System.loadLibrary(name + "-debug");
|
||||
Log.d("loadLibrary", name + "-debug");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
try {
|
||||
// If it fails load the release library.
|
||||
Log.d("loadLibrary", name);
|
||||
System.loadLibrary(name);
|
||||
Log.d("loadLibrary", name);
|
||||
} catch (UnsatisfiedLinkError e2) {
|
||||
// We still continue as failing to load an addon may
|
||||
// not be a fatal error - for example if the TTF was
|
||||
// not built we can still run an example which does not
|
||||
// need that addon.
|
||||
Log.d("loadLibrary", name + " FAILED");
|
||||
Log.d("loadLibrary", name + "-debug FAILED", e);
|
||||
Log.d("loadLibrary", name + " FAILED", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +44,8 @@ public class Activity extends AllegroActivity {
|
|||
loadLibrary("allegro_memfile");
|
||||
loadLibrary("allegro_physfs");
|
||||
loadLibrary("allegro_video");
|
||||
loadLibrary("libsuperderpy");
|
||||
loadLibrary("lib${LIBSUPERDERPY_GAMENAME}");
|
||||
loadLibrary("superderpy");
|
||||
loadLibrary("${LIBSUPERDERPY_GAMENAME}");
|
||||
}
|
||||
|
||||
/* By default, AllegroActivity.onCreate will cause Allegro to load the
|
||||
|
|
Loading…
Reference in a new issue