joystick: removed double release event
Signed-off-by: Jordi Íñigo <jig@safelayer.com>
This commit is contained in:
parent
c7ed618295
commit
4ddb2b9089
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue