Revision: 3548
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3548&view=rev
Author: matzon
Date: 2011-06-19 20:18:02 +0000 (Sun, 19 Jun 2011)
Log Message:
-----------
Applying 64bit loading patch by Matthias
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-06-15 21:15:58 UTC (rev 3547)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-06-19 20:18:02 UTC (rev 3548)
@@ -78,6 +78,19 @@
}
private static void loadLibrary(final String lib_name) {
+ // actively try to load 64bit libs on 64bit architectures first
+ String osArch = System.getProperty("os.arch");
+ boolean is64bit = "amd64".equals(osArch) || "x86_64".equals(osArch);
+ if(is64bit) {
+ try {
+ doLoadLibrary(lib_name + POSTFIX64BIT);
+ return;
+ } catch (UnsatisfiedLinkError e) {
+ LWJGLUtil.log("Failed to load 64 bit library: " + e.getMessage());
+ }
+ }
+
+ // fallback to loading the "old way"
try {
doLoadLibrary(lib_name);
} catch (UnsatisfiedLinkError e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|