Make the rest of LWJGL thread safe. No attempt have been done to make the locking minimal. Instead, one global lock is shared by Display, Mouse, Keyboard and Cursor. The lock surrounds all public methods.

This commit is contained in:
Elias Naur 2007-02-12 12:18:26 +00:00
parent c880c689ff
commit 56178d97fd
8 changed files with 653 additions and 460 deletions

View file

@ -304,8 +304,8 @@ final class WindowsDisplay implements DisplayImplementation {
* is maximized helps some gfx recover from fullscreen
*/
try {
if (Display.getContext() != null && Display.getContext().isCurrent())
Display.getContext().makeCurrent();
if (Display.getDrawable().getContext() != null && Display.getDrawable().getContext().isCurrent())
Display.getDrawable().getContext().makeCurrent();
} catch (LWJGLException e) {
LWJGLUtil.log("Exception occurred while trying to make context current: " + e);
}