mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
Fixed building without linux/input.h
https://github.com/libsdl-org/SDL/issues/6169
This commit is contained in:
@@ -19,10 +19,12 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_evdev_capabilities.h"
|
||||
|
||||
#if HAVE_LIBUDEV_H || defined(SDL_JOYSTICK_LINUX)
|
||||
|
||||
#if HAVE_LINUX_INPUT_H
|
||||
|
||||
/* missing defines in older Linux kernel headers */
|
||||
#ifndef BTN_TRIGGER_HAPPY
|
||||
@@ -142,4 +144,6 @@ SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)],
|
||||
return devclass;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_LINUX_INPUT_H */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
@@ -19,12 +19,13 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef SDL_evdev_capabilities_h_
|
||||
#define SDL_evdev_capabilities_h_
|
||||
|
||||
#if HAVE_LINUX_INPUT_H
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
/* A device can be any combination of these classes */
|
||||
@@ -51,6 +52,8 @@ extern int SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)],
|
||||
unsigned long bitmask_key[NBITS(KEY_MAX)],
|
||||
unsigned long bitmask_rel[NBITS(REL_MAX)]);
|
||||
|
||||
#endif /* HAVE_LINUX_INPUT_H */
|
||||
|
||||
#endif /* SDL_evdev_capabilities_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
@@ -18,6 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_ime.h"
|
||||
#include "SDL_ibus.h"
|
||||
|
@@ -19,9 +19,8 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#include "SDL_sandbox.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/*
|
||||
* To list the properties of a device, try something like:
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#ifndef SDL_udev_h_
|
||||
#define SDL_udev_h_
|
||||
|
||||
#if HAVE_LIBUDEV_H
|
||||
#if HAVE_LIBUDEV_H && HAVE_LINUX_INPUT_H
|
||||
|
||||
#ifndef SDL_USE_LIBUDEV
|
||||
#define SDL_USE_LIBUDEV 1
|
||||
@@ -108,7 +108,7 @@ extern const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void);
|
||||
extern void SDL_UDEV_ReleaseUdevSyms(void);
|
||||
|
||||
|
||||
#endif /* HAVE_LIBUDEV_H */
|
||||
#endif /* HAVE_LIBUDEV_H && HAVE_LINUX_INPUT_H */
|
||||
|
||||
#endif /* SDL_udev_h_ */
|
||||
|
||||
|
Reference in New Issue
Block a user