mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-18 15:01:12 +00:00
Fix -Wundef warnings due to use of unguarded SDL_JOYSTICK_XINPUT
This commit is contained in:
@@ -814,7 +814,7 @@ static GamepadMapping_t *SDL_PrivateGetGamepadMappingForGUID(SDL_JoystickGUID gu
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_JOYSTICK_XINPUT
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
if (SDL_IsJoystickXInput(guid)) {
|
||||
/* This is an XInput device */
|
||||
return s_pXInputMapping;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
Alternatively, you can use the app located in test/controllermap
|
||||
*/
|
||||
static const char *s_GamepadMappings[] = {
|
||||
#if SDL_JOYSTICK_XINPUT
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
"xinput,XInput Controller,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
|
||||
#if SDL_JOYSTICK_WGI
|
||||
|
||||
@@ -345,7 +345,7 @@ static SDL_DeviceNotificationData s_notification_data;
|
||||
/* Function/thread to scan the system for joysticks. */
|
||||
static int SDLCALL SDL_JoystickThread(void *_data)
|
||||
{
|
||||
#if SDL_JOYSTICK_XINPUT
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
SDL_bool bOpenedXInputDevices[XUSER_MAX_COUNT];
|
||||
SDL_zeroa(bOpenedXInputDevices);
|
||||
#endif
|
||||
@@ -363,7 +363,7 @@ static int SDLCALL SDL_JoystickThread(void *_data)
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
#if SDL_JOYSTICK_XINPUT
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
/* WM_DEVICECHANGE not working, poll for new XINPUT controllers */
|
||||
SDL_CondWaitTimeout(s_condJoystickThread, s_mutexJoyStickEnum, 1000);
|
||||
if (SDL_XINPUT_Enabled() && XINPUTGETCAPABILITIES) {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "../SDL_sysjoystick.h"
|
||||
|
||||
#if SDL_JOYSTICK_XINPUT
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
|
||||
#include "SDL_windowsjoystick_c.h"
|
||||
#include "SDL_xinputjoystick_c.h"
|
||||
|
||||
Reference in New Issue
Block a user