mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Added hints for more fine grained control over HIDAPI Xbox controller support
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#define SDL_JOYSTICK_HIDAPI_H
|
||||
|
||||
#include "SDL_atomic.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
@@ -46,6 +47,9 @@
|
||||
#define SDL_JOYSTICK_HIDAPI_STEAM
|
||||
#endif
|
||||
|
||||
/* Whether HIDAPI is enabled by default */
|
||||
#define SDL_HIDAPI_DEFAULT SDL_TRUE
|
||||
|
||||
/* The maximum size of a USB packet for HID devices */
|
||||
#define USB_PACKET_LENGTH 64
|
||||
|
||||
@@ -91,9 +95,11 @@ typedef struct _SDL_HIDAPI_Device
|
||||
|
||||
typedef struct _SDL_HIDAPI_DeviceDriver
|
||||
{
|
||||
const char *hint;
|
||||
const char *name;
|
||||
SDL_bool enabled;
|
||||
SDL_bool enabled_default;
|
||||
void (*RegisterHints)(SDL_HintCallback callback, void *userdata);
|
||||
void (*UnregisterHints)(SDL_HintCallback callback, void *userdata);
|
||||
SDL_bool (*IsEnabled)(void);
|
||||
SDL_bool (*IsSupportedDevice)(const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
|
||||
const char *(*GetDeviceName)(const char *name, Uint16 vendor_id, Uint16 product_id);
|
||||
SDL_bool (*InitDevice)(SDL_HIDAPI_Device *device);
|
||||
|
Reference in New Issue
Block a user