From: <eli...@us...> - 2006-06-26 14:23:39
|
Revision: 2388 Author: elias_naur Date: 2006-06-26 07:13:57 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2388&view=rev Log Message: ----------- Widened Keyboard.getEventCharacter() return type from char to int to accomodate 32 bit characters. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java Modified: trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2006-06-26 14:05:42 UTC (rev 2387) +++ trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2006-06-26 14:13:57 UTC (rev 2388) @@ -59,7 +59,7 @@ * The special character meaning that no * character was translated for the event. */ - public static final char CHAR_NONE = '\0'; + public static final int CHAR_NONE = '\0'; /** * The special keycode meaning that only the @@ -243,12 +243,12 @@ /** * The key events from the last read: a sequence of pairs of key number, * followed by state. The state is followed by - * a 2 byte java char representing the translated character. + * a 4 byte java int representing the translated character. */ private static IntBuffer readBuffer; /** The current keyboard character being examined */ - private static char eventCharacter; + private static int eventCharacter; /** The current keyboard event key being examined */ private static int eventKey; @@ -425,8 +425,7 @@ if (readBuffer.hasRemaining()) { eventKey = readBuffer.get() & 0xFF; eventState = readBuffer.get() != 0; - int eventCharacterInt = readBuffer.get() & 0xFFFF; - eventCharacter = (char)eventCharacterInt; + eventCharacter = readBuffer.get(); return true; } else { return false; @@ -443,7 +442,7 @@ /** * @return The character from the current event */ - public static char getEventCharacter() { + public static int getEventCharacter() { return eventCharacter; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |