Skip to content

Commit

Permalink
joystick: removed double release event
Browse files Browse the repository at this point in the history
Signed-off-by: Jordi Íñigo <[email protected]>
  • Loading branch information
jig committed Apr 14, 2018
1 parent c7ed618 commit 4ddb2b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platforms/joystick/joystick_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 4ddb2b9

Please sign in to comment.