Fix compilation for messagebox and events (#9)
- remove length for message box buttons - cast joystick id to int
This commit is contained in:
parent
03cd1562fd
commit
cebe7cd7f1
|
@ -62,7 +62,7 @@ func run() int {
|
|||
fmt.Printf("[%d ms] JoyHat\ttype:%d\twhich:%d\that:%d\tvalue:%d\n",
|
||||
t.Timestamp, t.Type, t.Which, t.Hat, t.Value)
|
||||
case *sdl.JoyDeviceAddedEvent:
|
||||
joysticks[int(t.Which)] = sdl.JoystickOpen(t.Which)
|
||||
joysticks[int(t.Which)] = sdl.JoystickOpen(int(t.Which))
|
||||
if joysticks[int(t.Which)] != nil {
|
||||
fmt.Printf("Joystick %d connected\n", t.Which)
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ func main() {
|
|||
nil,
|
||||
"example message box",
|
||||
"select a button",
|
||||
int32(len(buttons)),
|
||||
buttons,
|
||||
&colorScheme,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue