# HG changeset patch # User Sam Lantinga # Date 1018975523 0 # Node ID 1f148809d972f125c91dc1aaa1cb97e43d6af2b2 # Parent 5868b0f832f2d345307a17e946c656333f53a901 Wilbern Cobb fixed joystick code on FreeBSD diff -r 5868b0f832f2 -r 1f148809d972 src/joystick/bsd/SDL_sysjoystick.c --- a/src/joystick/bsd/SDL_sysjoystick.c Mon Apr 15 07:49:54 2002 +0000 +++ b/src/joystick/bsd/SDL_sysjoystick.c Tue Apr 16 16:45:23 2002 +0000 @@ -41,7 +41,12 @@ #include #include -#include + +#if defined(__FreeBSD__) +# include +#else +# include +#endif #include "SDL_error.h" #include "SDL_joystick.h" @@ -205,7 +210,8 @@ 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 @@ 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;