joystick: removed double release event

Signed-off-by: Jordi Íñigo <jig@safelayer.com>
This commit is contained in:
Jordi Íñigo 2018-04-14 12:33:38 +02:00
parent c7ed618295
commit 4ddb2b9089
1 changed files with 2 additions and 1 deletions

View File

@ -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() {