Small fix for RubyDung version input

This commit is contained in:
artdeell 2021-01-14 23:11:54 +03:00
parent ea355d326a
commit fdfed20265
3 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
20210102
20210114

View File

@ -175,6 +175,7 @@ public class GLFWInputImplementation implements InputImplementation {
last_event_nanos = nanos;
}
public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) {
key_down_buffer[keycode] = state;
keyboardEvent.clear();
keyboardEvent.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte)1 : (byte)0);
keyboardEvent.flip();

View File

@ -403,6 +403,7 @@ public class Mouse {
public static boolean next() {
if (!created) throw new IllegalStateException("Mouse must be created before you can read events");
if (readBuffer.hasRemaining()) {
eventButton = readBuffer.get();
eventState = readBuffer.get() != 0;
if (isGrabbed()) {