瀏覽代碼

Removed leading underscore in structure names

Fixes https://github.com/libsdl-org/SDL/issues/6856
Closes https://github.com/libsdl-org/SDL/pull/6914
Closes https://github.com/libsdl-org/SDL/pull/6915
Closes https://github.com/libsdl-org/SDL/pull/6916
Closes https://github.com/libsdl-org/SDL/pull/6917
Closes https://github.com/libsdl-org/SDL/pull/6918
Closes https://github.com/libsdl-org/SDL/pull/6919
Sam Lantinga 2 年之前
父節點
當前提交
701e965235

+ 2 - 2
include/SDL3/SDL_audio.h

@@ -925,8 +925,8 @@ extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
     - You push data as you have it, and pull it when you need it
  */
 /* this is opaque to the outside world. */
-struct _SDL_AudioStream;
-typedef struct _SDL_AudioStream SDL_AudioStream;
+struct SDL_AudioStream;
+typedef struct SDL_AudioStream SDL_AudioStream;
 
 /**
  * Create a new audio stream.

+ 2 - 2
include/SDL3/SDL_haptic.h

@@ -137,8 +137,8 @@ extern "C" {
  *  \sa SDL_HapticOpenFromJoystick
  *  \sa SDL_HapticClose
  */
-struct _SDL_Haptic;
-typedef struct _SDL_Haptic SDL_Haptic;
+struct SDL_Haptic;
+typedef struct SDL_Haptic SDL_Haptic;
 
 
 /**

+ 2 - 2
include/SDL3/SDL_sensor.h

@@ -48,8 +48,8 @@ extern "C" {
  *  for sensors, and load appropriate drivers.
  */
 
-struct _SDL_Sensor;
-typedef struct _SDL_Sensor SDL_Sensor;
+struct SDL_Sensor;
+typedef struct SDL_Sensor SDL_Sensor;
 
 /**
  * This is a unique ID for a sensor for the time it is connected to the system,

+ 1 - 1
src/audio/SDL_audiocvt.c

@@ -830,7 +830,7 @@ typedef int (*SDL_ResampleAudioStreamFunc)(SDL_AudioStream *stream, const void *
 typedef void (*SDL_ResetAudioStreamResamplerFunc)(SDL_AudioStream *stream);
 typedef void (*SDL_CleanupAudioStreamResamplerFunc)(SDL_AudioStream *stream);
 
-struct _SDL_AudioStream
+struct SDL_AudioStream
 {
     SDL_AudioCVT cvt_before_resampling;
     SDL_AudioCVT cvt_after_resampling;

+ 2 - 2
src/haptic/SDL_syshaptic.h

@@ -38,7 +38,7 @@ struct haptic_effect
 /*
  * The real SDL_Haptic struct.
  */
-struct _SDL_Haptic
+struct SDL_Haptic
 {
     Uint8 index; /* Stores index it is attached to */
 
@@ -53,7 +53,7 @@ struct _SDL_Haptic
 
     int rumble_id;                  /* ID of rumble effect for simple rumble API. */
     SDL_HapticEffect rumble_effect; /* Rumble effect. */
-    struct _SDL_Haptic *next;       /* pointer to next haptic we have allocated */
+    struct SDL_Haptic *next;       /* pointer to next haptic we have allocated */
 };
 
 /*

+ 3 - 3
src/joystick/SDL_joystick_c.h

@@ -31,7 +31,7 @@
 extern "C" {
 #endif
 
-struct _SDL_JoystickDriver;
+struct SDL_JoystickDriver;
 
 /* Initialization and shutdown functions */
 extern int SDL_JoystickInit(void);
@@ -161,13 +161,13 @@ typedef enum
     EMappingKind_Hat = 3
 } EMappingKind;
 
-typedef struct _SDL_InputMapping
+typedef struct SDL_InputMapping
 {
     EMappingKind kind;
     Uint8 target;
 } SDL_InputMapping;
 
-typedef struct _SDL_GamepadMapping
+typedef struct SDL_GamepadMapping
 {
     SDL_InputMapping a;
     SDL_InputMapping b;

+ 6 - 6
src/joystick/SDL_sysjoystick.h

@@ -32,7 +32,7 @@ extern "C" {
 #endif
 
 /* The SDL joystick structure */
-typedef struct _SDL_JoystickAxisInfo
+typedef struct SDL_JoystickAxisInfo
 {
     Sint16 initial_value;           /* Initial axis state */
     Sint16 value;                   /* Current axis state */
@@ -43,7 +43,7 @@ typedef struct _SDL_JoystickAxisInfo
     SDL_bool sending_initial_value; /* Whether we are sending the initial axis value */
 } SDL_JoystickAxisInfo;
 
-typedef struct _SDL_JoystickTouchpadFingerInfo
+typedef struct SDL_JoystickTouchpadFingerInfo
 {
     Uint8 state;
     float x;
@@ -51,13 +51,13 @@ typedef struct _SDL_JoystickTouchpadFingerInfo
     float pressure;
 } SDL_JoystickTouchpadFingerInfo;
 
-typedef struct _SDL_JoystickTouchpadInfo
+typedef struct SDL_JoystickTouchpadInfo
 {
     int nfingers;
     SDL_JoystickTouchpadFingerInfo *fingers;
 } SDL_JoystickTouchpadInfo;
 
-typedef struct _SDL_JoystickSensorInfo
+typedef struct SDL_JoystickSensorInfo
 {
     SDL_SensorType type;
     SDL_bool enabled;
@@ -113,7 +113,7 @@ struct _SDL_Joystick
     SDL_bool delayed_guide_button _guarded;      /* SDL_TRUE if this device has the guide button event delayed */
     SDL_JoystickPowerLevel epowerlevel _guarded; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */
 
-    struct _SDL_JoystickDriver *driver _guarded;
+    struct SDL_JoystickDriver *driver _guarded;
 
     struct joystick_hwdata *hwdata _guarded; /* Driver dependent information */
 
@@ -138,7 +138,7 @@ struct _SDL_Joystick
 /* Macro to combine a USB vendor ID and product ID into a single Uint32 value */
 #define MAKE_VIDPID(VID, PID) (((Uint32)(VID)) << 16 | (PID))
 
-typedef struct _SDL_JoystickDriver
+typedef struct SDL_JoystickDriver
 {
     /* Function to scan the system for joysticks.
      * Joystick 0 should be the system default joystick.

+ 2 - 2
src/sensor/SDL_syssensor.h

@@ -28,7 +28,7 @@
 #include "SDL_sensor_c.h"
 
 /* The SDL sensor structure */
-struct _SDL_Sensor
+struct SDL_Sensor
 {
     SDL_SensorID instance_id;   /* Device instance, monotonically increasing from 0 */
     char *name;                 /* Sensor name - system dependent */
@@ -43,7 +43,7 @@ struct _SDL_Sensor
 
     int ref_count; /* Reference count for multiple opens */
 
-    struct _SDL_Sensor *next; /* pointer to next sensor we have allocated */
+    struct SDL_Sensor *next; /* pointer to next sensor we have allocated */
 };
 
 typedef struct _SDL_SensorDriver