From 7c08d3bf094b1c61aba337fd0b5949368f25330c Mon Sep 17 00:00:00 2001
From: Sebastian Waschik <sebastian.waschik@gmx.de>
Date: Wed, 22 Apr 2020 21:15:19 +0200
Subject: [PATCH] Fix compilation for messagebox and events

- 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,
 	}