diff --git a/platforms/joystick/joystick_driver.go b/platforms/joystick/joystick_driver.go index 6f8fc272..ca045e6f 100644 --- a/platforms/joystick/joystick_driver.go +++ b/platforms/joystick/joystick_driver.go @@ -157,8 +157,9 @@ func (j *Driver) handleEvent(event sdl.Event) error { } if data.State == 1 { j.Publish(j.Event(fmt.Sprintf("%s_press", button)), nil) + } else { + j.Publish(j.Event(fmt.Sprintf("%s_release", button)), nil) } - j.Publish(j.Event(fmt.Sprintf("%s_release", button)), nil) } case *sdl.JoyHatEvent: if data.Which == j.adaptor().joystick.InstanceID() {