Fixed whitespace
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index 061b213..1dad8e1 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 d2cff01..a207571 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 307f13a..224513c 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 c004fda..21d01b0 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 e57a8ce..74ec5f9 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();
}