Added notes to Mouse.poll() and Keyboard.poll() that Display.processMessages() (or Display.update()) must be called to receive new input state

This commit is contained in:
Elias Naur 2008-03-02 18:16:39 +00:00
parent f2b73f57de
commit 65309d759c
3 changed files with 9 additions and 3 deletions

View File

@ -363,6 +363,9 @@ public class Keyboard {
* <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()

View File

@ -303,6 +303,9 @@ public class Mouse {
* <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()

View File

@ -576,9 +576,9 @@ public final class Display {
}
/**
* 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) {