mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
Fix various warnings: static /void / comma
This commit is contained in:
parent
c9aec268fa
commit
9b065bf54b
31 changed files with 76 additions and 75 deletions
|
@ -1436,7 +1436,7 @@ static int PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static WaveRiffSizeHint WaveGetRiffSizeHint()
|
static WaveRiffSizeHint WaveGetRiffSizeHint(void)
|
||||||
{
|
{
|
||||||
const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE);
|
const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE);
|
||||||
|
|
||||||
|
@ -1455,7 +1455,7 @@ static WaveRiffSizeHint WaveGetRiffSizeHint()
|
||||||
return RiffSizeNoHint;
|
return RiffSizeNoHint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static WaveTruncationHint WaveGetTruncationHint()
|
static WaveTruncationHint WaveGetTruncationHint(void)
|
||||||
{
|
{
|
||||||
const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION);
|
const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION);
|
||||||
|
|
||||||
|
@ -1474,7 +1474,7 @@ static WaveTruncationHint WaveGetTruncationHint()
|
||||||
return TruncNoHint;
|
return TruncNoHint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static WaveFactChunkHint WaveGetFactChunkHint()
|
static WaveFactChunkHint WaveGetFactChunkHint(void)
|
||||||
{
|
{
|
||||||
const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK);
|
const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK);
|
||||||
|
|
||||||
|
|
|
@ -139,13 +139,13 @@ static int pipewire_dlsym(const char *fn, void **addr)
|
||||||
return -1; \
|
return -1; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_pipewire_library()
|
static int load_pipewire_library(void)
|
||||||
{
|
{
|
||||||
pipewire_handle = SDL_LoadObject(pipewire_library);
|
pipewire_handle = SDL_LoadObject(pipewire_library);
|
||||||
return pipewire_handle != NULL ? 0 : -1;
|
return pipewire_handle != NULL ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unload_pipewire_library()
|
static void unload_pipewire_library(void)
|
||||||
{
|
{
|
||||||
if (pipewire_handle) {
|
if (pipewire_handle) {
|
||||||
SDL_UnloadObject(pipewire_handle);
|
SDL_UnloadObject(pipewire_handle);
|
||||||
|
@ -157,18 +157,18 @@ static void unload_pipewire_library()
|
||||||
|
|
||||||
#define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x
|
#define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x
|
||||||
|
|
||||||
static int load_pipewire_library()
|
static int load_pipewire_library(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unload_pipewire_library()
|
static void unload_pipewire_library(void)
|
||||||
{ /* Nothing to do */
|
{ /* Nothing to do */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
|
#endif /* SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
|
||||||
|
|
||||||
static int load_pipewire_syms()
|
static int load_pipewire_syms(void)
|
||||||
{
|
{
|
||||||
SDL_PIPEWIRE_SYM(pw_get_library_version);
|
SDL_PIPEWIRE_SYM(pw_get_library_version);
|
||||||
SDL_PIPEWIRE_SYM(pw_init);
|
SDL_PIPEWIRE_SYM(pw_init);
|
||||||
|
@ -209,7 +209,7 @@ SDL_FORCE_INLINE SDL_bool pipewire_version_at_least(int major, int minor, int pa
|
||||||
(pipewire_version_major > major || pipewire_version_minor > minor || pipewire_version_patch >= patch);
|
(pipewire_version_major > major || pipewire_version_minor > minor || pipewire_version_patch >= patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_pipewire_library()
|
static int init_pipewire_library(void)
|
||||||
{
|
{
|
||||||
if (!load_pipewire_library()) {
|
if (!load_pipewire_library()) {
|
||||||
if (!load_pipewire_syms()) {
|
if (!load_pipewire_syms()) {
|
||||||
|
@ -231,7 +231,7 @@ static int init_pipewire_library()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void deinit_pipewire_library()
|
static void deinit_pipewire_library(void)
|
||||||
{
|
{
|
||||||
PIPEWIRE_pw_deinit();
|
PIPEWIRE_pw_deinit();
|
||||||
unload_pipewire_library();
|
unload_pipewire_library();
|
||||||
|
@ -337,7 +337,7 @@ static void io_list_remove(Uint32 id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void io_list_sort()
|
static void io_list_sort(void)
|
||||||
{
|
{
|
||||||
struct io_node *default_sink = NULL, *default_source = NULL;
|
struct io_node *default_sink = NULL, *default_source = NULL;
|
||||||
struct io_node *n, *temp;
|
struct io_node *n, *temp;
|
||||||
|
@ -362,7 +362,7 @@ static void io_list_sort()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void io_list_clear()
|
static void io_list_clear(void)
|
||||||
{
|
{
|
||||||
struct io_node *n, *temp;
|
struct io_node *n, *temp;
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ static void pending_list_remove(Uint32 id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pending_list_clear()
|
static void pending_list_clear(void)
|
||||||
{
|
{
|
||||||
struct node_object *node, *temp;
|
struct node_object *node, *temp;
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ static const struct pw_registry_events registry_events = { PW_VERSION_REGISTRY_E
|
||||||
.global_remove = registry_event_remove_callback };
|
.global_remove = registry_event_remove_callback };
|
||||||
|
|
||||||
/* The hotplug thread */
|
/* The hotplug thread */
|
||||||
static int hotplug_loop_init()
|
static int hotplug_loop_init(void)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ static int hotplug_loop_init()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hotplug_loop_destroy()
|
static void hotplug_loop_destroy(void)
|
||||||
{
|
{
|
||||||
if (hotplug_loop) {
|
if (hotplug_loop) {
|
||||||
PIPEWIRE_pw_thread_loop_stop(hotplug_loop);
|
PIPEWIRE_pw_thread_loop_stop(hotplug_loop);
|
||||||
|
@ -833,7 +833,7 @@ static void hotplug_loop_destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PIPEWIRE_DetectDevices()
|
static void PIPEWIRE_DetectDevices(void)
|
||||||
{
|
{
|
||||||
struct io_node *io;
|
struct io_node *io;
|
||||||
|
|
||||||
|
@ -1333,7 +1333,7 @@ failed:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PIPEWIRE_Deinitialize()
|
static void PIPEWIRE_Deinitialize(void)
|
||||||
{
|
{
|
||||||
if (pipewire_initialized) {
|
if (pipewire_initialized) {
|
||||||
hotplug_loop_destroy();
|
hotplug_loop_destroy();
|
||||||
|
|
|
@ -802,7 +802,7 @@ static int SDLCALL HotplugThread(void *data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PULSEAUDIO_DetectDevices()
|
static void PULSEAUDIO_DetectDevices(void)
|
||||||
{
|
{
|
||||||
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL));
|
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL));
|
||||||
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_sink_info_list(hotplug_context, SinkInfoCallback, (void *)((intptr_t)SDL_TRUE)));
|
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_sink_info_list(hotplug_context, SinkInfoCallback, (void *)((intptr_t)SDL_TRUE)));
|
||||||
|
|
|
@ -181,8 +181,8 @@ static void SDL_EVDEV_kbd_reraise_signal(int sig)
|
||||||
(void)raise(sig);
|
(void)raise(sig);
|
||||||
}
|
}
|
||||||
|
|
||||||
siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL;
|
static siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL;
|
||||||
void *SDL_EVDEV_kdb_cleanup_ucontext = NULL;
|
static void *SDL_EVDEV_kdb_cleanup_ucontext = NULL;
|
||||||
|
|
||||||
static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext)
|
static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext)
|
||||||
{
|
{
|
||||||
|
@ -208,7 +208,7 @@ static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontex
|
||||||
SDL_EVDEV_kbd_reraise_signal(signum);
|
SDL_EVDEV_kbd_reraise_signal(signum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void kbd_unregister_emerg_cleanup()
|
static void kbd_unregister_emerg_cleanup(void)
|
||||||
{
|
{
|
||||||
int tabidx;
|
int tabidx;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef struct FcitxClient
|
||||||
|
|
||||||
static FcitxClient fcitx_client;
|
static FcitxClient fcitx_client;
|
||||||
|
|
||||||
static char *GetAppName()
|
static char *GetAppName(void)
|
||||||
{
|
{
|
||||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||||
char *spot;
|
char *spot;
|
||||||
|
@ -367,7 +367,7 @@ static Uint32 Fcitx_ModState(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_bool
|
SDL_bool
|
||||||
SDL_Fcitx_Init()
|
SDL_Fcitx_Init(void)
|
||||||
{
|
{
|
||||||
fcitx_client.dbus = SDL_DBus_GetContext();
|
fcitx_client.dbus = SDL_DBus_GetContext();
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ SDL_Fcitx_Init()
|
||||||
return FcitxClientCreateIC(&fcitx_client);
|
return FcitxClientCreateIC(&fcitx_client);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_Fcitx_Quit()
|
void SDL_Fcitx_Quit(void)
|
||||||
{
|
{
|
||||||
FcitxClientICCallMethod(&fcitx_client, "DestroyIC");
|
FcitxClientICCallMethod(&fcitx_client, "DestroyIC");
|
||||||
if (fcitx_client.ic_path) {
|
if (fcitx_client.ic_path) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ static SDL_IME_ProcessKeyEvent_t SDL_IME_ProcessKeyEvent_Real = NULL;
|
||||||
static SDL_IME_UpdateTextRect_t SDL_IME_UpdateTextRect_Real = NULL;
|
static SDL_IME_UpdateTextRect_t SDL_IME_UpdateTextRect_Real = NULL;
|
||||||
static SDL_IME_PumpEvents_t SDL_IME_PumpEvents_Real = NULL;
|
static SDL_IME_PumpEvents_t SDL_IME_PumpEvents_Real = NULL;
|
||||||
|
|
||||||
static void InitIME()
|
static void InitIME(void)
|
||||||
{
|
{
|
||||||
static SDL_bool inited = SDL_FALSE;
|
static SDL_bool inited = SDL_FALSE;
|
||||||
#ifdef HAVE_FCITX
|
#ifdef HAVE_FCITX
|
||||||
|
@ -144,7 +144,7 @@ void SDL_IME_UpdateTextRect(const SDL_Rect *rect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_IME_PumpEvents()
|
void SDL_IME_PumpEvents(void)
|
||||||
{
|
{
|
||||||
if (SDL_IME_PumpEvents_Real) {
|
if (SDL_IME_PumpEvents_Real) {
|
||||||
SDL_IME_PumpEvents_Real();
|
SDL_IME_PumpEvents_Real();
|
||||||
|
|
|
@ -74,7 +74,7 @@ static SDL_bool realtime_portal_supported(DBusConnection *conn)
|
||||||
"RTTimeUSecMax", DBUS_TYPE_INT64, &res);
|
"RTTimeUSecMax", DBUS_TYPE_INT64, &res);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_rtkit_interface()
|
static void set_rtkit_interface(void)
|
||||||
{
|
{
|
||||||
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ static void set_rtkit_interface()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static DBusConnection *get_rtkit_dbus_connection()
|
static DBusConnection *get_rtkit_dbus_connection(void)
|
||||||
{
|
{
|
||||||
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ static DBusConnection *get_rtkit_dbus_connection()
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtkit_initialize()
|
static void rtkit_initialize(void)
|
||||||
{
|
{
|
||||||
DBusConnection *dbus_conn;
|
DBusConnection *dbus_conn;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ static void rtkit_initialize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_bool rtkit_initialize_realtime_thread()
|
static SDL_bool rtkit_initialize_realtime_thread(void)
|
||||||
{
|
{
|
||||||
// Following is an excerpt from rtkit README that outlines the requirements
|
// Following is an excerpt from rtkit README that outlines the requirements
|
||||||
// a thread must meet before making rtkit requests:
|
// a thread must meet before making rtkit requests:
|
||||||
|
|
|
@ -665,7 +665,7 @@ static void SDL_CutEvent(SDL_EventEntry *entry)
|
||||||
SDL_AtomicAdd(&SDL_EventQ.count, -1);
|
SDL_AtomicAdd(&SDL_EventQ.count, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SDL_SendWakeupEvent()
|
static int SDL_SendWakeupEvent(void)
|
||||||
{
|
{
|
||||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||||
if (_this == NULL || !_this->SendWakeupEvent) {
|
if (_this == NULL || !_this->SendWakeupEvent) {
|
||||||
|
@ -875,7 +875,7 @@ static void SDL_PumpEventsInternal(SDL_bool push_sentinel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_PumpEvents()
|
void SDL_PumpEvents(void)
|
||||||
{
|
{
|
||||||
SDL_PumpEventsInternal(SDL_FALSE);
|
SDL_PumpEventsInternal(SDL_FALSE);
|
||||||
}
|
}
|
||||||
|
@ -887,7 +887,7 @@ int SDL_PollEvent(SDL_Event *event)
|
||||||
return SDL_WaitEventTimeoutNS(event, 0);
|
return SDL_WaitEventTimeoutNS(event, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_bool SDL_events_need_periodic_poll()
|
static SDL_bool SDL_events_need_periodic_poll(void)
|
||||||
{
|
{
|
||||||
SDL_bool need_periodic_poll = SDL_FALSE;
|
SDL_bool need_periodic_poll = SDL_FALSE;
|
||||||
|
|
||||||
|
@ -970,7 +970,7 @@ static int SDL_WaitEventTimeout_Device(_THIS, SDL_Window *wakeup_window, SDL_Eve
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_bool SDL_events_need_polling()
|
static SDL_bool SDL_events_need_polling(void)
|
||||||
{
|
{
|
||||||
SDL_bool need_polling = SDL_FALSE;
|
SDL_bool need_polling = SDL_FALSE;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "SDL_keyboard_c.h"
|
#include "SDL_keyboard_c.h"
|
||||||
#include "SDL_scancode_tables_c.h"
|
#include "SDL_scancode_tables_c.h"
|
||||||
|
#include "SDL_keysym_to_scancode_c.h"
|
||||||
|
|
||||||
/* *INDENT-OFF* */ /* clang-format off */
|
/* *INDENT-OFF* */ /* clang-format off */
|
||||||
static const struct {
|
static const struct {
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ int SDL_SetRelativeMouseMode(SDL_bool enabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_bool
|
SDL_bool
|
||||||
SDL_GetRelativeMouseMode()
|
SDL_GetRelativeMouseMode(void)
|
||||||
{
|
{
|
||||||
SDL_Mouse *mouse = SDL_GetMouse();
|
SDL_Mouse *mouse = SDL_GetMouse();
|
||||||
|
|
||||||
|
|
|
@ -1804,7 +1804,7 @@ char *SDL_GetGamepadMapping(SDL_Gamepad *gamepad)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SDL_LoadGamepadHints()
|
static void SDL_LoadGamepadHints(void)
|
||||||
{
|
{
|
||||||
const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERCONFIG);
|
const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERCONFIG);
|
||||||
if (hint && hint[0]) {
|
if (hint && hint[0]) {
|
||||||
|
|
|
@ -196,7 +196,7 @@ static SDL_bool SDL_GetDriverAndJoystickIndex(SDL_JoystickID instance_id, SDL_Jo
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SDL_FindFreePlayerIndex()
|
static int SDL_FindFreePlayerIndex(void)
|
||||||
{
|
{
|
||||||
int player_index;
|
int player_index;
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ SDL_JoystickID *SDL_GetJoysticks(int *count)
|
||||||
* Return the next available joystick instance ID
|
* Return the next available joystick instance ID
|
||||||
* This may be called by drivers from multiple threads, unprotected by any locks
|
* This may be called by drivers from multiple threads, unprotected by any locks
|
||||||
*/
|
*/
|
||||||
SDL_JoystickID SDL_GetNextJoystickInstanceID()
|
SDL_JoystickID SDL_GetNextJoystickInstanceID(void)
|
||||||
{
|
{
|
||||||
return SDL_AtomicIncRef(&SDL_last_joystick_instance_id) + 1;
|
return SDL_AtomicIncRef(&SDL_last_joystick_instance_id) + 1;
|
||||||
}
|
}
|
||||||
|
@ -1319,7 +1319,7 @@ void SDL_QuitJoysticks(void)
|
||||||
SDL_UnlockJoysticks();
|
SDL_UnlockJoysticks();
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent()
|
static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent(void)
|
||||||
{
|
{
|
||||||
if (SDL_joystick_allows_background_events) {
|
if (SDL_joystick_allows_background_events) {
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
|
@ -1726,7 +1726,7 @@ void SDL_SetJoystickEventsEnabled(SDL_bool enabled)
|
||||||
#endif /* SDL_EVENTS_DISABLED */
|
#endif /* SDL_EVENTS_DISABLED */
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_bool SDL_JoystickEventsEnabled()
|
SDL_bool SDL_JoystickEventsEnabled(void)
|
||||||
{
|
{
|
||||||
SDL_bool enabled = SDL_FALSE;
|
SDL_bool enabled = SDL_FALSE;
|
||||||
|
|
||||||
|
|
|
@ -377,7 +377,7 @@ const char *GLES2_GetShaderInclude(GLES2_ShaderIncludeType type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint()
|
GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint(void)
|
||||||
{
|
{
|
||||||
const char *texcoord_hint = SDL_GetHint("SDL_RENDER_OPENGLES2_TEXCOORD_PRECISION");
|
const char *texcoord_hint = SDL_GetHint("SDL_RENDER_OPENGLES2_TEXCOORD_PRECISION");
|
||||||
GLES2_ShaderIncludeType value = GLES2_SHADER_FRAGMENT_INCLUDE_BEST_TEXCOORD_PRECISION;
|
GLES2_ShaderIncludeType value = GLES2_SHADER_FRAGMENT_INCLUDE_BEST_TEXCOORD_PRECISION;
|
||||||
|
|
|
@ -149,7 +149,7 @@ SDL_SensorID *SDL_GetSensors(int *count)
|
||||||
* Return the next available sensor instance ID
|
* Return the next available sensor instance ID
|
||||||
* This may be called by drivers from multiple threads, unprotected by any locks
|
* This may be called by drivers from multiple threads, unprotected by any locks
|
||||||
*/
|
*/
|
||||||
SDL_SensorID SDL_GetNextSensorInstanceID()
|
SDL_SensorID SDL_GetNextSensorInstanceID(void)
|
||||||
{
|
{
|
||||||
return SDL_AtomicIncRef(&SDL_last_sensor_instance_id) + 1;
|
return SDL_AtomicIncRef(&SDL_last_sensor_instance_id) + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription,
|
||||||
/*
|
/*
|
||||||
* Resets the assert summary counters to zero.
|
* Resets the assert summary counters to zero.
|
||||||
*/
|
*/
|
||||||
void SDLTest_ResetAssertSummary()
|
void SDLTest_ResetAssertSummary(void)
|
||||||
{
|
{
|
||||||
SDLTest_AssertsPassed = 0;
|
SDLTest_AssertsPassed = 0;
|
||||||
SDLTest_AssertsFailed = 0;
|
SDLTest_AssertsFailed = 0;
|
||||||
|
@ -114,7 +114,7 @@ void SDLTest_ResetAssertSummary()
|
||||||
* Logs summary of all assertions (total, pass, fail) since last reset
|
* Logs summary of all assertions (total, pass, fail) since last reset
|
||||||
* as INFO (failed==0) or ERROR (failed > 0).
|
* as INFO (failed==0) or ERROR (failed > 0).
|
||||||
*/
|
*/
|
||||||
void SDLTest_LogAssertSummary()
|
void SDLTest_LogAssertSummary(void)
|
||||||
{
|
{
|
||||||
int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
|
int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
|
||||||
if (SDLTest_AssertsFailed == 0) {
|
if (SDLTest_AssertsFailed == 0) {
|
||||||
|
@ -127,7 +127,7 @@ void SDLTest_LogAssertSummary()
|
||||||
/*
|
/*
|
||||||
* Converts the current assert state into a test result
|
* Converts the current assert state into a test result
|
||||||
*/
|
*/
|
||||||
int SDLTest_AssertSummaryToTestResult()
|
int SDLTest_AssertSummaryToTestResult(void)
|
||||||
{
|
{
|
||||||
if (SDLTest_AssertsFailed > 0) {
|
if (SDLTest_AssertsFailed > 0) {
|
||||||
return TEST_RESULT_FAILED;
|
return TEST_RESULT_FAILED;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "../SDL_error_c.h"
|
#include "../SDL_error_c.h"
|
||||||
|
|
||||||
SDL_TLSID
|
SDL_TLSID
|
||||||
SDL_TLSCreate()
|
SDL_TLSCreate(void)
|
||||||
{
|
{
|
||||||
static SDL_atomic_t SDL_tls_id;
|
static SDL_atomic_t SDL_tls_id;
|
||||||
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
|
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
|
||||||
|
@ -78,7 +78,7 @@ int SDL_TLSSet(SDL_TLSID id, const void *value, void(SDLCALL *destructor)(void *
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_TLSCleanup()
|
void SDL_TLSCleanup(void)
|
||||||
{
|
{
|
||||||
SDL_TLSData *storage;
|
SDL_TLSData *storage;
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ int SDL_Generic_SetTLSData(SDL_TLSData *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Non-thread-safe global error variable */
|
/* Non-thread-safe global error variable */
|
||||||
static SDL_error *SDL_GetStaticErrBuf()
|
static SDL_error *SDL_GetStaticErrBuf(void)
|
||||||
{
|
{
|
||||||
static SDL_error SDL_global_error;
|
static SDL_error SDL_global_error;
|
||||||
static char SDL_global_error_str[128];
|
static char SDL_global_error_str[128];
|
||||||
|
|
|
@ -102,7 +102,7 @@ static int SDLCALL SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect,
|
||||||
#ifdef __MACOS__
|
#ifdef __MACOS__
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
static SDL_bool SDL_UseAltivecPrefetch()
|
static SDL_bool SDL_UseAltivecPrefetch(void)
|
||||||
{
|
{
|
||||||
const char key[] = "hw.l3cachesize";
|
const char key[] = "hw.l3cachesize";
|
||||||
u_int64_t result = 0;
|
u_int64_t result = 0;
|
||||||
|
@ -115,7 +115,7 @@ static SDL_bool SDL_UseAltivecPrefetch()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static SDL_bool SDL_UseAltivecPrefetch()
|
static SDL_bool SDL_UseAltivecPrefetch(void)
|
||||||
{
|
{
|
||||||
/* Just guess G4 */
|
/* Just guess G4 */
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
|
|
@ -362,7 +362,7 @@ static void printf_128(const char *str, __m128i var)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static SDL_INLINE int hasSSE2()
|
static SDL_INLINE int hasSSE2(void)
|
||||||
{
|
{
|
||||||
static int val = -1;
|
static int val = -1;
|
||||||
if (val != -1) {
|
if (val != -1) {
|
||||||
|
@ -531,7 +531,7 @@ static int scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch,
|
||||||
|
|
||||||
#if defined(HAVE_NEON_INTRINSICS)
|
#if defined(HAVE_NEON_INTRINSICS)
|
||||||
|
|
||||||
static SDL_INLINE int hasNEON()
|
static SDL_INLINE int hasNEON(void)
|
||||||
{
|
{
|
||||||
static int val = -1;
|
static int val = -1;
|
||||||
if (val != -1) {
|
if (val != -1) {
|
||||||
|
|
|
@ -3285,7 +3285,7 @@ void SDL_DestroyWindow(SDL_Window *window)
|
||||||
SDL_free(window);
|
SDL_free(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_bool SDL_ScreenSaverEnabled()
|
SDL_bool SDL_ScreenSaverEnabled(void)
|
||||||
{
|
{
|
||||||
if (_this == NULL) {
|
if (_this == NULL) {
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
|
@ -3293,7 +3293,7 @@ SDL_bool SDL_ScreenSaverEnabled()
|
||||||
return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE;
|
return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SDL_EnableScreenSaver()
|
int SDL_EnableScreenSaver(void)
|
||||||
{
|
{
|
||||||
if (_this == NULL) {
|
if (_this == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3309,7 +3309,7 @@ int SDL_EnableScreenSaver()
|
||||||
return SDL_Unsupported();
|
return SDL_Unsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SDL_DisableScreenSaver()
|
int SDL_DisableScreenSaver(void)
|
||||||
{
|
{
|
||||||
if (_this == NULL) {
|
if (_this == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3594,7 +3594,7 @@ void SDL_EGL_SetEGLAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribC
|
||||||
_this->egl_contextattrib_callback = contextAttribCallback;
|
_this->egl_contextattrib_callback = contextAttribCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_GL_ResetAttributes()
|
void SDL_GL_ResetAttributes(void)
|
||||||
{
|
{
|
||||||
if (_this == NULL) {
|
if (_this == NULL) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -38,7 +38,7 @@ void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)
|
||||||
SDL_YUV_ConversionMode = mode;
|
SDL_YUV_ConversionMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode()
|
SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode(void)
|
||||||
{
|
{
|
||||||
return SDL_YUV_ConversionMode;
|
return SDL_YUV_ConversionMode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ VideoBootStrap DUMMY_evdev_bootstrap = {
|
||||||
DUMMY_CreateDevice
|
DUMMY_CreateDevice
|
||||||
};
|
};
|
||||||
void SDL_EVDEV_Init(void);
|
void SDL_EVDEV_Init(void);
|
||||||
void SDL_EVDEV_Poll();
|
void SDL_EVDEV_Poll(void);
|
||||||
void SDL_EVDEV_Quit(void);
|
void SDL_EVDEV_Quit(void);
|
||||||
static void DUMMY_EVDEV_Poll(_THIS)
|
static void DUMMY_EVDEV_Poll(_THIS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,7 +179,7 @@ static struct wl_surface *touch_surface(SDL_TouchID id)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint64 Wayland_GetEventTimestamp(Uint64 nsTimestamp)
|
static Uint64 Wayland_GetEventTimestamp(Uint64 nsTimestamp)
|
||||||
{
|
{
|
||||||
static Uint64 last;
|
static Uint64 last;
|
||||||
static Uint64 timestamp_offset;
|
static Uint64 timestamp_offset;
|
||||||
|
@ -2328,7 +2328,7 @@ static void tablet_tool_handle_proximity_out(void *data, struct zwp_tablet_tool_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput *input)
|
static uint32_t tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput *input)
|
||||||
{
|
{
|
||||||
unsigned int tool_btn = input->btn_stylus3 << 2 | input->btn_stylus2 << 1 | input->btn_stylus << 0;
|
unsigned int tool_btn = input->btn_stylus3 << 2 | input->btn_stylus2 << 1 | input->btn_stylus << 0;
|
||||||
switch (tool_btn) {
|
switch (tool_btn) {
|
||||||
|
@ -2477,7 +2477,7 @@ static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = {
|
||||||
tablet_tool_handle_frame
|
tablet_tool_handle_frame
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object)
|
static struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object)
|
||||||
{
|
{
|
||||||
struct SDL_WaylandTabletObjectListNode *node;
|
struct SDL_WaylandTabletObjectListNode *node;
|
||||||
|
|
||||||
|
@ -2492,7 +2492,7 @@ struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, void *object)
|
static void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, void *object)
|
||||||
{
|
{
|
||||||
if (head->object == NULL) {
|
if (head->object == NULL) {
|
||||||
head->object = object;
|
head->object = object;
|
||||||
|
@ -2506,7 +2506,7 @@ void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, voi
|
||||||
head->next = tablet_object_list_new_node(object);
|
head->next = tablet_object_list_new_node(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode *head, void (*deleter)(void *object))
|
static void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode *head, void (*deleter)(void *object))
|
||||||
{
|
{
|
||||||
while (head) {
|
while (head) {
|
||||||
struct SDL_WaylandTabletObjectListNode *next = head->next;
|
struct SDL_WaylandTabletObjectListNode *next = head->next;
|
||||||
|
|
|
@ -448,7 +448,7 @@ static SDL_Cursor *Wayland_CreateSystemCursor(SDL_SystemCursor id)
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_Cursor *Wayland_CreateDefaultCursor()
|
static SDL_Cursor *Wayland_CreateDefaultCursor(void)
|
||||||
{
|
{
|
||||||
return Wayland_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
|
return Wayland_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_array_flags, (struct wl_proxy
|
||||||
|
|
||||||
#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */
|
#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */
|
||||||
#if SDL_WAYLAND_CHECK_VERSION(broken, on, purpose)
|
#if SDL_WAYLAND_CHECK_VERSION(broken, on, purpose)
|
||||||
SDL_WAYLAND_SYM(int, wl_display_reconnect, (struct wl_display*));
|
SDL_WAYLAND_SYM(int, wl_display_reconnect, (struct wl_display*))
|
||||||
#endif
|
#endif
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ SDL_WAYLAND_SYM(int, xkb_state_key_get_syms, (struct xkb_state *, xkb_keycode_t,
|
||||||
SDL_WAYLAND_SYM(int, xkb_keysym_to_utf8, (xkb_keysym_t, char *, size_t) )
|
SDL_WAYLAND_SYM(int, xkb_keysym_to_utf8, (xkb_keysym_t, char *, size_t) )
|
||||||
SDL_WAYLAND_SYM(struct xkb_keymap *, xkb_keymap_new_from_string, (struct xkb_context *, const char *, enum xkb_keymap_format, enum xkb_keymap_compile_flags))
|
SDL_WAYLAND_SYM(struct xkb_keymap *, xkb_keymap_new_from_string, (struct xkb_context *, const char *, enum xkb_keymap_format, enum xkb_keymap_compile_flags))
|
||||||
SDL_WAYLAND_SYM(struct xkb_state *, xkb_state_new, (struct xkb_keymap *) )
|
SDL_WAYLAND_SYM(struct xkb_state *, xkb_state_new, (struct xkb_keymap *) )
|
||||||
SDL_WAYLAND_SYM(int, xkb_keymap_key_repeats, (struct xkb_keymap *keymap, xkb_keycode_t key) );
|
SDL_WAYLAND_SYM(int, xkb_keymap_key_repeats, (struct xkb_keymap *keymap, xkb_keycode_t key) )
|
||||||
SDL_WAYLAND_SYM(void, xkb_keymap_unref, (struct xkb_keymap *) )
|
SDL_WAYLAND_SYM(void, xkb_keymap_unref, (struct xkb_keymap *) )
|
||||||
SDL_WAYLAND_SYM(void, xkb_state_unref, (struct xkb_state *) )
|
SDL_WAYLAND_SYM(void, xkb_state_unref, (struct xkb_state *) )
|
||||||
SDL_WAYLAND_SYM(void, xkb_context_unref, (struct xkb_context *) )
|
SDL_WAYLAND_SYM(void, xkb_context_unref, (struct xkb_context *) )
|
||||||
|
|
|
@ -71,7 +71,7 @@ static void Wayland_VideoQuit(_THIS);
|
||||||
|
|
||||||
/* Find out what class name we should use
|
/* Find out what class name we should use
|
||||||
* Based on src/video/x11/SDL_x11video.c */
|
* Based on src/video/x11/SDL_x11video.c */
|
||||||
static char *get_classname()
|
static char *get_classname(void)
|
||||||
{
|
{
|
||||||
/* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec:
|
/* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec:
|
||||||
"The surface class identifies the general class of applications
|
"The surface class identifies the general class of applications
|
||||||
|
|
|
@ -1474,7 +1474,7 @@ int Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_preferred_scale_changed(void *data,
|
static void handle_preferred_scale_changed(void *data,
|
||||||
struct wp_fractional_scale_v1 *wp_fractional_scale_v1,
|
struct wp_fractional_scale_v1 *wp_fractional_scale_v1,
|
||||||
uint preferred_scale)
|
uint preferred_scale)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ static Display *GetDisplay(void)
|
||||||
return SDL_GetVideoDevice()->driverdata->display;
|
return SDL_GetVideoDevice()->driverdata->display;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Cursor X11_CreateEmptyCursor()
|
static Cursor X11_CreateEmptyCursor(void)
|
||||||
{
|
{
|
||||||
if (x11_empty_cursor == None) {
|
if (x11_empty_cursor == None) {
|
||||||
Display *display = GetDisplay();
|
Display *display = GetDisplay();
|
||||||
|
@ -65,7 +65,7 @@ static void X11_DestroyEmptyCursor(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_Cursor *X11_CreateDefaultCursor()
|
static SDL_Cursor *X11_CreateDefaultCursor(void)
|
||||||
{
|
{
|
||||||
SDL_Cursor *cursor;
|
SDL_Cursor *cursor;
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ SDL_X11_SYM(Bool,XIWarpPointer,(Display *a,int b,Window c,Window d,double e,doub
|
||||||
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
||||||
SDL_X11_MODULE(XRANDR)
|
SDL_X11_MODULE(XRANDR)
|
||||||
SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
|
SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
|
||||||
SDL_X11_SYM(Bool,XRRQueryExtension,(Display *dpy,int *event_base_return,int *error_base_return),(dpy,event_base_return,error_base_return),return);
|
SDL_X11_SYM(Bool,XRRQueryExtension,(Display *dpy,int *event_base_return,int *error_base_return),(dpy,event_base_return,error_base_return),return)
|
||||||
SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
|
SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
|
||||||
SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
|
SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
|
||||||
SDL_X11_SYM(short,XRRConfigCurrentRate,(XRRScreenConfiguration *config),(config),return)
|
SDL_X11_SYM(short,XRRConfigCurrentRate,(XRRScreenConfiguration *config),(config),return)
|
||||||
|
|
|
@ -45,7 +45,7 @@ static int X11_VideoInit(_THIS);
|
||||||
static void X11_VideoQuit(_THIS);
|
static void X11_VideoQuit(_THIS);
|
||||||
|
|
||||||
/* Find out what class name we should use */
|
/* Find out what class name we should use */
|
||||||
static char *get_classname()
|
static char *get_classname(void)
|
||||||
{
|
{
|
||||||
char *spot;
|
char *spot;
|
||||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||||
|
|
|
@ -64,7 +64,7 @@ void X11_InitXfixes(_THIS)
|
||||||
xfixes_initialized = 1;
|
xfixes_initialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int X11_XfixesIsInitialized()
|
int X11_XfixesIsInitialized(void)
|
||||||
{
|
{
|
||||||
return xfixes_initialized;
|
return xfixes_initialized;
|
||||||
}
|
}
|
||||||
|
|
|
@ -451,7 +451,7 @@ void X11_Xinput2SelectTouch(_THIS, SDL_Window *window)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int X11_Xinput2IsInitialized()
|
int X11_Xinput2IsInitialized(void)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_X11_XINPUT2
|
#if SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||||
return xinput2_initialized;
|
return xinput2_initialized;
|
||||||
|
@ -460,7 +460,7 @@ int X11_Xinput2IsInitialized()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int X11_Xinput2IsMultitouchSupported()
|
int X11_Xinput2IsMultitouchSupported(void)
|
||||||
{
|
{
|
||||||
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||||
return xinput2_initialized && xinput2_multitouch_supported;
|
return xinput2_initialized && xinput2_multitouch_supported;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue