X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_joystick.c;h=b24476aa35fed26785fc660259727bab528b1ee7;hb=bc3bd114b6cd0399c22bff5bd99de60747b1070d;hp=e548c04ba0fb13eb96dfd5668b69383c45216fb8;hpb=369e02f3912ca0f768d98e49fb1198e80f44e078;p=freeglut diff --git a/src/fg_joystick.c b/src/fg_joystick.c index e548c04..b24476a 100644 --- a/src/fg_joystick.c +++ b/src/fg_joystick.c @@ -40,65 +40,6 @@ #define JS_TRUE 1 #define JS_FALSE 0 -/* BSD defines from "jsBSD.cxx" around lines 42-270 */ - -#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - -# ifdef HAVE_USB_JS -# if defined(__NetBSD__) -# ifdef HAVE_USBHID_H -# include -# else -# include -# endif -# include -# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# ifdef HAVE_USBHID_H -# include -# else -# include -# endif -# include -# endif -# include - -/* Compatibility with older usb.h revisions */ -# if !defined(USB_MAX_DEVNAMES) && defined(MAXDEVNAMES) -# define USB_MAX_DEVNAMES MAXDEVNAMES -# endif -# endif - -struct os_specific_s { - char fname [128 ]; - int fd; - int is_analog; - /* The following structure members are specific to analog joysticks */ - struct joystick ajs; -# ifdef HAVE_USB_JS - /* The following structure members are specific to USB joysticks */ - struct hid_item *hids; - int hid_dlen; - int hid_offset; - char *hid_data_buf; - int axes_usage [ _JS_MAX_AXES ]; -# endif - /* We keep button and axes state ourselves, as they might not be updated - * on every read of a USB device - */ - int cache_buttons; - float cache_axes [ _JS_MAX_AXES ]; -}; - -/* Idents lower than USB_IDENT_OFFSET are for analog joysticks. */ -# define USB_IDENT_OFFSET 2 - -# define USBDEV "/dev/usb" -# define UHIDDEV "/dev/uhid" -# define AJSDEV "/dev/joy" - - -#endif - /* * Functions associated with the "jsJoystick" class in PLIB */