joystick: add missing type conversion
Signed-off-by: morfeo8marc <morfeo8marc@gmail.com>
This commit is contained in:
parent
846e992bf2
commit
0fd6cf480a
|
@ -42,7 +42,7 @@ func run() int {
|
||||||
t.Timestamp, t.Hat, t.Value)
|
t.Timestamp, t.Hat, t.Value)
|
||||||
case *sdl.JoyDeviceEvent:
|
case *sdl.JoyDeviceEvent:
|
||||||
if t.Type == sdl.JOYDEVICEADDED {
|
if t.Type == sdl.JOYDEVICEADDED {
|
||||||
joysticks[int(t.Which)] = sdl.JoystickOpen(t.Which)
|
joysticks[int(t.Which)] = sdl.JoystickOpen(int(t.Which))
|
||||||
if joysticks[int(t.Which)] != nil {
|
if joysticks[int(t.Which)] != nil {
|
||||||
fmt.Printf("Joystick %d connected\n", t.Which)
|
fmt.Printf("Joystick %d connected\n", t.Which)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue