early-access version 2281
This commit is contained in:
8
externals/SDL/src/dynapi/SDL_dynapi.c
vendored
8
externals/SDL/src/dynapi/SDL_dynapi.c
vendored
@@ -89,6 +89,12 @@ static void SDL_InitDynamicAPI(void);
|
||||
va_end(ap); \
|
||||
return retval; \
|
||||
} \
|
||||
_static int SDLCALL SDL_asprintf##name(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \
|
||||
int retval; va_list ap; initcall; va_start(ap, fmt); \
|
||||
retval = jump_table.SDL_vasprintf(strp, fmt, ap); \
|
||||
va_end(ap); \
|
||||
return retval; \
|
||||
} \
|
||||
_static void SDLCALL SDL_Log##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) { \
|
||||
va_list ap; initcall; va_start(ap, fmt); \
|
||||
jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \
|
||||
@@ -270,7 +276,7 @@ static void dynapi_warn(const char *msg)
|
||||
/* SDL_ShowSimpleMessageBox() is a too heavy for here. */
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
||||
MessageBoxA(NULL, msg, caption, MB_OK | MB_ICONERROR);
|
||||
#else
|
||||
#elif defined(HAVE_STDIO_H)
|
||||
fprintf(stderr, "\n\n%s\n%s\n\n", caption, msg);
|
||||
fflush(stderr);
|
||||
#endif
|
||||
|
2
externals/SDL/src/dynapi/SDL_dynapi.h
vendored
2
externals/SDL/src/dynapi/SDL_dynapi.h
vendored
@@ -59,6 +59,8 @@
|
||||
#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */
|
||||
#elif defined(__VITA__)
|
||||
#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */
|
||||
#elif defined(DYNAPI_NEEDS_DLOPEN) && !defined(HAVE_DLOPEN)
|
||||
#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */
|
||||
#endif
|
||||
|
||||
/* everyone else. This is where we turn on the API if nothing forced it off. */
|
||||
|
40
externals/SDL/src/dynapi/SDL_dynapi_overrides.h
vendored
40
externals/SDL/src/dynapi/SDL_dynapi_overrides.h
vendored
@@ -815,3 +815,43 @@
|
||||
#define SDL_GameControllerSendEffect SDL_GameControllerSendEffect_REAL
|
||||
#define SDL_JoystickSendEffect SDL_JoystickSendEffect_REAL
|
||||
#define SDL_GameControllerGetSensorDataRate SDL_GameControllerGetSensorDataRate_REAL
|
||||
#define SDL_SetTextureUserData SDL_SetTextureUserData_REAL
|
||||
#define SDL_GetTextureUserData SDL_GetTextureUserData_REAL
|
||||
#define SDL_RenderGeometry SDL_RenderGeometry_REAL
|
||||
#define SDL_RenderGeometryRaw SDL_RenderGeometryRaw_REAL
|
||||
#define SDL_RenderSetVSync SDL_RenderSetVSync_REAL
|
||||
#define SDL_asprintf SDL_asprintf_REAL
|
||||
#define SDL_vasprintf SDL_vasprintf_REAL
|
||||
#define SDL_GetWindowICCProfile SDL_GetWindowICCProfile_REAL
|
||||
#define SDL_GetTicks64 SDL_GetTicks64_REAL
|
||||
#define SDL_LinuxSetThreadPriorityAndPolicy SDL_LinuxSetThreadPriorityAndPolicy_REAL
|
||||
#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GameControllerGetAppleSFSymbolsNameForButton_REAL
|
||||
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_REAL
|
||||
#define SDL_hid_init SDL_hid_init_REAL
|
||||
#define SDL_hid_exit SDL_hid_exit_REAL
|
||||
#define SDL_hid_device_change_count SDL_hid_device_change_count_REAL
|
||||
#define SDL_hid_enumerate SDL_hid_enumerate_REAL
|
||||
#define SDL_hid_free_enumeration SDL_hid_free_enumeration_REAL
|
||||
#define SDL_hid_open SDL_hid_open_REAL
|
||||
#define SDL_hid_open_path SDL_hid_open_path_REAL
|
||||
#define SDL_hid_write SDL_hid_write_REAL
|
||||
#define SDL_hid_read_timeout SDL_hid_read_timeout_REAL
|
||||
#define SDL_hid_read SDL_hid_read_REAL
|
||||
#define SDL_hid_set_nonblocking SDL_hid_set_nonblocking_REAL
|
||||
#define SDL_hid_send_feature_report SDL_hid_send_feature_report_REAL
|
||||
#define SDL_hid_get_feature_report SDL_hid_get_feature_report_REAL
|
||||
#define SDL_hid_close SDL_hid_close_REAL
|
||||
#define SDL_hid_get_manufacturer_string SDL_hid_get_manufacturer_string_REAL
|
||||
#define SDL_hid_get_product_string SDL_hid_get_product_string_REAL
|
||||
#define SDL_hid_get_serial_number_string SDL_hid_get_serial_number_string_REAL
|
||||
#define SDL_hid_get_indexed_string SDL_hid_get_indexed_string_REAL
|
||||
#define SDL_SetWindowMouseRect SDL_SetWindowMouseRect_REAL
|
||||
#define SDL_GetWindowMouseRect SDL_GetWindowMouseRect_REAL
|
||||
#define SDL_RenderWindowToLogical SDL_RenderWindowToLogical_REAL
|
||||
#define SDL_RenderLogicalToWindow SDL_RenderLogicalToWindow_REAL
|
||||
#define SDL_JoystickHasRumble SDL_JoystickHasRumble_REAL
|
||||
#define SDL_JoystickHasRumbleTriggers SDL_JoystickHasRumbleTriggers_REAL
|
||||
#define SDL_GameControllerHasRumble SDL_GameControllerHasRumble_REAL
|
||||
#define SDL_GameControllerHasRumbleTriggers SDL_GameControllerHasRumbleTriggers_REAL
|
||||
#define SDL_hid_ble_scan SDL_hid_ble_scan_REAL
|
||||
#define SDL_PremultiplyAlpha SDL_PremultiplyAlpha_REAL
|
||||
|
46
externals/SDL/src/dynapi/SDL_dynapi_procs.h
vendored
46
externals/SDL/src/dynapi/SDL_dynapi_procs.h
vendored
@@ -63,7 +63,7 @@ SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(void *a, SDL_bool b),(a,b),return)
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
SDL_DYNAPI_PROC(int,SDL_RegisterApp,(char *a, Uint32 b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RegisterApp,(const char *a, Uint32 b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnregisterApp,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return)
|
||||
@@ -880,3 +880,47 @@ SDL_DYNAPI_PROC(int,SDL_FlashWindow,(SDL_Window *a, SDL_FlashOperation b),(a,b),
|
||||
SDL_DYNAPI_PROC(int,SDL_GameControllerSendEffect,(SDL_GameController *a, const void *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickSendEffect,(SDL_Joystick *a, const void *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_GameControllerGetSensorDataRate,(SDL_GameController *a, SDL_SensorType b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetTextureUserData,(SDL_Texture *a, void *b),(a,b),return)
|
||||
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 int *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
|
||||
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)
|
||||
SDL_DYNAPI_PROC(void*,SDL_GetWindowICCProfile,(SDL_Window *a, size_t *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetTicks64,(void),(),return)
|
||||
#ifdef __LINUX__
|
||||
SDL_DYNAPI_PROC(int,SDL_LinuxSetThreadPriorityAndPolicy,(Sint64 a, int b, int c),(a,b,c),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetAppleSFSymbolsNameForButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetAppleSFSymbolsNameForAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_init,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_exit,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_hid_device_change_count,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_hid_device_info*,SDL_hid_enumerate,(unsigned short a, unsigned short b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_hid_free_enumeration,(SDL_hid_device_info *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_hid_device*,SDL_hid_open,(unsigned short a, unsigned short b, const wchar_t *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_hid_device*,SDL_hid_open_path,(const char *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_write,(SDL_hid_device *a, const unsigned char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_read_timeout,(SDL_hid_device *a, unsigned char *b, size_t c, int d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_read,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_set_nonblocking,(SDL_hid_device *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_send_feature_report,(SDL_hid_device *a, const unsigned char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_get_feature_report,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_hid_close,(SDL_hid_device *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_get_manufacturer_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_get_product_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_get_serial_number_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_hid_get_indexed_string,(SDL_hid_device *a, int b, wchar_t *c, size_t d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowMouseRect,(SDL_Window *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const SDL_Rect*,SDL_GetWindowMouseRect,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderWindowToLogical,(SDL_Renderer *a, int b, int c, float *d, float *e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderLogicalToWindow,(SDL_Renderer *a, float b, float c, int *d, int *e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumble,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumbleTriggers,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasRumble,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasRumbleTriggers,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_hid_ble_scan,(SDL_bool a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_PremultiplyAlpha,(int a, int b, Uint32 c, const void *d, int e, Uint32 f, void *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
|
10
externals/SDL/src/dynapi/gendynapi.pl
vendored
10
externals/SDL/src/dynapi/gendynapi.pl
vendored
@@ -55,7 +55,7 @@ while (my $d = readdir(HEADERS)) {
|
||||
open(HEADER, '<', $header) or die("Can't open $header: $!\n");
|
||||
while (<HEADER>) {
|
||||
chomp;
|
||||
next if not /\A\s*extern\s+DECLSPEC/;
|
||||
next if not /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/;
|
||||
my $decl = "$_ ";
|
||||
if (not $decl =~ /\)\s*;/) {
|
||||
while (<HEADER>) {
|
||||
@@ -70,13 +70,13 @@ while (my $d = readdir(HEADERS)) {
|
||||
$decl =~ s/\s+\Z//;
|
||||
#print("DECL: [$decl]\n");
|
||||
|
||||
if ($decl =~ /\A\s*extern\s+DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
my $rc = "$1$2$3$4";
|
||||
my $fn = $5;
|
||||
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
my $rc = "$2$3$4$5";
|
||||
my $fn = $6;
|
||||
|
||||
next if $existing{$fn}; # already slotted into the jump table.
|
||||
|
||||
my @params = split(',', $6);
|
||||
my @params = split(',', $7);
|
||||
|
||||
#print("rc == '$rc', fn == '$fn', params == '$params'\n");
|
||||
|
||||
|
Reference in New Issue
Block a user