fix: linux findLibrary failed because invalid lib name was passed

This commit is contained in:
Brian Matzon 2003-06-16 16:57:25 +00:00
parent 3f54bac547
commit 40564b8cee
1 changed files with 6 additions and 1 deletions

View File

@ -92,7 +92,12 @@ public abstract class BaseAL {
: "OpenAL32.dll";
// try to get path from JWS (if possible)
String jwsPath = getPathFromJWS(libname);
String jwsLibname =
(System.getProperty("os.name").toLowerCase().indexOf("windows") == -1)
? "openal.so"
: "OpenAL32.dll";
String jwsPath = getPathFromJWS(jwsLibname);
if (jwsPath != null) {
libpath += seperator
+ jwsPath.substring(0, jwsPath.lastIndexOf(File.separator));