X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_joystick.c;h=76f854252de32e01321d22d58c0282327fc60742;hb=57b0e0aeb1ffe8075226749cdd484d250966d0cf;hp=dc5e973dc53f82ae82e19b71e653f9621b9cad55;hpb=01660d2c066d083d088dfe6117a7688ee4521527;p=freeglut diff --git a/src/Common/freeglut_joystick.c b/src/Common/freeglut_joystick.c index dc5e973..76f8542 100644 --- a/src/Common/freeglut_joystick.c +++ b/src/Common/freeglut_joystick.c @@ -37,82 +37,6 @@ # include #endif -/* - * Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c" - * interspersed - */ - -#if TARGET_HOST_MACINTOSH -# include -#endif - -#if TARGET_HOST_MAC_OSX -# include -# include -# include -#endif - -#if TARGET_HOST_POSIX_X11 -# ifdef HAVE_SYS_IOCTL_H -# include -# endif -# ifdef HAVE_FCNTL_H -# include -# endif -# ifdef HAVE_ERRNO_H -# include -# include -# endif -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) -/* XXX The below hack is done until freeglut's autoconf is updated. */ -# define HAVE_USB_JS 1 - -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# include -# else -/* - * XXX NetBSD/amd64 systems may find that they have to steal the - * XXX /usr/include/machine/joystick.h from a NetBSD/i386 system. - * XXX I cannot comment whether that works for the interface, but - * XXX it lets you compile...(^& I do not think that we can do away - * XXX with this header. - */ -# include /* For analog joysticks */ -# endif -# define JS_DATA_TYPE joystick -# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) -# endif - -# if defined(__linux__) -# include - -/* check the joystick driver version */ -# if defined(JS_VERSION) && JS_VERSION >= 0x010000 -# define JS_NEW -# endif -# else /* Not BSD or Linux */ -# ifndef JS_RETURN - - /* - * We'll put these values in and that should - * allow the code to at least compile when there is - * no support. The JS open routine should error out - * and shut off all the code downstream anyway and if - * the application doesn't use a joystick we'll be fine. - */ - - struct JS_DATA_TYPE - { - int buttons; - int x; - int y; - }; - -# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) -# endif -# endif -#endif - #define JS_TRUE 1 #define JS_FALSE 0