aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jake2/sound/joal/JOALSoundImpl.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/jake2/sound/joal/JOALSoundImpl.java b/src/jake2/sound/joal/JOALSoundImpl.java
index 01bdc3b..c1578cf 100644
--- a/src/jake2/sound/joal/JOALSoundImpl.java
+++ b/src/jake2/sound/joal/JOALSoundImpl.java
@@ -104,13 +104,18 @@ public final class JOALSoundImpl implements Sound {
}
private void initOpenALExtensions() {
- try {
- eax = EAXFactory.getEAX();
- Com.Printf("... using EAX2.0\n");
- } catch (Throwable e) {
- Com.Printf("... EAX2.0 not found\n");
- eax = null;
- }
+ if (al.alIsExtensionPresent("EAX2.0")) {
+ try {
+ eax = EAXFactory.getEAX();
+ Com.Printf("... using EAX2.0\n");
+ } catch (Throwable e) {
+ Com.Printf("... EAX2.0 not initialized\n");
+ eax = null;
+ }
+ } else {
+ Com.Printf("... EAX2.0 not found\n");
+ eax = null;
+ }
}