From cebe7cd7f12bbcbac68e523825e4852d6530ea0a Mon Sep 17 00:00:00 2001 From: waschik <64102418+waschik@users.noreply.github.com> Date: Thu, 23 Apr 2020 20:20:25 +0200 Subject: [PATCH] Fix compilation for messagebox and events (#9) - remove length for message box buttons - cast joystick id to int --- examples/events/events.go | 2 +- examples/messagebox/messagebox.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/events/events.go b/examples/events/events.go index afc0e85..bb6f74c 100644 --- a/examples/events/events.go +++ b/examples/events/events.go @@ -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) } diff --git a/examples/messagebox/messagebox.go b/examples/messagebox/messagebox.go index d1011ff..4fd3d4b 100644 --- a/examples/messagebox/messagebox.go +++ b/examples/messagebox/messagebox.go @@ -28,7 +28,6 @@ func main() { nil, "example message box", "select a button", - int32(len(buttons)), buttons, &colorScheme, }