Update of /cvsroot/jake2/jake2/patch/net/java/games/joal
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3537/patch/net/java/games/joal
Modified Files:
ALFactory.java
Log Message:
sorry, the init() method throws an exception if the dlopen fails
so now it works :-)
Index: ALFactory.java
===================================================================
RCS file: /cvsroot/jake2/jake2/patch/net/java/games/joal/ALFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ALFactory.java 24 Oct 2004 13:03:29 -0000 1.1
--- ALFactory.java 24 Oct 2004 13:35:40 -0000 1.2
***************
*** 59,70 ****
*/
public static boolean initialize() throws OpenALException {
- String sep = System.getProperty("file.separator");
- String openalPath = System.getProperty("user.home") + sep + ".jake2";
String osProperty = System.getProperty("os.name");
if (osProperty.startsWith("Win")) {
isInitialized = init(new String[] { "OpenAL32.dll" });
} else if (osProperty.startsWith("Linux")) {
! isInitialized = init(new String[] { "libopenal.so" });
! if (!isInitialized) {
isInitialized = init(new String[] { openalPath + sep
+ "libopenal.so" });
--- 59,73 ----
*/
public static boolean initialize() throws OpenALException {
String osProperty = System.getProperty("os.name");
if (osProperty.startsWith("Win")) {
isInitialized = init(new String[] { "OpenAL32.dll" });
} else if (osProperty.startsWith("Linux")) {
! try {
! // use the system wide lib
! isInitialized = init(new String[] { "libopenal.so" });
! } catch (OpenALException e) {
! // fallback to bytonic's libopenal.so
! String sep = System.getProperty("file.separator");
! String openalPath = System.getProperty("user.home") + sep + ".jake2";
isInitialized = init(new String[] { openalPath + sep
+ "libopenal.so" });
|