Merge pull request #75 from coypoop/joystick-h

Use <sys/joystick.h> on netbsd, too.
This commit is contained in:
Diederick C. Niehorster 2019-10-22 10:04:54 +02:00 committed by GitHub
commit 2dcd3a7a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 27 deletions

View File

@ -102,21 +102,9 @@ struct tagSFG_PlatformWindowState
#include <string.h> #include <string.h>
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) # 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 # define HAVE_USB_JS 1
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # include <sys/joystick.h>
# include <sys/joystick.h>
# 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 <machine/joystick.h> /* For analog joysticks */
# endif
# define JS_DATA_TYPE joystick # define JS_DATA_TYPE joystick
# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# endif # endif

View File

@ -136,21 +136,8 @@ struct tagSFG_PlatformWindowState
#include <string.h> #include <string.h>
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) # 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 # define HAVE_USB_JS 1
# include <sys/joystick.h>
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/joystick.h>
# 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 <machine/joystick.h> /* For analog joysticks */
# endif
# define JS_DATA_TYPE joystick # define JS_DATA_TYPE joystick
# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# endif # endif