mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
update sdl to 2.32.6
This commit is contained in:
parent
e557f5962b
commit
ddc1f8c1e2
1339 changed files with 53966 additions and 19207 deletions
|
|
@ -870,3 +870,5 @@
|
|||
# ++'_SDL_GDKSuspendComplete'.'SDL2.dll'.'SDL_GDKSuspendComplete'
|
||||
++'_SDL_HasWindowSurface'.'SDL2.dll'.'SDL_HasWindowSurface'
|
||||
++'_SDL_DestroyWindowSurface'.'SDL2.dll'.'SDL_DestroyWindowSurface'
|
||||
# ++'_SDL_GDKGetDefaultUser'.'SDL2.dll'.'SDL_GDKGetDefaultUser'
|
||||
++'_SDL_GameControllerGetSteamHandle'.'SDL2.dll'.'SDL_GameControllerGetSteamHandle'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -195,7 +195,7 @@ static SDL_DYNAPI_jump_table jump_table = {
|
|||
SDL_InitDynamicAPI(); \
|
||||
ret jump_table.fn args; \
|
||||
}
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS 1
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
#undef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
|
|
@ -212,7 +212,7 @@ SDL_DYNAPI_VARARGS(static, _DEFAULT, SDL_InitDynamicAPI())
|
|||
{ \
|
||||
ret jump_table.fn args; \
|
||||
}
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS 1
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
#undef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
|
|
@ -295,7 +295,7 @@ SDL_DYNAPI_VARARGS_LOGFN_LOGSDLCALLS(Error, ERROR)
|
|||
SDL_DYNAPI_VARARGS_LOGFN_LOGSDLCALLS(Critical, CRITICAL)
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
|
||||
rc SDLCALL fn##_LOGSDLCALLS params { SDL_Log_REAL("SDL2CALL %s", #fn); ret fn##_REAL args; }
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS 1
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
#undef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
|
|
@ -372,7 +372,7 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
|||
void *retval = NULL;
|
||||
if (lib) {
|
||||
retval = (void *) GetProcAddress(lib, sym);
|
||||
if (retval == NULL) {
|
||||
if (!retval) {
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
}
|
||||
|
|
@ -385,9 +385,9 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
|||
{
|
||||
void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
|
||||
void *retval = NULL;
|
||||
if (lib != NULL) {
|
||||
if (lib) {
|
||||
retval = dlsym(lib, sym);
|
||||
if (retval == NULL) {
|
||||
if (!retval) {
|
||||
dlclose(lib);
|
||||
}
|
||||
}
|
||||
|
|
@ -440,10 +440,24 @@ extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
|
|||
|
||||
static void SDL_InitDynamicAPILocked(void)
|
||||
{
|
||||
char *libname = SDL_getenv_REAL(SDL_DYNAMIC_API_ENVVAR);
|
||||
SDL_DYNAPI_ENTRYFN entry = NULL; /* funcs from here by default. */
|
||||
SDL_bool use_internal = SDL_TRUE;
|
||||
|
||||
/* this can't use SDL_getenv_REAL, because it might allocate memory before the app can set their allocator */
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
||||
/* We've always used LoadLibraryA for this, so this has never worked with Unicode paths on Windows. Sorry. */
|
||||
char envbuf[512]; /* overflows will just report as environment variable being unset, but LoadLibraryA has a MAX_PATH of 260 anyhow, apparently. */
|
||||
const DWORD rc = GetEnvironmentVariableA(SDL_DYNAMIC_API_ENVVAR, envbuf, (DWORD) sizeof (envbuf));
|
||||
char *libname = ((rc != 0) && (rc < sizeof (envbuf))) ? envbuf : NULL;
|
||||
#elif defined(__OS2__)
|
||||
char * libname;
|
||||
if (DosScanEnv(SDL_DYNAMIC_API_ENVVAR, &libname) != NO_ERROR) {
|
||||
libname = NULL;
|
||||
}
|
||||
#else
|
||||
char *libname = getenv(SDL_DYNAMIC_API_ENVVAR);
|
||||
#endif
|
||||
|
||||
if (libname) {
|
||||
while (*libname && !entry) {
|
||||
char *ptr = libname;
|
||||
|
|
@ -505,7 +519,7 @@ static void SDL_InitDynamicAPI(void)
|
|||
/* SDL_AtomicLock calls SDL mutex functions to emulate if
|
||||
SDL_ATOMIC_DISABLED, which we can't do here, so in such a
|
||||
configuration, you're on your own. */
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
#ifndef SDL_ATOMIC_DISABLED
|
||||
static SDL_SpinLock lock = 0;
|
||||
SDL_AtomicLock_REAL(&lock);
|
||||
#endif
|
||||
|
|
@ -515,7 +529,7 @@ static void SDL_InitDynamicAPI(void)
|
|||
already_initialized = SDL_TRUE;
|
||||
}
|
||||
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
#ifndef SDL_ATOMIC_DISABLED
|
||||
SDL_AtomicUnlock_REAL(&lock);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__PS2__) && __PS2__
|
||||
#elif defined(__PS2__)
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__PSP__) && __PSP__
|
||||
#define SDL_DYNAMIC_API 0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -896,3 +896,5 @@
|
|||
#define SDL_GDKSuspendComplete SDL_GDKSuspendComplete_REAL
|
||||
#define SDL_HasWindowSurface SDL_HasWindowSurface_REAL
|
||||
#define SDL_DestroyWindowSurface SDL_DestroyWindowSurface_REAL
|
||||
#define SDL_GDKGetDefaultUser SDL_GDKGetDefaultUser_REAL
|
||||
#define SDL_GameControllerGetSteamHandle SDL_GameControllerGetSteamHandle_REAL
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/* direct jump magic can use these, the rest needs special code. */
|
||||
#if !SDL_DYNAPI_PROC_NO_VARARGS
|
||||
#ifndef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
SDL_DYNAPI_PROC(int,SDL_SetError,(SDL_PRINTF_FORMAT_STRING const char *a, ...),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Log,(SDL_PRINTF_FORMAT_STRING const char *a, ...),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogVerbose,(int a, SDL_PRINTF_FORMAT_STRING const char *b, ...),(a,b),)
|
||||
|
|
@ -73,7 +73,7 @@ SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),
|
|||
#endif
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
SDL_DYNAPI_PROC(int,SDL_iPhoneSetAnimationCallback,(SDL_Window *a, int b, void (SDLCALL *c)(void *), void *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_iPhoneSetAnimationCallback,(SDL_Window *a, int b, SDL_iOSAnimationCallback c, void *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_iPhoneSetEventPump,(SDL_bool a),(a),)
|
||||
#endif
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ SDL_DYNAPI_PROC(void*,SDL_realloc,(void *a, size_t b),(a,b),return)
|
|||
SDL_DYNAPI_PROC(void,SDL_free,(void *a),(a),)
|
||||
SDL_DYNAPI_PROC(char*,SDL_getenv,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_setenv,(const char *a, const char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, int (SDLCALL *d)(const void *, const void *)),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, SDL_CompareCallback d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(int,SDL_abs,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_isdigit,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_isspace,(int a),(a),return)
|
||||
|
|
@ -511,7 +511,7 @@ SDL_DYNAPI_PROC(void,SDL_WaitThread,(SDL_Thread *a, int *b),(a,b),)
|
|||
SDL_DYNAPI_PROC(void,SDL_DetachThread,(SDL_Thread *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_TLSID,SDL_TLSCreate,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_TLSGet,(SDL_TLSID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_TLSSet,(SDL_TLSID a, const void *b, void (SDLCALL *c)(void*)),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_TLSSet,(SDL_TLSID a, const void *b, SDL_TLSDestructorCallback c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetTicks,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceCounter,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceFrequency,(void),(),return)
|
||||
|
|
@ -888,7 +888,7 @@ SDL_DYNAPI_PROC(void*,SDL_GetTextureUserData,(SDL_Texture *a),(a),return)
|
|||
SDL_DYNAPI_PROC(int,SDL_RenderGeometry,(SDL_Renderer *a, SDL_Texture *b, const SDL_Vertex *c, int d, const int *e, int f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderGeometryRaw,(SDL_Renderer *a, SDL_Texture *b, const float *c, int d, const SDL_Color *e, int f, const float *g, int h, int i, const void *j, int k, int l),(a,b,c,d,e,f,g,h,i,j,k,l),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderSetVSync,(SDL_Renderer *a, int b),(a,b),return)
|
||||
#if !SDL_DYNAPI_PROC_NO_VARARGS
|
||||
#ifndef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
SDL_DYNAPI_PROC(int,SDL_asprintf,(char **a, SDL_PRINTF_FORMAT_STRING const char *b, ...),(a,b),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(int,SDL_vasprintf,(char **a, const char *b, va_list c),(a,b,c),return)
|
||||
|
|
@ -939,7 +939,7 @@ SDL_DYNAPI_PROC(void,SDL_UnionFRect,(const SDL_FRect *a, const SDL_FRect *b, SDL
|
|||
SDL_DYNAPI_PROC(SDL_bool,SDL_EncloseFPoints,(const SDL_FPoint *a, int b, const SDL_FRect *c, SDL_FRect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectFRectAndLine,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_RenderGetWindow,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_bsearch,(const void *a, const void *b, size_t c, size_t d, int (SDLCALL *e)(const void *, const void *)),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_bsearch,(const void *a, const void *b, size_t c, size_t d, SDL_CompareCallback e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerPathForIndex,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerPath,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_JoystickPathForIndex,(int a),(a),return)
|
||||
|
|
@ -981,3 +981,7 @@ SDL_DYNAPI_PROC(void,SDL_GDKSuspendComplete,(void),(),)
|
|||
#endif
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasWindowSurface,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_DestroyWindowSurface,(SDL_Window *a),(a),return)
|
||||
#if defined(__GDK__)
|
||||
SDL_DYNAPI_PROC(int,SDL_GDKGetDefaultUser,(XUserHandle *a),(a),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GameControllerGetSteamHandle,(SDL_GameController *a),(a),return)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
# Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -50,8 +50,13 @@ open(SDL_DYNAPI_PROCS_H, '>>', $sdl_dynapi_procs_h) or die("Can't open $sdl_dyna
|
|||
open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n");
|
||||
open(SDL2_EXPORTS, '>>', $sdl2_exports) or die("Can't open $sdl2_exports: $!\n");
|
||||
|
||||
# Ordered for reproducible builds
|
||||
opendir(HEADERS, 'include') or die("Can't open include dir: $!\n");
|
||||
while (my $d = readdir(HEADERS)) {
|
||||
my @entries = readdir(HEADERS);
|
||||
closedir(HEADERS);
|
||||
# Sort the entries
|
||||
@entries = sort @entries;
|
||||
foreach my $d (@entries) {
|
||||
next if not $d =~ /\.h\Z/;
|
||||
my $header = "include/$d";
|
||||
open(HEADER, '<', $header) or die("Can't open $header: $!\n");
|
||||
|
|
@ -143,8 +148,6 @@ while (my $d = readdir(HEADERS)) {
|
|||
close(HEADER);
|
||||
}
|
||||
|
||||
closedir(HEADERS);
|
||||
|
||||
close(SDL_DYNAPI_PROCS_H);
|
||||
close(SDL_DYNAPI_OVERRIDES_H);
|
||||
close(SDL2_EXPORTS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue