Revert "Magic number removed."

This reverts commit 7e3a88ef63.
This commit is contained in:
zergon321 2020-04-20 21:43:49 +03:00
parent 7e3a88ef63
commit 09ea5585a0
1 changed files with 1 additions and 1 deletions

View File

@ -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)] == glfw.Press
return js.buttons[joystick][byte(button)] == 1
}
// Returns the value of a joystick axis, returning 0 if the button or joystick is invalid.