Add correct timestamps to jinput controller environment for LWJGL input Mouse and Keyboard

This commit is contained in:
Elias Naur 2006-07-10 00:47:32 +00:00
parent 6d751849d1
commit 292839a5be
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ final class LWJGLKeyboard extends Keyboard {
if (key == null)
return false;
float value = org.lwjgl.input.Keyboard.getEventKeyState() ? 1 : 0;
event.set(key, value, System.currentTimeMillis()*1000000);
event.set(key, value, org.lwjgl.input.Keyboard.getEventNanoseconds());
return true;
}

View File

@ -89,8 +89,8 @@ final class LWJGLMouse extends Mouse {
protected final synchronized boolean getNextDeviceEvent(Event event) throws IOException {
if (!org.lwjgl.input.Mouse.isCreated())
return false;
long nanos = System.currentTimeMillis()*1000000;
while (true) {
long nanos = org.lwjgl.input.Mouse.getEventNanoseconds();
switch (event_state) {
case EVENT_X:
event_state = EVENT_Y;