mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-24 10:28:46 +02:00
Use #ifdef/#ifndef instead of #if defined/#if \!defined
This commit is contained in:
committed by
Anonymous Maarten
parent
308bcbbe76
commit
b6ae281e97
@@ -32,7 +32,7 @@
|
||||
/*#define DEBUG_LUNA_PROTOCOL*/
|
||||
|
||||
/* Sending rumble on macOS blocks for a long time and eventually fails */
|
||||
#if !defined(__MACOS__)
|
||||
#ifndef __MACOS__
|
||||
#define ENABLE_LUNA_BLUETOOTH_RUMBLE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ static SDL_bool HIDAPI_DriverPS3_IsEnabled(void)
|
||||
{
|
||||
SDL_bool default_value;
|
||||
|
||||
#if defined(__MACOS__)
|
||||
#ifdef __MACOS__
|
||||
/* This works well on macOS */
|
||||
default_value = SDL_TRUE;
|
||||
#elif defined(__WINDOWS__)
|
||||
|
||||
@@ -979,7 +979,7 @@ static SDL_bool HIDAPI_DriverSteam_InitDevice(SDL_HIDAPI_Device *device)
|
||||
}
|
||||
device->context = ctx;
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#ifdef __WIN32__
|
||||
if (device->serial) {
|
||||
/* We get a garbage serial number on Windows */
|
||||
SDL_free(device->serial);
|
||||
|
||||
@@ -455,7 +455,7 @@ static void CheckMotionPlusConnection(SDL_DriverWii_Context *ctx)
|
||||
|
||||
static void ActivateMotionPlusWithMode(SDL_DriverWii_Context *ctx, Uint8 mode)
|
||||
{
|
||||
#if defined(__LINUX__)
|
||||
#ifdef __LINUX__
|
||||
/* Linux drivers maintain a lot of state around the Motion Plus
|
||||
* extension, so don't mess with it here.
|
||||
*/
|
||||
|
||||
@@ -82,7 +82,7 @@ static SDL_bool HIDAPI_DriverXbox360_IsSupportedDevice(SDL_HIDAPI_Device *device
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#endif
|
||||
#if defined(__MACOS__)
|
||||
#ifdef __MACOS__
|
||||
/* Wired Xbox One controllers are handled by this driver, interfacing with
|
||||
the 360Controller driver available from:
|
||||
https://github.com/360Controller/360Controller/releases
|
||||
|
||||
@@ -561,7 +561,7 @@ static int HIDAPI_JoystickInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(SDL_USE_LIBUDEV)
|
||||
#ifdef SDL_USE_LIBUDEV
|
||||
if (linux_enumeration_method == ENUMERATION_UNSET) {
|
||||
if (SDL_getenv("SDL_HIDAPI_JOYSTICK_DISABLE_UDEV") != NULL) {
|
||||
SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
|
||||
|
||||
Reference in New Issue
Block a user