mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Fix Mouse tests
This commit is contained in:
parent
8da3656540
commit
db332762f5
2 changed files with 3 additions and 2 deletions
|
|
@ -279,7 +279,8 @@ public class HWCursorTest {
|
|||
mouse_y = Mouse.getY();
|
||||
|
||||
while(Mouse.next()) {
|
||||
if(Mouse.getEventButtonState() && Mouse.getEventButton() < 3) {
|
||||
int button = Mouse.getEventButton();
|
||||
if(button >= 0 && button < 3 && Mouse.getEventButtonState()) {
|
||||
mouse_btn = Mouse.getEventButton();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public class MouseTest {
|
|||
private void readBufferedMouse() {
|
||||
// iterate all events, use the last button down
|
||||
while(Mouse.next()) {
|
||||
if(Mouse.getEventButtonState()) {
|
||||
if(Mouse.getEventButton() != -1 && Mouse.getEventButtonState()) {
|
||||
lastButton = Mouse.getEventButton();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue