From 4e872f8c2c409d755ecc098cc8c18f3ce5f9e692 Mon Sep 17 00:00:00 2001 From: kappa1 Date: Fri, 13 May 2011 16:24:10 +0000 Subject: [PATCH] AppletLoader: add support for optional mac arch specific natives, al_mac32, al_mac64, al_macppc, if they are not specified AppletLoader will fall back to the usual al_mac parameter. --- src/java/org/lwjgl/util/applet/AppletLoader.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/util/applet/AppletLoader.java b/src/java/org/lwjgl/util/applet/AppletLoader.java index ab12101f..628bb13e 100644 --- a/src/java/org/lwjgl/util/applet/AppletLoader.java +++ b/src/java/org/lwjgl/util/applet/AppletLoader.java @@ -713,7 +713,20 @@ public class AppletLoader extends Applet implements Runnable, AppletStub { } } else if (osName.startsWith("Mac") || osName.startsWith("Darwin")) { - nativeJarList = getParameter("al_mac"); + + // check if arch specific natives have been specified + if (System.getProperty("os.arch").endsWith("64")) { + nativeJarList = getParameter("al_mac64"); + } else if (System.getProperty("os.arch").endsWith("ppc")) { + nativeJarList = getParameter("al_macppc"); + } else { + nativeJarList = getParameter("al_mac32"); + } + + if (nativeJarList == null) { + nativeJarList = getParameter("al_mac"); + } + } else if (osName.startsWith("Solaris") || osName.startsWith("SunOS")) { nativeJarList = getParameter("al_solaris"); } else if (osName.startsWith("FreeBSD")) {