From 9295a9bec142a321dc1789ce1f15a1e531265348 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 16 Apr 2002 16:45:23 +0000 Subject: [PATCH] Wilbern Cobb fixed joystick code on FreeBSD --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40359 --- src/joystick/bsd/SDL_sysjoystick.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/joystick/bsd/SDL_sysjoystick.c b/src/joystick/bsd/SDL_sysjoystick.c index 77c8a435b..3f9f77fb3 100644 --- a/src/joystick/bsd/SDL_sysjoystick.c +++ b/src/joystick/bsd/SDL_sysjoystick.c @@ -41,7 +41,12 @@ static char rcsid = #include #include -#include + +#if defined(__FreeBSD__) +# include +#else +# include +#endif #include "SDL_error.h" #include "SDL_joystick.h" @@ -205,7 +210,8 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy) joy->nballs = 0; while (hid_get_item(hdata, &hitem) > 0) { - char *s, *sp; + char *sp; + const char *s; switch (hitem.kind) { case hid_collection: @@ -271,7 +277,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy) static struct hid_item hitem; static struct hid_data *hdata; static struct report *rep; - int nbutton, naxe; + int nbutton, naxe = -1; Sint32 v; rep = &joy->hwdata->inreport;