Skip to content

Commit

Permalink
Fix[LWJGL]: Mouse#getDWheel()
Browse files Browse the repository at this point in the history
ShirosakiMio committed Jan 10, 2025
1 parent a458ade commit 3f5c4b8
Showing 3 changed files with 5 additions and 1 deletion.
Binary file modified FCL/src/main/assets/app_runtime/lwjgl-boat/lwjgl.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion FCL/src/main/assets/app_runtime/lwjgl-boat/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1727138748321
1736478001562
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ public class GLFWInputImplementation implements InputImplementation {
public final byte[] mouseBuffer = new byte[3];
public int mouseX = 0;
public int mouseY = 0;
public int mouseZ = 0;
public int mouseLastX = 0;
public int mouseLastY = 0;
public boolean grab;
@@ -48,10 +49,12 @@ public void destroyMouse() {
public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) {
coord_buffer.put(0, grab ? mouseX - mouseLastX : mouseX);
coord_buffer.put(1, grab ? mouseY - mouseLastY : mouseY);
coord_buffer.put(2, mouseZ);
buttons.rewind();
buttons.put(mouseBuffer);
mouseLastX = mouseX;
mouseLastY = mouseY;
mouseZ = 0;
}

@Override
@@ -170,6 +173,7 @@ public void putMouseEventWithCoords(byte button, byte state, int x, int y, int d
eventQueue.putEvent(eventBuffer);
mouseX = rebaseX;
mouseY = rebaseY;
mouseZ += dz;
}

public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) {

0 comments on commit 3f5c4b8

Please sign in to comment.