Cleaned up JWS openal loading

This commit is contained in:
Elias Naur 2003-06-16 17:05:48 +00:00
parent 40564b8cee
commit 2107cdc40c
2 changed files with 5 additions and 4 deletions

View File

@ -94,8 +94,8 @@ public abstract class BaseAL {
// try to get path from JWS (if possible) // try to get path from JWS (if possible)
String jwsLibname = String jwsLibname =
(System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1)
? "openal.so" ? "openal"
: "OpenAL32.dll"; : "OpenAL32";
String jwsPath = getPathFromJWS(jwsLibname); String jwsPath = getPathFromJWS(jwsLibname);
if (jwsPath != null) { if (jwsPath != null) {
@ -135,7 +135,6 @@ public abstract class BaseAL {
*/ */
private String getPathFromJWS(String libname) { private String getPathFromJWS(String libname) {
try { try {
libname = libname.substring(0, libname.lastIndexOf("."));
if(Sys.DEBUG) { if(Sys.DEBUG) {
System.out.println("JWS Classloader looking for: " + libname); System.out.println("JWS Classloader looking for: " + libname);
@ -180,4 +179,4 @@ public abstract class BaseAL {
* Native method the destroy the AL * Native method the destroy the AL
*/ */
protected native void nDestroy(); protected native void nDestroy();
} }

View File

@ -32,6 +32,8 @@
package org.lwjgl.opengl; package org.lwjgl.opengl;
import java.nio.ByteBuffer;
/** /**
* $Id$ * $Id$
* *