From 59f28b7f4bd1d3a4a03d0458f26c045b5842db6c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <slouken@libsdl.org>
Date: Thu, 3 Dec 2020 18:17:01 -0800
Subject: [PATCH] Fixed whitespace

---
 src/hidapi/SDL_hidapi.c                   |  6 +++---
 src/joystick/hidapi/SDL_hidapi_ps4.c      | 16 ++++++++--------
 src/joystick/iphoneos/SDL_mfijoystick.m   |  6 +++---
 src/joystick/iphoneos/SDL_mfijoystick_c.h |  2 +-
 src/joystick/linux/SDL_sysjoystick.c      |  2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index 061b2133d..1dad8e129 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -130,7 +130,7 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL;
 #undef make_path
 #undef read_thread
 
-#ifdef HAVE_HIDAPI_NVAGIPMAN
+#ifdef SDL_JOYSTICK_HIDAPI_STEAMXBOX
 #define HAVE_DRIVER_BACKEND 1
 #endif
 
@@ -160,9 +160,9 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL;
 #define hid_get_indexed_string          DRIVER_hid_get_indexed_string
 #define hid_error                       DRIVER_hid_error
 
-#ifdef HAVE_HIDAPI_NVAGIPMAN
+#ifdef SDL_JOYSTICK_HIDAPI_STEAMXBOX
 #undef HIDAPI_H__
-#include "nvagipman/hid.c"
+#include "steamxbox/hid.c"
 #else
 #error Need a driver hid.c for this platform!
 #endif
diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c
index d2cff01ac..a20757183 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps4.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps4.c
@@ -652,14 +652,14 @@ HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, hid_device *dev, SDL_
         SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_RIGHTSTICK, (data & 0x80) ? SDL_PRESSED : SDL_RELEASED);
     }
 
-	/* Some fightsticks, ex: Victrix FS Pro will only this these digital trigger bits and not the analog values so this needs to run whenever the
-	   trigger is evaluated
-	*/
-	if ((packet->rgucButtonsHatAndCounter[1] & 0x0C) != 0) {
-		Uint8 data = packet->rgucButtonsHatAndCounter[1];
-		packet->ucTriggerLeft = (data & 0x04) && packet->ucTriggerLeft == 0 ? 255 : packet->ucTriggerLeft;
-		packet->ucTriggerRight = (data & 0x08) && packet->ucTriggerRight == 0 ? 255 : packet->ucTriggerRight;
-	}
+    /* Some fightsticks, ex: Victrix FS Pro will only this these digital trigger bits and not the analog values so this needs to run whenever the
+       trigger is evaluated
+    */
+    if ((packet->rgucButtonsHatAndCounter[1] & 0x0C) != 0) {
+        Uint8 data = packet->rgucButtonsHatAndCounter[1];
+        packet->ucTriggerLeft = (data & 0x04) && packet->ucTriggerLeft == 0 ? 255 : packet->ucTriggerLeft;
+        packet->ucTriggerRight = (data & 0x08) && packet->ucTriggerRight == 0 ? 255 : packet->ucTriggerRight;
+    }
 
     if (ctx->last_state.rgucButtonsHatAndCounter[2] != packet->rgucButtonsHatAndCounter[2]) {
         Uint8 data = (packet->rgucButtonsHatAndCounter[2] & 0x03);
diff --git a/src/joystick/iphoneos/SDL_mfijoystick.m b/src/joystick/iphoneos/SDL_mfijoystick.m
index 307f13a7a..224513cec 100644
--- a/src/joystick/iphoneos/SDL_mfijoystick.m
+++ b/src/joystick/iphoneos/SDL_mfijoystick.m
@@ -479,9 +479,9 @@ static int
 IOS_JoystickInit(void)
 {
 #if defined(__MACOSX__)
-	if (!is_macos11()) {
-		return 0;
-	}
+    if (!is_macos11()) {
+        return 0;
+    }
 #endif
 
     @autoreleasepool {
diff --git a/src/joystick/iphoneos/SDL_mfijoystick_c.h b/src/joystick/iphoneos/SDL_mfijoystick_c.h
index c004fda1b..21d01b0b9 100644
--- a/src/joystick/iphoneos/SDL_mfijoystick_c.h
+++ b/src/joystick/iphoneos/SDL_mfijoystick_c.h
@@ -34,7 +34,7 @@ typedef struct joystick_hwdata
     SDL_bool remote;
 
     GCController __unsafe_unretained *controller;
-	void *rumble;
+    void *rumble;
     SDL_bool uses_pause_handler;
     int num_pause_presses;
     Uint32 pause_button_down_time;
diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index e57a8ce6d..74ec5f994 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -625,7 +625,7 @@ LINUX_JoystickDetect(void)
     }
     else
 #endif
-	{
+    {
         LINUX_FallbackJoystickDetect();
     }