diff options
author | kbr <[email protected]> | 2006-12-05 21:29:09 +0000 |
---|---|---|
committer | kbr <[email protected]> | 2006-12-05 21:29:09 +0000 |
commit | b3bb889d4c20c82c20c904e07abf386584146884 (patch) | |
tree | 32f346d5b0491441ffa228425a9266df24914f43 | |
parent | 3c5f77f4c527f5b5ccc9e3b256ad2c9eca623114 (diff) |
Fixed JOGL Issue 256: Bad call to JOAL's NativeLibLoader.disableLoading in JOGLAppletLauncher
Moved JOAL's NativeLibLoader to net.java.games.joal.impl package and
made it public to be more easily accessible and to follow patterns in
GlueGen and JOGL. Re-tested JOAL applet test.
git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@374 03bf7f67-59de-4072-a415-9a990d468a3f
-rw-r--r-- | src/java/net/java/games/joal/ALFactory.java | 2 | ||||
-rwxr-xr-x | src/java/net/java/games/joal/NativeLibLoader.java | 83 |
2 files changed, 0 insertions, 85 deletions
diff --git a/src/java/net/java/games/joal/ALFactory.java b/src/java/net/java/games/joal/ALFactory.java index e5288f2..17a8c09 100644 --- a/src/java/net/java/games/joal/ALFactory.java +++ b/src/java/net/java/games/joal/ALFactory.java @@ -35,8 +35,6 @@ package net.java.games.joal; import net.java.games.joal.impl.*; -import com.sun.gluegen.runtime.*; - /** * This class provides factory methods for generating AL and ALC objects. * diff --git a/src/java/net/java/games/joal/NativeLibLoader.java b/src/java/net/java/games/joal/NativeLibLoader.java deleted file mode 100755 index f47c96d..0000000 --- a/src/java/net/java/games/joal/NativeLibLoader.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any kind. ALL - * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, - * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN - * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR - * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR - * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE - * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, - * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF - * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed or intended for use - * in the design, construction, operation or maintenance of any nuclear - * facility. - */ - -package net.java.games.joal; - -import java.security.*; - -import com.sun.gluegen.runtime.*; - -class NativeLibLoader { - private static volatile boolean loadingEnabled = true; - private static volatile boolean didLoading; - - public static void disableLoading() { - loadingEnabled = false; - } - - public static void enableLoading() { - loadingEnabled = true; - } - - public static void load() { - if (!didLoading && loadingEnabled) { - synchronized (NativeLibLoader.class) { - if (!didLoading && loadingEnabled) { - didLoading = true; - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - // Workaround for problem in OpenAL32.dll, which is actually - // the "wrapper" DLL which looks for real OpenAL - // implementations like nvopenal.dll and "*oal.dll". - // joal.dll matches this wildcard and a bug in OpenAL32.dll - // causes a call through a null function pointer. - System.loadLibrary("joal_native"); - - // Workaround for 4845371. - // Make sure the first reference to the JNI GetDirectBufferAddress is done - // from a privileged context so the VM's internal class lookups will succeed. - // FIXME: need to figure out an appropriate entry point to call - // JAWT jawt = new JAWT(); - // JAWTFactory.JAWT_GetAWT(jawt); - - return null; - } - }); - } - } - } - } -} |