mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 15:04:41 +00:00
Linux: Added workaround to avoid crash on exit with nvidia drivers
This commit is contained in:
parent
7e53e81103
commit
63589487d9
1 changed files with 5 additions and 1 deletions
|
|
@ -320,7 +320,11 @@ public final class GLContext {
|
|||
/** The OpenGL library reference count is decremented, and if it reaches 0, the library is unloaded. */
|
||||
public static synchronized void unloadOpenGLLibrary() {
|
||||
gl_ref_count--;
|
||||
if ( gl_ref_count == 0 )
|
||||
/*
|
||||
* Unload the native OpenGL library unless we're on linux, since
|
||||
* some drivers (NVIDIA proprietary) crash on exit when unloading the library.
|
||||
*/
|
||||
if (gl_ref_count == 0 && LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_LINUX)
|
||||
nUnloadOpenGLLibrary();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue