mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-01 19:14:51 +02:00
remove context from the devices list of context on context destroy
This commit is contained in:
parent
4ec5e9994f
commit
fc845268e6
|
|
@ -359,6 +359,8 @@ public final class ALC10 {
|
|||
synchronized(ALC10.contexts) {
|
||||
nalcDestroyContext(getContext(context));
|
||||
context.setInvalid();
|
||||
ALCdevice device = alcGetContextsDevice(context);
|
||||
device.removeContext(context);
|
||||
}
|
||||
}
|
||||
native static void nalcDestroyContext(long context);
|
||||
|
|
|
|||
|
|
@ -89,6 +89,17 @@ public final class ALCdevice {
|
|||
contexts.put(new Long(context.context), context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove context associated with device
|
||||
*
|
||||
* @param context Context to disassociate with device
|
||||
*/
|
||||
void removeContext(ALCcontext context) {
|
||||
synchronized (contexts) {
|
||||
contexts.remove(new Long(context.context));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks this device and all of its contexts invalid
|
||||
|
|
|
|||
Loading…
Reference in a new issue