From df1c875ff41b92de710ca24c19efbcd3bb9193dd Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Thu, 15 Sep 2005 23:15:13 +0000 Subject: [PATCH] Further tweakage --- src/java/org/lwjgl/openal/AL.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/java/org/lwjgl/openal/AL.java b/src/java/org/lwjgl/openal/AL.java index bd0a4e06..ec18551a 100644 --- a/src/java/org/lwjgl/openal/AL.java +++ b/src/java/org/lwjgl/openal/AL.java @@ -127,29 +127,26 @@ public final class AL { AL10.initNativeStubs(); ALC.initNativeStubs(); - device = ALC.alcOpenDevice(deviceArguments); - if (device == null) - throw new LWJGLException("Could not open ALC device"); - AL.deviceArguments = deviceArguments; AL.contextFrequency = contextFrequency; AL.contextRefresh = contextRefresh; AL.contextSynchronized = contextSynchronized ? ALC.ALC_TRUE : ALC.ALC_FALSE; - if (contextFrequency == -1) { + device = ALC.alcOpenDevice(deviceArguments); + if (device == null) + throw new LWJGLException("Could not open ALC device"); + + if (AL.contextFrequency == -1) { context = ALC.alcCreateContext(device.device, null); } else { context = ALC.alcCreateContext(device.device, ALCcontext.createAttributeList(AL.contextFrequency, AL.contextRefresh, AL.contextSynchronized)); } ALC.alcMakeContextCurrent(context.context); - created = true; } catch (LWJGLException e) { destroy(); throw e; } - - create(); } /**