mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 09:39:25 -04:00
Small fix for RubyDung version input
This commit is contained in:
parent
ea355d326a
commit
fdfed20265
@ -1 +1 @@
|
|||||||
20210102
|
20210114
|
||||||
|
|||||||
@ -175,6 +175,7 @@ public class GLFWInputImplementation implements InputImplementation {
|
|||||||
last_event_nanos = nanos;
|
last_event_nanos = nanos;
|
||||||
}
|
}
|
||||||
public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) {
|
public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) {
|
||||||
|
key_down_buffer[keycode] = state;
|
||||||
keyboardEvent.clear();
|
keyboardEvent.clear();
|
||||||
keyboardEvent.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte)1 : (byte)0);
|
keyboardEvent.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte)1 : (byte)0);
|
||||||
keyboardEvent.flip();
|
keyboardEvent.flip();
|
||||||
|
|||||||
@ -403,6 +403,7 @@ public class Mouse {
|
|||||||
public static boolean next() {
|
public static boolean next() {
|
||||||
if (!created) throw new IllegalStateException("Mouse must be created before you can read events");
|
if (!created) throw new IllegalStateException("Mouse must be created before you can read events");
|
||||||
if (readBuffer.hasRemaining()) {
|
if (readBuffer.hasRemaining()) {
|
||||||
|
|
||||||
eventButton = readBuffer.get();
|
eventButton = readBuffer.get();
|
||||||
eventState = readBuffer.get() != 0;
|
eventState = readBuffer.get() != 0;
|
||||||
if (isGrabbed()) {
|
if (isGrabbed()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user