mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-22 07:15:44 +00:00
Improve support for private platforms (#11220)
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
Alternatively, you can use the app located in test/controllermap
|
||||
*/
|
||||
static const char *s_GamepadMappings[] = {
|
||||
#ifdef SDL_JOYSTICK_PRIVATE
|
||||
SDL_PRIVATE_GAMEPAD_DEFINITIONS
|
||||
#endif
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
"xinput,*,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,9 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = {
|
||||
#ifdef SDL_JOYSTICK_HIDAPI // Highest priority driver for supported devices
|
||||
&SDL_HIDAPI_JoystickDriver,
|
||||
#endif
|
||||
#ifdef SDL_JOYSTICK_PRIVATE
|
||||
&SDL_PRIVATE_JoystickDriver,
|
||||
#endif
|
||||
#ifdef SDL_JOYSTICK_GAMEINPUT // Higher priority than other Windows drivers
|
||||
&SDL_GAMEINPUT_JoystickDriver,
|
||||
#endif
|
||||
|
||||
@@ -240,6 +240,7 @@ typedef struct SDL_JoystickDriver
|
||||
#define SDL_LED_MIN_REPEAT_MS 5000
|
||||
|
||||
// The available joystick drivers
|
||||
extern SDL_JoystickDriver SDL_PRIVATE_JoystickDriver;
|
||||
extern SDL_JoystickDriver SDL_ANDROID_JoystickDriver;
|
||||
extern SDL_JoystickDriver SDL_BSD_JoystickDriver;
|
||||
extern SDL_JoystickDriver SDL_DARWIN_JoystickDriver;
|
||||
|
||||
Reference in New Issue
Block a user