Add correct timestamps to jinput controller environment for LWJGL input Mouse and Keyboard
This commit is contained in:
parent
6d751849d1
commit
292839a5be
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue