|
From: Elias N. <eli...@us...> - 2004-11-03 13:49:21
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11455/input Modified Files: Mouse.java Log Message: Don't set native cursor if not supported by the platform Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- Mouse.java 2 Nov 2004 12:48:57 -0000 1.67 +++ Mouse.java 3 Nov 2004 13:49:08 -0000 1.68 @@ -194,7 +194,7 @@ */ public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) - throw new IllegalStateException("Mouse doesn't support native cursors"); + throw new IllegalStateException("Mouse doesn't support native cursors"); Cursor oldCursor = currentCursor; currentCursor = cursor; if (isCreated()) { @@ -275,7 +275,8 @@ buttonCount = Display.getImplementation().getButtonCount(); buttons = BufferUtils.createByteBuffer(buttonCount); coord_buffer = BufferUtils.createIntBuffer(3); - setNativeCursor(currentCursor); + if (currentCursor != null) + setNativeCursor(currentCursor); setGrabbed(isGrabbed); } |