Further tweakage

This commit is contained in:
Caspian Rychlik-Prince 2005-09-15 23:15:13 +00:00
parent 3399b6409e
commit df1c875ff4
1 changed files with 5 additions and 8 deletions

View File

@ -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();
}
/**