projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update changelog for Debian build
[fw/altos]
/
altosuilib
/
AltosUILib.java
diff --git
a/altosuilib/AltosUILib.java
b/altosuilib/AltosUILib.java
index 307ef19dc048413886d6e5e5cb47d8f65d9b9068..76782e2e565743072940d96f63c6f90cbfe9793e 100644
(file)
--- a/
altosuilib/AltosUILib.java
+++ b/
altosuilib/AltosUILib.java
@@
-81,18
+81,18
@@
public class AltosUILib extends AltosLib {
static public boolean initialized = false;
static public boolean loaded_library = false;
static public boolean initialized = false;
static public boolean loaded_library = false;
+ static final String[] library_names = { "altos", "altos32", "altos64" };
+
public static boolean load_library() {
if (!initialized) {
public static boolean load_library() {
if (!initialized) {
- try {
- System.loadLibrary("altos");
- libaltos.altos_init();
- loaded_library = true;
- } catch (UnsatisfiedLinkError e) {
+ for (String name : library_names) {
try {
try {
- System.loadLibrary(
"altos64"
);
+ System.loadLibrary(
name
);
libaltos.altos_init();
loaded_library = true;
libaltos.altos_init();
loaded_library = true;
- } catch (UnsatisfiedLinkError e2) {
+ break;
+ } catch (UnsatisfiedLinkError e) {
+ System.out.printf("Link error %s\n", e.getMessage());
loaded_library = false;
}
}
loaded_library = false;
}
}