mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-03 00:18:28 +00:00
Remove more reserved identifiers (#6925)
This commit is contained in:
@@ -31,18 +31,18 @@
|
||||
|
||||
#include "SDL_audiodev_c.h"
|
||||
|
||||
#ifndef _PATH_DEV_DSP
|
||||
#ifndef SDL_PATH_DEV_DSP
|
||||
#if defined(__NETBSD__) || defined(__OPENBSD__)
|
||||
#define _PATH_DEV_DSP "/dev/audio"
|
||||
#define SDL_PATH_DEV_DSP "/dev/audio"
|
||||
#else
|
||||
#define _PATH_DEV_DSP "/dev/dsp"
|
||||
#define SDL_PATH_DEV_DSP "/dev/dsp"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _PATH_DEV_DSP24
|
||||
#define _PATH_DEV_DSP24 "/dev/sound/dsp"
|
||||
#ifndef SDL_PATH_DEV_DSP24
|
||||
#define SDL_PATH_DEV_DSP24 "/dev/sound/dsp"
|
||||
#endif
|
||||
#ifndef _PATH_DEV_AUDIO
|
||||
#define _PATH_DEV_AUDIO "/dev/audio"
|
||||
#ifndef SDL_PATH_DEV_AUDIO
|
||||
#define SDL_PATH_DEV_AUDIO "/dev/audio"
|
||||
#endif
|
||||
|
||||
static void test_device(const int iscapture, const char *fname, int flags, int (*test)(int fd))
|
||||
@@ -91,15 +91,15 @@ static void SDL_EnumUnixAudioDevices_Internal(const int iscapture, const int cla
|
||||
}
|
||||
if (audiodev == NULL) {
|
||||
if (classic) {
|
||||
audiodev = _PATH_DEV_AUDIO;
|
||||
audiodev = SDL_PATH_DEV_AUDIO;
|
||||
} else {
|
||||
struct stat sb;
|
||||
|
||||
/* Added support for /dev/sound/\* in Linux 2.4 */
|
||||
if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode)) && ((stat(_PATH_DEV_DSP24, &sb) == 0) && S_ISCHR(sb.st_mode))) {
|
||||
audiodev = _PATH_DEV_DSP24;
|
||||
if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode)) && ((stat(SDL_PATH_DEV_DSP24, &sb) == 0) && S_ISCHR(sb.st_mode))) {
|
||||
audiodev = SDL_PATH_DEV_DSP24;
|
||||
} else {
|
||||
audiodev = _PATH_DEV_DSP;
|
||||
audiodev = SDL_PATH_DEV_DSP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
#define DBUS_TIMEOUT 500
|
||||
|
||||
typedef struct _FcitxClient
|
||||
typedef struct FcitxClient
|
||||
{
|
||||
SDL_DBusContext *dbus;
|
||||
|
||||
|
@@ -24,21 +24,21 @@
|
||||
#include "SDL_ibus.h"
|
||||
#include "SDL_fcitx.h"
|
||||
|
||||
typedef SDL_bool (*_SDL_IME_Init)(void);
|
||||
typedef void (*_SDL_IME_Quit)(void);
|
||||
typedef void (*_SDL_IME_SetFocus)(SDL_bool);
|
||||
typedef void (*_SDL_IME_Reset)(void);
|
||||
typedef SDL_bool (*_SDL_IME_ProcessKeyEvent)(Uint32, Uint32, Uint8 state);
|
||||
typedef void (*_SDL_IME_UpdateTextRect)(const SDL_Rect *);
|
||||
typedef void (*_SDL_IME_PumpEvents)(void);
|
||||
typedef SDL_bool (*SDL_IME_Init_t)(void);
|
||||
typedef void (*SDL_IME_Quit_t)(void);
|
||||
typedef void (*SDL_IME_SetFocus_t)(SDL_bool);
|
||||
typedef void (*SDL_IME_Reset_t)(void);
|
||||
typedef SDL_bool (*SDL_IME_ProcessKeyEvent_t)(Uint32, Uint32, Uint8 state);
|
||||
typedef void (*SDL_IME_UpdateTextRect_t)(const SDL_Rect *);
|
||||
typedef void (*SDL_IME_PumpEvents_t)(void);
|
||||
|
||||
static _SDL_IME_Init SDL_IME_Init_Real = NULL;
|
||||
static _SDL_IME_Quit SDL_IME_Quit_Real = NULL;
|
||||
static _SDL_IME_SetFocus SDL_IME_SetFocus_Real = NULL;
|
||||
static _SDL_IME_Reset SDL_IME_Reset_Real = NULL;
|
||||
static _SDL_IME_ProcessKeyEvent SDL_IME_ProcessKeyEvent_Real = NULL;
|
||||
static _SDL_IME_UpdateTextRect SDL_IME_UpdateTextRect_Real = NULL;
|
||||
static _SDL_IME_PumpEvents SDL_IME_PumpEvents_Real = NULL;
|
||||
static SDL_IME_Init_t SDL_IME_Init_Real = NULL;
|
||||
static SDL_IME_Quit_t SDL_IME_Quit_Real = NULL;
|
||||
static SDL_IME_SetFocus_t SDL_IME_SetFocus_Real = NULL;
|
||||
static SDL_IME_Reset_t SDL_IME_Reset_Real = NULL;
|
||||
static SDL_IME_ProcessKeyEvent_t SDL_IME_ProcessKeyEvent_Real = NULL;
|
||||
static SDL_IME_UpdateTextRect_t SDL_IME_UpdateTextRect_Real = NULL;
|
||||
static SDL_IME_PumpEvents_t SDL_IME_PumpEvents_Real = NULL;
|
||||
|
||||
static void InitIME()
|
||||
{
|
||||
|
@@ -68,18 +68,18 @@ static SDL_DisabledEventBlock *SDL_disabled_events[256];
|
||||
static Uint32 SDL_userevents = SDL_USEREVENT;
|
||||
|
||||
/* Private data -- event queue */
|
||||
typedef struct _SDL_EventEntry
|
||||
typedef struct SDL_EventEntry
|
||||
{
|
||||
SDL_Event event;
|
||||
SDL_SysWMmsg msg;
|
||||
struct _SDL_EventEntry *prev;
|
||||
struct _SDL_EventEntry *next;
|
||||
struct SDL_EventEntry *prev;
|
||||
struct SDL_EventEntry *next;
|
||||
} SDL_EventEntry;
|
||||
|
||||
typedef struct _SDL_SysWMEntry
|
||||
typedef struct SDL_SysWMEntry
|
||||
{
|
||||
SDL_SysWMmsg msg;
|
||||
struct _SDL_SysWMEntry *next;
|
||||
struct SDL_SysWMEntry *next;
|
||||
} SDL_SysWMEntry;
|
||||
|
||||
static struct
|
||||
|
@@ -622,7 +622,7 @@ static void SDLCALL SDL_AppleTVRemoteRotationHintChanged(void *udata, const char
|
||||
static int IOS_JoystickInit(void)
|
||||
{
|
||||
#if defined(__MACOS__)
|
||||
#if _SDL_HAS_BUILTIN(__builtin_available)
|
||||
#if SDL_HAS_BUILTIN(__builtin_available)
|
||||
if (@available(macOS 10.16, *)) {
|
||||
/* Continue with initialization on macOS 11+ */
|
||||
} else {
|
||||
|
@@ -46,9 +46,9 @@
|
||||
#define USB_PACKET_LENGTH 64
|
||||
|
||||
/* Forward declaration */
|
||||
struct _SDL_HIDAPI_DeviceDriver;
|
||||
struct SDL_HIDAPI_DeviceDriver;
|
||||
|
||||
typedef struct _SDL_HIDAPI_Device
|
||||
typedef struct SDL_HIDAPI_Device
|
||||
{
|
||||
char *name;
|
||||
char *path;
|
||||
@@ -67,7 +67,7 @@ typedef struct _SDL_HIDAPI_Device
|
||||
SDL_JoystickType joystick_type;
|
||||
SDL_GamepadType type;
|
||||
|
||||
struct _SDL_HIDAPI_DeviceDriver *driver;
|
||||
struct SDL_HIDAPI_DeviceDriver *driver;
|
||||
void *context;
|
||||
SDL_mutex *dev_lock;
|
||||
SDL_hid_device *dev;
|
||||
@@ -81,14 +81,14 @@ typedef struct _SDL_HIDAPI_Device
|
||||
/* Used to flag that the device is being updated */
|
||||
SDL_bool updating;
|
||||
|
||||
struct _SDL_HIDAPI_Device *parent;
|
||||
struct SDL_HIDAPI_Device *parent;
|
||||
int num_children;
|
||||
struct _SDL_HIDAPI_Device **children;
|
||||
struct SDL_HIDAPI_Device **children;
|
||||
|
||||
struct _SDL_HIDAPI_Device *next;
|
||||
struct SDL_HIDAPI_Device *next;
|
||||
} SDL_HIDAPI_Device;
|
||||
|
||||
typedef struct _SDL_HIDAPI_DeviceDriver
|
||||
typedef struct SDL_HIDAPI_DeviceDriver
|
||||
{
|
||||
const char *name;
|
||||
SDL_bool enabled;
|
||||
|
@@ -93,7 +93,7 @@ static int SDL_RAWINPUT_numjoysticks = 0;
|
||||
|
||||
static void RAWINPUT_JoystickClose(SDL_Joystick *joystick);
|
||||
|
||||
typedef struct _SDL_RAWINPUT_Device
|
||||
typedef struct SDL_RAWINPUT_Device
|
||||
{
|
||||
SDL_atomic_t refcount;
|
||||
char *name;
|
||||
@@ -110,7 +110,7 @@ typedef struct _SDL_RAWINPUT_Device
|
||||
SDL_Joystick *joystick;
|
||||
SDL_JoystickID joystick_id;
|
||||
|
||||
struct _SDL_RAWINPUT_Device *next;
|
||||
struct SDL_RAWINPUT_Device *next;
|
||||
} SDL_RAWINPUT_Device;
|
||||
|
||||
struct joystick_hwdata
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#ifndef SDL_sensor_c_h_
|
||||
#define SDL_sensor_c_h_
|
||||
|
||||
struct _SDL_SensorDriver;
|
||||
struct SDL_SensorDriver;
|
||||
|
||||
/* Useful functions and variables from SDL_sensor.c */
|
||||
|
||||
|
@@ -37,7 +37,7 @@ struct SDL_Sensor
|
||||
|
||||
float data[16]; /* The current state of the sensor */
|
||||
|
||||
struct _SDL_SensorDriver *driver;
|
||||
struct SDL_SensorDriver *driver;
|
||||
|
||||
struct sensor_hwdata *hwdata; /* Driver dependent information */
|
||||
|
||||
@@ -46,7 +46,7 @@ struct SDL_Sensor
|
||||
struct SDL_Sensor *next; /* pointer to next sensor we have allocated */
|
||||
};
|
||||
|
||||
typedef struct _SDL_SensorDriver
|
||||
typedef struct SDL_SensorDriver
|
||||
{
|
||||
/* Function to scan the system for sensors.
|
||||
* sensor 0 should be the system default sensor.
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#if !defined(__EMSCRIPTEN__) || !SDL_THREADS_DISABLED
|
||||
|
||||
typedef struct _SDL_Timer
|
||||
typedef struct SDL_Timer
|
||||
{
|
||||
int timerID;
|
||||
SDL_TimerCallback callback;
|
||||
@@ -35,14 +35,14 @@ typedef struct _SDL_Timer
|
||||
Uint64 interval;
|
||||
Uint64 scheduled;
|
||||
SDL_atomic_t canceled;
|
||||
struct _SDL_Timer *next;
|
||||
struct SDL_Timer *next;
|
||||
} SDL_Timer;
|
||||
|
||||
typedef struct _SDL_TimerMap
|
||||
typedef struct SDL_TimerMap
|
||||
{
|
||||
int timerID;
|
||||
SDL_Timer *timer;
|
||||
struct _SDL_TimerMap *next;
|
||||
struct SDL_TimerMap *next;
|
||||
} SDL_TimerMap;
|
||||
|
||||
/* The timers are kept in a sorted list */
|
||||
@@ -370,14 +370,14 @@ SDL_bool SDL_RemoveTimer(SDL_TimerID id)
|
||||
#include <emscripten/emscripten.h>
|
||||
#include <emscripten/eventloop.h>
|
||||
|
||||
typedef struct _SDL_TimerMap
|
||||
typedef struct SDL_TimerMap
|
||||
{
|
||||
int timerID;
|
||||
int timeoutID;
|
||||
Uint32 interval;
|
||||
SDL_TimerCallback callback;
|
||||
void *param;
|
||||
struct _SDL_TimerMap *next;
|
||||
struct SDL_TimerMap *next;
|
||||
} SDL_TimerMap;
|
||||
|
||||
typedef struct
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define MAX_CURSOR_W 512
|
||||
#define MAX_CURSOR_H 512
|
||||
|
||||
typedef struct _KMSDRM_CursorData
|
||||
typedef struct KMSDRM_CursorData
|
||||
{
|
||||
int hot_x, hot_y;
|
||||
int w, h;
|
||||
|
Reference in New Issue
Block a user