mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 00:46:25 +00:00
Update for SDL3 coding style (#6717)
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#define SDL_JOYSTICK_HIDAPI_PS4
|
||||
#define SDL_JOYSTICK_HIDAPI_PS5
|
||||
#define SDL_JOYSTICK_HIDAPI_STADIA
|
||||
#define SDL_JOYSTICK_HIDAPI_STEAM /* Simple support for BLE Steam Controller, hint is disabled by default */
|
||||
#define SDL_JOYSTICK_HIDAPI_STEAM /* Simple support for BLE Steam Controller, hint is disabled by default */
|
||||
#define SDL_JOYSTICK_HIDAPI_SWITCH
|
||||
#define SDL_JOYSTICK_HIDAPI_WII
|
||||
#define SDL_JOYSTICK_HIDAPI_XBOX360
|
||||
@@ -40,10 +40,10 @@
|
||||
#define SDL_JOYSTICK_HIDAPI_SHIELD
|
||||
|
||||
/* Whether HIDAPI is enabled by default */
|
||||
#define SDL_HIDAPI_DEFAULT SDL_TRUE
|
||||
#define SDL_HIDAPI_DEFAULT SDL_TRUE
|
||||
|
||||
/* The maximum size of a USB packet for HID devices */
|
||||
#define USB_PACKET_LENGTH 64
|
||||
#define USB_PACKET_LENGTH 64
|
||||
|
||||
/* Forward declaration */
|
||||
struct _SDL_HIDAPI_DeviceDriver;
|
||||
@@ -57,12 +57,12 @@ typedef struct _SDL_HIDAPI_Device
|
||||
Uint16 version;
|
||||
char *serial;
|
||||
SDL_JoystickGUID guid;
|
||||
int interface_number; /* Available on Windows and Linux */
|
||||
int interface_number; /* Available on Windows and Linux */
|
||||
int interface_class;
|
||||
int interface_subclass;
|
||||
int interface_protocol;
|
||||
Uint16 usage_page; /* Available on Windows and macOS */
|
||||
Uint16 usage; /* Available on Windows and macOS */
|
||||
Uint16 usage_page; /* Available on Windows and macOS */
|
||||
Uint16 usage; /* Available on Windows and macOS */
|
||||
SDL_bool is_bluetooth;
|
||||
SDL_JoystickType joystick_type;
|
||||
SDL_GameControllerType type;
|
||||
@@ -112,7 +112,6 @@ typedef struct _SDL_HIDAPI_DeviceDriver
|
||||
|
||||
} SDL_HIDAPI_DeviceDriver;
|
||||
|
||||
|
||||
/* HIDAPI device support */
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverCombined;
|
||||
extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverGameCube;
|
||||
|
Reference in New Issue
Block a user