From 7e3a88ef6388ff578d718e8dc64705c7a70eb24d Mon Sep 17 00:00:00 2001 From: nightghost Date: Sun, 5 Jan 2020 21:47:11 +0300 Subject: [PATCH] Magic number removed. --- pixelgl/joystick.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixelgl/joystick.go b/pixelgl/joystick.go index 0c4c5c4..25fd374 100644 --- a/pixelgl/joystick.go +++ b/pixelgl/joystick.go @@ -180,7 +180,7 @@ func (js *joystickState) getButton(joystick Joystick, button int) bool { if js.buttons[joystick] == nil || button >= len(js.buttons[joystick]) || button < 0 { return false } - return js.buttons[joystick][byte(button)] == 1 + return js.buttons[joystick][byte(button)] == glfw.Press } // Returns the value of a joystick axis, returning 0 if the button or joystick is invalid.