|
From: <eli...@us...> - 2008-03-02 18:16:42
|
Revision: 2964
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2964&view=rev
Author: elias_naur
Date: 2008-03-02 10:16:39 -0800 (Sun, 02 Mar 2008)
Log Message:
-----------
Added notes to Mouse.poll() and Keyboard.poll() that Display.processMessages() (or Display.update()) must be called to receive new input state
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java
trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2008-02-19 14:06:48 UTC (rev 2963)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2008-03-02 18:16:39 UTC (rev 2964)
@@ -363,6 +363,9 @@
* <code>getEventKeyState</code> - finally use <code>getEventCharacter</code> to get the
* character for that event.
*
+ * NOTE: This method does not query the operating system for new events. To do that,
+ * Display.processMessages() (or Display.update()) must be called first.
+ *
* @see org.lwjgl.input.Keyboard#isKeyDown(int key)
* @see org.lwjgl.input.Keyboard#next()
* @see org.lwjgl.input.Keyboard#getEventKey()
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2008-02-19 14:06:48 UTC (rev 2963)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2008-03-02 18:16:39 UTC (rev 2964)
@@ -303,6 +303,9 @@
* <code>getEventButton</code>. To get the state of that button, for that event, use
* <code>getEventButtonState</code>.
*
+ * NOTE: This method does not query the operating system for new events. To do that,
+ * Display.processMessages() (or Display.update()) must be called first.
+ *
* @see org.lwjgl.input.Mouse#next()
* @see org.lwjgl.input.Mouse#getEventButton()
* @see org.lwjgl.input.Mouse#getEventButtonState()
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-02-19 14:06:48 UTC (rev 2963)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2008-03-02 18:16:39 UTC (rev 2964)
@@ -576,9 +576,9 @@
}
/**
- * Process operating system events. Call this to update the Display's state and make sure the
- * input devices receive events. This method is called from update(), and should normally not be called by
- * the application.
+ * Process operating system events. Call this to update the Display's state and to receive new
+ * input device events. This method is called from update(), so it is not necessary to call
+ * this method if update() is called periodically.
*/
public static void processMessages() {
synchronized (GlobalLock.lock) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|