|
From: <ma...@us...> - 2007-05-19 20:40:06
|
Revision: 2822
http://svn.sourceforge.net/java-game-lib/?rev=2822&view=rev
Author: matzon
Date: 2007-05-19 13:40:04 -0700 (Sat, 19 May 2007)
Log Message:
-----------
moved invalidation into sycnhronized block
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java
trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java 2007-05-19 20:39:50 UTC (rev 2821)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java 2007-05-19 20:40:04 UTC (rev 2822)
@@ -221,8 +221,8 @@
*/
public static boolean alcCloseDevice(ALCdevice device) {
boolean result = nalcCloseDevice(getDevice(device));
- device.setInvalid();
synchronized (devices) {
+ device.setInvalid();
devices.remove(new Long(device.device));
}
return result;
@@ -253,8 +253,8 @@
ALCcontext context = new ALCcontext(context_address);
synchronized (ALC10.contexts) {
contexts.put(new Long(context_address), context);
+ device.addContext(context);
}
- device.addContext(context);
return context;
}
return null;
@@ -356,8 +356,10 @@
* @param context address of context to Destroy
*/
public static void alcDestroyContext(ALCcontext context) {
- nalcDestroyContext(getContext(context));
- context.setInvalid();
+ synchronized(ALC10.contexts) {
+ nalcDestroyContext(getContext(context));
+ context.setInvalid();
+ }
}
native static void nalcDestroyContext(long context);
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java 2007-05-19 20:39:50 UTC (rev 2821)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java 2007-05-19 20:40:04 UTC (rev 2822)
@@ -109,8 +109,8 @@
*/
public static boolean alcCaptureCloseDevice(ALCdevice device) {
boolean result = nalcCaptureCloseDevice(ALC10.getDevice(device));
- device.setInvalid();
synchronized (ALC10.devices) {
+ device.setInvalid();
ALC10.devices.remove(new Long(device.device));
}
return result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|