diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h index e4329395..e2656caf 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,6 +59,8 @@ #include "SDL_timer.h" #include "SDL_version.h" #include "SDL_video.h" +#include "SDL_locale.h" +#include "SDL_misc.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h index 8baecb63..f8a368ec 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +53,8 @@ assert can have unique static variables associated with it. #define SDL_TriggerBreakpoint() __debugbreak() #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) +#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */ + #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" ) #elif defined(__386__) && defined(__WATCOMC__) #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__) diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h index deee35f9..e99f1bcc 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h index 305c01a9..4ba34914 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h index b116cc8d..db150ed0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h index 6f0a22b9..5e21a79e 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +50,9 @@ typedef enum SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate dstRGB = srcRGB * dstRGB dstA = dstA */ + SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply + dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) + dstA = (srcA * dstA) + (dstA * (1-srcA)) */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h index c4f8766c..dbf69fce 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h index 7d62d3e2..3937dbc3 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h index 9cb70bfe..d1148cf2 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -121,6 +121,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -136,8 +138,9 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_ANDROID 1 -#define SDL_JOYSTICK_HIDAPI 1 -#define SDL_HAPTIC_ANDROID 1 +#define SDL_JOYSTICK_HIDAPI 1 +#define SDL_JOYSTICK_VIRTUAL 1 +#define SDL_HAPTIC_ANDROID 1 /* Enable sensor driver */ #define SDL_SENSOR_ANDROID 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h index edfc03e2..f06ad335 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -122,6 +122,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -136,9 +138,11 @@ /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ #define SDL_HAPTIC_DUMMY 1 -/* Enable MFi joystick support */ -#define SDL_JOYSTICK_MFI 1 +/* Enable joystick support */ +/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */ /*#define SDL_JOYSTICK_HIDAPI 1*/ +#define SDL_JOYSTICK_MFI 1 +#define SDL_JOYSTICK_VIRTUAL 1 #ifdef __TVOS__ #define SDL_SENSOR_DUMMY 1 @@ -167,8 +171,10 @@ #define SDL_VIDEO_RENDER_OGL_ES 1 #define SDL_VIDEO_RENDER_OGL_ES2 1 -/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */ -#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)) +/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer + Also supported in simulator from iOS 13.0 and tvOS 13.0 + */ +#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))) #define SDL_PLATFORM_SUPPORTS_METAL 1 #else #define SDL_PLATFORM_SUPPORTS_METAL 0 @@ -195,11 +201,6 @@ /* enable iOS extended launch screen */ #define SDL_IPHONE_LAUNCHSCREEN 1 -/* Set max recognized G-force from accelerometer - See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed - */ -#define SDL_IPHONE_MAX_GFORCE 5.0 - /* enable filesystem support */ #define SDL_FILESYSTEM_COCOA 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h index 22287dfc..4b45f165 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -125,6 +125,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -139,10 +141,16 @@ #define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable various input drivers */ +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_JOYSTICK_IOKIT 1 -#define SDL_JOYSTICK_HIDAPI 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_IOKIT 1 +/* The MFI controller support requires ARC Objective C runtime */ +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__) +#define SDL_JOYSTICK_MFI 1 +#endif + /* Enable the dummy sensor driver */ #define SDL_SENSOR_DUMMY 1 @@ -195,7 +203,7 @@ #endif /* Metal only supported on 64-bit architectures with 10.11+ */ -#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) +#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) #define SDL_PLATFORM_SUPPORTS_METAL 1 #else #define SDL_PLATFORM_SUPPORTS_METAL 0 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h index 20e45b88..b9c39584 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h index f03ca4a5..1922217d 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -27,14 +27,17 @@ #define SDL_AUDIO_DRIVER_DUMMY 1 #define SDL_AUDIO_DRIVER_DISK 1 +#define SDL_AUDIO_DRIVER_OS2 1 #define SDL_POWER_DISABLED 1 #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 /*#undef SDL_JOYSTICK_HIDAPI */ +/*#undef SDL_JOYSTICK_VIRTUAL */ #define SDL_SENSOR_DUMMY 1 #define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_OS2 1 /* Enable OpenGL support */ /* #undef SDL_VIDEO_OPENGL */ @@ -42,18 +45,19 @@ /* Enable Vulkan support */ /* #undef SDL_VIDEO_VULKAN */ -#define SDL_LOADSO_DISABLED 1 -#define SDL_THREADS_DISABLED 1 -#define SDL_TIMERS_DISABLED 1 -#define SDL_FILESYSTEM_DUMMY 1 +#define SDL_THREAD_OS2 1 +#define SDL_LOADSO_OS2 1 +#define SDL_TIMER_OS2 1 +#define SDL_FILESYSTEM_OS2 1 /* Enable assembly routines */ #define SDL_ASSEMBLY_ROUTINES 1 -/* #undef HAVE_LIBSAMPLERATE_H */ +/* use libsamplerate for audio rate conversion. */ +/*#define HAVE_LIBSAMPLERATE_H 1 */ /* Enable dynamic libsamplerate support */ -/* #undef SDL_LIBSAMPLERATE_DYNAMIC */ +#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL" #define HAVE_LIBC 1 @@ -99,6 +103,8 @@ #define HAVE_WCSLCPY 1 #define HAVE_WCSLCAT 1 #define HAVE_WCSCMP 1 +#define HAVE__WCSICMP 1 +#define HAVE__WCSNICMP 1 #define HAVE_STRLEN 1 #define HAVE_STRLCPY 1 #define HAVE_STRLCAT 1 @@ -176,5 +182,7 @@ /* #undef HAVE_SQRTF */ #define HAVE_TAN 1 /* #undef HAVE_TANF */ +/* #undef HAVE_TRUNC */ +/* #undef HAVE_TRUNCF */ #endif /* SDL_config_os2_h_ */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h index 66ccf895..8728a638 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -102,6 +102,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -110,8 +112,8 @@ #define SDL_AUDIO_DRIVER_OSS 1 #define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 #define SDL_JOYSTICK_LINUX 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_LINUX 1 #define SDL_SENSOR_DUMMY 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h index dd2d6ecf..235fe08e 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -136,6 +136,7 @@ /* Enable the PSP joystick driver (src/joystick/psp/\*.c) */ #define SDL_JOYSTICK_PSP 1 +#define SDL_JOYSTICK_VIRTUAL 1 /* Enable the dummy sensor driver */ #define SDL_SENSOR_DUMMY 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h index c66d8754..18a36382 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -84,6 +84,7 @@ typedef unsigned int uintptr_t; #define HAVE_XINPUT_H 1 #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 +#define HAVE_SENSORSAPI_H /* This is disabled by default to avoid C runtime dependencies and manifest requirements */ #ifdef HAVE_LIBC @@ -133,6 +134,8 @@ typedef unsigned int uintptr_t; #define HAVE_STRNCMP 1 #define HAVE__STRICMP 1 #define HAVE__STRNICMP 1 +#define HAVE__WCSICMP 1 +#define HAVE__WCSNICMP 1 #define HAVE_ACOS 1 #define HAVE_ACOSF 1 #define HAVE_ASIN 1 @@ -172,6 +175,8 @@ typedef unsigned int uintptr_t; #define HAVE_VSSCANF 1 #define HAVE_SCALBN 1 #define HAVE_SCALBNF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #endif /* This function is available with at least the VC++ 2008 C runtime library */ #if _MSC_VER >= 1400 @@ -186,8 +191,22 @@ typedef unsigned int uintptr_t; #define HAVE_STDDEF_H 1 #endif +/* Check to see if we have Windows 10 build environment */ +#if _MSC_VER >= 1911 /* Visual Studio 15.3 */ +#include +#if _WIN32_WINNT >= 0x0601 /* Windows 7 */ +#define SDL_WINDOWS7_SDK +#endif +#if _WIN32_WINNT >= 0x0602 /* Windows 8 */ +#define SDL_WINDOWS8_SDK +#endif +#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */ +#define SDL_WINDOWS10_SDK +#endif +#endif /* _MSC_VER >= 1911 */ + /* Enable various audio drivers */ -/* #undef SDL_AUDIO_DRIVER_WASAPI */ +#define SDL_AUDIO_DRIVER_WASAPI 1 #define SDL_AUDIO_DRIVER_DSOUND 1 #define SDL_AUDIO_DRIVER_WINMM 1 #define SDL_AUDIO_DRIVER_DISK 1 @@ -195,13 +214,20 @@ typedef unsigned int uintptr_t; /* Enable various input drivers */ #define SDL_JOYSTICK_DINPUT 1 -#define SDL_JOYSTICK_XINPUT 1 #define SDL_JOYSTICK_HIDAPI 1 +#ifndef __WINRT__ +#define SDL_JOYSTICK_RAWINPUT 1 +#endif +#define SDL_JOYSTICK_VIRTUAL 1 +#ifdef SDL_WINDOWS10_SDK +#define SDL_JOYSTICK_WGI 1 +#endif +#define SDL_JOYSTICK_XINPUT 1 #define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_XINPUT 1 -/* Enable the dummy sensor driver */ -#define SDL_SENSOR_DUMMY 1 +/* Enable the sensor driver */ +#define SDL_SENSOR_WINDOWS 1 /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 @@ -219,8 +245,8 @@ typedef unsigned int uintptr_t; #ifndef SDL_VIDEO_RENDER_D3D #define SDL_VIDEO_RENDER_D3D 1 #endif -#ifndef SDL_VIDEO_RENDER_D3D11 -#define SDL_VIDEO_RENDER_D3D11 0 +#ifdef SDL_WINDOWS7_SDK +#define SDL_VIDEO_RENDER_D3D11 1 #endif /* Enable OpenGL support */ @@ -258,3 +284,5 @@ typedef unsigned int uintptr_t; #endif #endif /* SDL_config_windows_h_ */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h index cb85b234..02079f53 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -181,6 +181,8 @@ typedef unsigned int uintptr_t; #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE__FSEEKI64 1 /* Enable various audio drivers */ @@ -193,6 +195,7 @@ typedef unsigned int uintptr_t; #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 #else +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_JOYSTICK_XINPUT 1 #define SDL_HAPTIC_XINPUT 1 #endif diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h index 724c55fc..f65af8eb 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -117,6 +117,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -126,8 +128,8 @@ #define SDL_AUDIO_DRIVER_OSS 1 #define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 #define SDL_JOYSTICK_LINUX 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_LINUX 1 #define SDL_SENSOR_DUMMY 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_copying.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_copying.h index 1ef18cd1..4f8a2bcd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_copying.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_copying.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h index 2d094e88..df3123c0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -246,10 +246,33 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void); * \return Pointer to newly-allocated block, NULL if out of memory. * * \sa SDL_SIMDAlignment + * \sa SDL_SIMDRealloc * \sa SDL_SIMDFree */ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); +/** + * \brief Reallocate memory obtained from SDL_SIMDAlloc + * + * It is not valid to use this function on a pointer from anything but + * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc, + * SDL_malloc, memalign, new[], etc. + * + * \param mem The pointer obtained from SDL_SIMDAlloc. This function also + * accepts NULL, at which point this function is the same as + * calling SDL_realloc with a NULL pointer. + * \param len The length, in bytes, of the block to allocated. The actual + * allocated block might be larger due to padding, etc. Passing 0 + * will return a non-NULL pointer, assuming the system isn't out of + * memory. + * \return Pointer to newly-reallocated block, NULL if out of memory. + * + * \sa SDL_SIMDAlignment + * \sa SDL_SIMDAlloc + * \sa SDL_SIMDFree + */ +extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len); + /** * \brief Deallocate memory obtained from SDL_SIMDAlloc * @@ -260,6 +283,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); * However, SDL_SIMDFree(NULL) is a legal no-op. * * \sa SDL_SIMDAlloc + * \sa SDL_SIMDRealloc */ extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr); diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_egl.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_egl.h index f95a9067..531441e6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_egl.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_egl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h index 1e6daae1..171c008a 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h index 24416e69..962d62f6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,9 +37,45 @@ extern "C" { #endif /* Public functions */ -/* SDL_SetError() unconditionally returns -1. */ + + +/** + * \brief Set the error message for the current thread + * + * \return -1, there is no error handling for this function + */ extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); + +/** + * \brief Get the last error message that was set + * + * SDL API functions may set error messages and then succeed, so you should + * only use the error value if a function fails. + * + * This returns a pointer to a static buffer for convenience and should not + * be called by multiple threads simultaneously. + * + * \return a pointer to the last error message that was set + */ extern DECLSPEC const char *SDLCALL SDL_GetError(void); + +/** + * \brief Get the last error message that was set for the current thread + * + * SDL API functions may set error messages and then succeed, so you should + * only use the error value if a function fails. + * + * \param errstr A buffer to fill with the last error message that was set + * for the current thread + * \param maxlen The size of the buffer pointed to by the errstr parameter + * + * \return errstr + */ +extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen); + +/** + * \brief Clear the error message for the current thread + */ extern DECLSPEC void SDLCALL SDL_ClearError(void); /** diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h index eaf57434..ae560c08 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -85,6 +85,8 @@ typedef enum Called on Android in onResume() */ + SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */ + /* Display events */ SDL_DISPLAYEVENT = 0x150, /**< Display state change */ @@ -123,6 +125,10 @@ typedef enum SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */ SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */ SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */ + SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */ + SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */ + SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */ + SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */ /* Touch events */ SDL_FINGERDOWN = 0x700, @@ -413,6 +419,33 @@ typedef struct SDL_ControllerDeviceEvent Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ } SDL_ControllerDeviceEvent; +/** + * \brief Game controller touchpad event structure (event.ctouchpad.*) + */ +typedef struct SDL_ControllerTouchpadEvent +{ + Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + SDL_JoystickID which; /**< The joystick instance id */ + Sint32 touchpad; /**< The index of the touchpad */ + Sint32 finger; /**< The index of the finger on the touchpad */ + float x; /**< Normalized in the range 0...1 with 0 being on the left */ + float y; /**< Normalized in the range 0...1 with 0 being at the top */ + float pressure; /**< Normalized in the range 0...1 */ +} SDL_ControllerTouchpadEvent; + +/** + * \brief Game controller sensor event structure (event.csensor.*) + */ +typedef struct SDL_ControllerSensorEvent +{ + Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + SDL_JoystickID which; /**< The joystick instance id */ + Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */ + float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */ +} SDL_ControllerSensorEvent; + /** * \brief Audio device event structure (event.adevice.*) */ @@ -557,33 +590,35 @@ typedef struct SDL_SysWMEvent */ typedef union SDL_Event { - Uint32 type; /**< Event type, shared with all events */ - SDL_CommonEvent common; /**< Common event data */ - SDL_DisplayEvent display; /**< Display event data */ - SDL_WindowEvent window; /**< Window event data */ - SDL_KeyboardEvent key; /**< Keyboard event data */ - SDL_TextEditingEvent edit; /**< Text editing event data */ - SDL_TextInputEvent text; /**< Text input event data */ - SDL_MouseMotionEvent motion; /**< Mouse motion event data */ - SDL_MouseButtonEvent button; /**< Mouse button event data */ - SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ - SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ - SDL_JoyBallEvent jball; /**< Joystick ball event data */ - SDL_JoyHatEvent jhat; /**< Joystick hat event data */ - SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ - SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ - SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ - SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ - SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ - SDL_AudioDeviceEvent adevice; /**< Audio device event data */ - SDL_SensorEvent sensor; /**< Sensor event data */ - SDL_QuitEvent quit; /**< Quit request event data */ - SDL_UserEvent user; /**< Custom event data */ - SDL_SysWMEvent syswm; /**< System dependent window event data */ - SDL_TouchFingerEvent tfinger; /**< Touch finger event data */ - SDL_MultiGestureEvent mgesture; /**< Gesture event data */ - SDL_DollarGestureEvent dgesture; /**< Gesture event data */ - SDL_DropEvent drop; /**< Drag and drop event data */ + Uint32 type; /**< Event type, shared with all events */ + SDL_CommonEvent common; /**< Common event data */ + SDL_DisplayEvent display; /**< Display event data */ + SDL_WindowEvent window; /**< Window event data */ + SDL_KeyboardEvent key; /**< Keyboard event data */ + SDL_TextEditingEvent edit; /**< Text editing event data */ + SDL_TextInputEvent text; /**< Text input event data */ + SDL_MouseMotionEvent motion; /**< Mouse motion event data */ + SDL_MouseButtonEvent button; /**< Mouse button event data */ + SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ + SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ + SDL_JoyBallEvent jball; /**< Joystick ball event data */ + SDL_JoyHatEvent jhat; /**< Joystick hat event data */ + SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ + SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ + SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ + SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ + SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ + SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */ + SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */ + SDL_AudioDeviceEvent adevice; /**< Audio device event data */ + SDL_SensorEvent sensor; /**< Sensor event data */ + SDL_QuitEvent quit; /**< Quit request event data */ + SDL_UserEvent user; /**< Custom event data */ + SDL_SysWMEvent syswm; /**< System dependent window event data */ + SDL_TouchFingerEvent tfinger; /**< Touch finger event data */ + SDL_MultiGestureEvent mgesture; /**< Gesture event data */ + SDL_DollarGestureEvent dgesture; /**< Gesture event data */ + SDL_DropEvent drop; /**< Drag and drop event data */ /* This is necessary for ABI compatibility between Visual C++ and GCC Visual C++ will respect the push pack pragma and use 52 bytes for diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h index 6d97e589..68042b60 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h index 5ee8e8e9..e42433c9 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -31,6 +31,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" #include "SDL_rwops.h" +#include "SDL_sensor.h" #include "SDL_joystick.h" #include "begin_code.h" @@ -64,7 +65,9 @@ typedef enum SDL_CONTROLLER_TYPE_XBOXONE, SDL_CONTROLLER_TYPE_PS3, SDL_CONTROLLER_TYPE_PS4, - SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO + SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO, + SDL_CONTROLLER_TYPE_VIRTUAL, + SDL_CONTROLLER_TYPE_PS5 } SDL_GameControllerType; typedef enum @@ -170,7 +173,7 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID * * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller); +extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller); /** * Is the joystick on this index supported by the game controller interface? @@ -245,19 +248,26 @@ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController * Get the USB vendor ID of an opened controller, if available. * If the vendor ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller); /** * Get the USB product ID of an opened controller, if available. * If the product ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller); /** * Get the product version of an opened controller, if available. * If the product version isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller); + +/** + * Get the serial number of an opened controller, if available. + * + * Returns the serial number of the controller, or NULL if it is not available. + */ +extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller); /** * Returns SDL_TRUE if the controller has been opened and currently connected, @@ -328,6 +338,12 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); +/** + * Return whether a game controller has a given axis + */ +extern DECLSPEC SDL_bool SDLCALL +SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); + /** * Get the current state of an axis control on a game controller. * @@ -337,8 +353,7 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, * The axis indices start at index 0. */ extern DECLSPEC Sint16 SDLCALL -SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); +SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); /** * The list of buttons available from a controller @@ -361,6 +376,12 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; @@ -381,6 +402,11 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); +/** + * Return whether a game controller has a given button + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller, + SDL_GameControllerButton button); /** * Get the current state of a button on a game controller. @@ -391,7 +417,68 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga SDL_GameControllerButton button); /** - * Trigger a rumble effect + * Get the number of touchpads on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller); + +/** + * Get the number of supported simultaneous fingers on a touchpad on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad); + +/** + * Get the current state of a finger on a touchpad on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure); + +/** + * Return whether a game controller has a particular sensor. + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * + * \return SDL_TRUE if the sensor exists, SDL_FALSE otherwise. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type); + +/** + * Set whether data reporting for a game controller sensor is enabled + * + * \param gamecontroller The controller to update + * \param type The type of sensor to enable/disable + * \param enabled Whether data reporting should be enabled + * + * \return 0 or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled); + +/** + * Query whether sensor data reporting is enabled for a game controller + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * + * \return SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type); + +/** + * Get the current state of a game controller sensor. + * + * The number of values and interpretation of the data is sensor dependent. + * See SDL_sensor.h for the details for each type of sensor. + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * \param data A pointer filled with the current sensor state + * \param num_values The number of values to write to data + * + * \return 0 or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values); + +/** + * Start a rumble effect * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. * * \param gamecontroller The controller to vibrate @@ -399,10 +486,44 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * - * \return 0, or -1 if rumble isn't supported on this joystick + * \return 0, or -1 if rumble isn't supported on this controller */ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); +/** + * Start a rumble effect in the game controller's triggers + * Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling. + * + * \param gamecontroller The controller to vibrate + * \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF + * \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF + * \param duration_ms The duration of the rumble effect, in milliseconds + * + * \return 0, or -1 if rumble isn't supported on this controller + */ +extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); + +/** + * Return whether a controller has an LED + * + * \param gamecontroller The controller to query + * + * \return SDL_TRUE, or SDL_FALSE if this controller does not have a modifiable LED + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller); + +/** + * Update a controller's LED color. + * + * \param gamecontroller The controller to update + * \param red The intensity of the red LED + * \param green The intensity of the green LED + * \param blue The intensity of the blue LED + * + * \return 0, or -1 if this controller does not have a modifiable LED + */ +extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue); + /** * Close a controller previously opened with SDL_GameControllerOpen(). */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h index 9d25e9c1..81ed4317 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h index 07562768..c27da118 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -336,6 +336,14 @@ typedef struct _SDL_Haptic SDL_Haptic; */ #define SDL_HAPTIC_SPHERICAL 2 +/** + * \brief Use this value to play an effect on the steering wheel axis. This + * provides better compatibility across platforms and devices as SDL will guess + * the correct axis. + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_STEERING_AXIS 3 + /* @} *//* Direction encodings */ /* @} *//* Haptic features */ @@ -444,6 +452,7 @@ typedef struct _SDL_Haptic SDL_Haptic; * \sa SDL_HAPTIC_POLAR * \sa SDL_HAPTIC_CARTESIAN * \sa SDL_HAPTIC_SPHERICAL + * \sa SDL_HAPTIC_STEERING_AXIS * \sa SDL_HapticEffect * \sa SDL_HapticNumAxes */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h index d36815b9..50a5a089 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -244,6 +244,17 @@ extern "C" { */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" +/** + * \brief A variable controlling whether X11 should use GLX or EGL by default + * + * This variable can be set to the following values: + * "0" - Use GLX + * "1" - Use EGL + * + * By default SDL will use GLX when both are present. + */ +#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL" + /** * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * @@ -303,6 +314,17 @@ extern "C" { */ #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" +/** + * \brief A variable controlling whether relative mouse motion is affected by renderer scaling + * + * This variable can be set to the following values: + * "0" - Relative motion is unaffected by DPI or renderer's logical size + * "1" - Relative motion is scaled according to DPI scaling and logical size + * + * By default relative mouse deltas are affected by DPI and renderer scaling + */ +#define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING" + /** * \brief A variable controlling whether relative mouse mode is implemented using mouse warping * @@ -347,7 +369,9 @@ extern "C" { #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" /** - * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. + * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false. + * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're + * seeing if "true" causes more problems than it solves in modern times. * */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" @@ -457,6 +481,25 @@ extern "C" { */ #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING" +/** + * \brief A variable that overrides the automatic controller type detection + * + * The variable should be comma separated entries, in the form: VID/PID=type + * + * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd + * + * The type should be one of: + * Xbox360 + * XboxOne + * PS3 + * PS4 + * PS5 + * SwitchPro + * + * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) + */ +#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE" + /** * \brief A variable that lets you manually hint extra gamecontroller db entries. * @@ -561,6 +604,17 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" +/** + * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used. + * + * This variable can be set to the following values: + * "0" - HIDAPI driver is not used + * "1" - HIDAPI driver is used + * + * The default is the value of SDL_HINT_JOYSTICK_HIDAPI + */ +#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5" + /** * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. * @@ -605,10 +659,23 @@ extern "C" { * "0" - HIDAPI driver is not used * "1" - HIDAPI driver is used * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI + * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" + /** + * \brief A variable controlling whether the HIDAPI driver for XBox controllers on Windows should pull correlated + * data from XInput. + * + * This variable can be set to the following values: + * "0" - HIDAPI Xbox driver will only use HIDAPI data + * "1" - HIDAPI Xbox driver will also pull data from XInput, providing better trigger axes, guide button + * presses, and rumble support + * + * The default is "1". This hint applies to any joysticks opened after setting the hint. + */ +#define SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT "SDL_JOYSTICK_HIDAPI_CORRELATE_XINPUT" + /** * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used. * @@ -631,6 +698,35 @@ extern "C" { */ #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" + /** + * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices. + * + * This variable can be set to the following values: + * "0" - RAWINPUT drivers are not used + * "1" - RAWINPUT drivers are used (the default) + * + */ +#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" + + /** + * \brief A variable controlling whether a separate thread should be used + * for handling joystick detection and raw input messages on Windows + * + * This variable can be set to the following values: + * "0" - A separate thread is not used (the default) + * "1" - A separate thread is used for handling raw input messages + * + */ +#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD" + + /** + * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values. + * + * This variable can be set to the following values: + * "0" - Return unfiltered joystick axis values (the default) + * "1" - Return axis values with deadzones taken into account + */ +#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES" /** * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. @@ -701,6 +797,42 @@ extern "C" { */ #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" +/** +* \brief A string specifying additional information to use with SDL_SetThreadPriority. +* +* By default SDL_SetThreadPriority will make appropriate system changes in order to +* apply a thread priority. For example on systems using pthreads the scheduler policy +* is changed automatically to a policy that works well with a given priority. +* Code which has specific requirements can override SDL's default behavior with this hint. +* +* pthread hint values are "current", "other", "fifo" and "rr". +* Currently no other platform hint values are defined but may be in the future. +* +* \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro +* configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME +* after calling SDL_SetThreadPriority(). +*/ +#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY" + +/** + * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime. + * + * On some platforms, like Linux, a realtime priority thread may be subject to restrictions + * that require special handling by the application. This hint exists to let SDL know that + * the app is prepared to handle said restrictions. + * + * On Linux, SDL will apply the following configuration to any thread that becomes realtime: + * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, + * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. + * * Exceeding this limit will result in the kernel sending SIGKILL to the app, + * * Refer to the man pages for more information. + * + * This variable can be set to the following values: + * "0" - default platform specific behaviour + * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy + */ +#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL" + /** * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS) */ @@ -939,6 +1071,18 @@ extern "C" { */ #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE" +/** + * \brief A variable to control whether SDL will pause audio in background + * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking") + * + * The variable can be set to the following values: + * "0" - Non paused. + * "1" - Paused. (default) + * + * The value should be set before SDL is initialized. + */ +#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO" + /** * \brief A variable to control whether the return key on the soft keyboard * should hide the soft keyboard on Android and iOS. @@ -965,10 +1109,26 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief Disable giving back control to the browser automatically + * when running with asyncify + * + * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations + * such as refreshing the screen or polling events. + * + * This hint only applies to the emscripten platform + * + * The variable can be set to the following values: + * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes) + * "1" - Enable emscripten_sleep calls (the default) + */ +#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY" + /** * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. * - * This hint only applies to Unix-like platforms. + * This hint only applies to Unix-like platforms, and should set before + * any calls to SDL_Init() * * The variable can be set to the following values: * "0" - SDL will install a SIGINT and SIGTERM handler, and when it @@ -1142,6 +1302,32 @@ extern "C" { #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" +/** + * \brief A variable controlling whether SDL updates joystick state when getting input events + * + * This variable can be set to the following values: + * + * "0" - You'll call SDL_JoystickUpdate() manually + * "1" - SDL will automatically call SDL_JoystickUpdate() (default) + * + * This hint can be toggled on and off at runtime. + */ +#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS" + + +/** + * \brief A variable controlling whether SDL updates sensor state when getting input events + * + * This variable can be set to the following values: + * + * "0" - You'll call SDL_SensorUpdate() manually + * "1" - SDL will automatically call SDL_SensorUpdate() (default) + * + * This hint can be toggled on and off at runtime. + */ +#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS" + + /** * \brief A variable controlling whether SDL logs all events pushed onto its internal queue. * @@ -1229,6 +1415,77 @@ extern "C" { */ #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK" +/** + * \brief Override for SDL_GetDisplayUsableBounds() + * + * If set, this hint will override the expected results for + * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want + * to do this, but this allows an embedded system to request that some of the + * screen be reserved for other uses when paired with a well-behaved + * application. + * + * The contents of this hint must be 4 comma-separated integers, the first + * is the bounds x, then y, width and height, in that order. + */ +#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS" + +/** + * \brief Specify an application name for an audio device. + * + * Some audio backends (such as PulseAudio) allow you to describe your audio + * stream. Among other things, this description might show up in a system + * control panel that lets the user adjust the volume on specific audio + * streams instead of using one giant master volume slider. + * + * This hints lets you transmit that information to the OS. The contents of + * this hint are used while opening an audio device. You should use a string + * that describes your program ("My Game 2: The Revenge") + * + * Setting this to "" or leaving it unset will have SDL use a reasonable + * default: probably the application's name or "SDL Application" if SDL + * doesn't have any better information. + * + * On targets where this is not supported, this hint does nothing. + */ +#define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME" + +/** + * \brief Specify an application name for an audio device. + * + * Some audio backends (such as PulseAudio) allow you to describe your audio + * stream. Among other things, this description might show up in a system + * control panel that lets the user adjust the volume on specific audio + * streams instead of using one giant master volume slider. + * + * This hints lets you transmit that information to the OS. The contents of + * this hint are used while opening an audio device. You should use a string + * that describes your what your program is playing ("audio stream" is + * probably sufficient in many cases, but this could be useful for something + * like "team chat" if you have a headset playing VoIP audio separately). + * + * Setting this to "" or leaving it unset will have SDL use a reasonable + * default: "audio stream" or something similar. + * + * On targets where this is not supported, this hint does nothing. + */ +#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME" + + +/** + * \brief Override for SDL_GetPreferredLocales() + * + * If set, this will be favored over anything the OS might report for the + * user's preferred locales. Changing this hint at runtime will not generate + * a SDL_LOCALECHANGED event (but if you can change the hint, you can push + * your own event, if you want). + * + * The format of this hint is a comma-separated list of language and locale, + * combined with an underscore, as is a common format: "en_GB". Locale is + * optional: "en". So you might have a list like this: "en_GB,jp,es_PT" + */ +#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES" + + /** * \brief An enumeration of hint priorities */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h index 3c099dec..0bbeafe0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -105,6 +105,12 @@ typedef enum SDL_JOYSTICK_POWER_MAX } SDL_JoystickPowerLevel; +/* Set max recognized G-force from accelerometer + See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed + */ +#define SDL_IPHONE_MAX_GFORCE 5.0 + + /* Function prototypes */ /** @@ -199,51 +205,92 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index); +/** + * Attaches a new virtual joystick. + * Returns the joystick's device index, or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, + int naxes, + int nbuttons, + int nhats); + +/** + * Detaches a virtual joystick + * Returns 0 on success, or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index); + +/** + * Indicates whether or not a virtual-joystick is at a given device index. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index); + +/** + * Set values on an opened, virtual-joystick's controls. + * Please note that values set here will not be applied until the next + * call to SDL_JoystickUpdate, which can either be called directly, + * or can be called indirectly through various other SDL APIS, + * including, but not limited to the following: SDL_PollEvent, + * SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent. + * + * Returns 0 on success, -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value); +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value); +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value); + /** * Return the name for this currently opened joystick. * If no name can be found, this function returns NULL. */ -extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); +extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick); /** * Get the player index of an opened joystick, or -1 if it's not available * * For XInput controllers this returns the XInput user index. */ -extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick); /** * Set the player index of an opened joystick */ -extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index); +extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index); /** * Return the GUID for this opened joystick */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick); /** * Get the USB vendor ID of an opened joystick, if available. * If the vendor ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick); /** * Get the USB product ID of an opened joystick, if available. * If the product ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick); /** * Get the product version of an opened joystick, if available. * If the product version isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick); + +/** + * Get the serial number of an opened joystick, if available. + * + * Returns the serial number of the joystick, or NULL if it is not available. + */ +extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick); /** * Get the type of an opened joystick. */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick); /** * Return a string representation for this guid. pszGUID must point to at least 33 bytes @@ -259,17 +306,17 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha /** * Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not. */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick); +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick); /** * Get the instance ID of an opened joystick or -1 if the joystick is invalid. */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick); /** * Get the number of general axis controls on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick); /** * Get the number of trackballs on a joystick. @@ -277,17 +324,17 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); * Joystick trackballs have only relative motion events associated * with them and their state cannot be polled. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick); /** * Get the number of POV hats on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick); /** * Get the number of buttons on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick); /** * Update the current state of the open joysticks. @@ -317,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); * * The axis indices start at index 0. */ -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis); /** @@ -329,7 +376,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, * * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not. */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick, +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state); /** @@ -363,7 +410,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * * - ::SDL_HAT_LEFTUP * - ::SDL_HAT_LEFTDOWN */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); /** @@ -373,7 +420,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, * * The ball indices start at index 0. */ -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy); /** @@ -381,11 +428,11 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, * * The button indices start at index 0. */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button); /** - * Trigger a rumble effect + * Start a rumble effect * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. * * \param joystick The joystick to vibrate @@ -395,17 +442,51 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, * * \return 0, or -1 if rumble isn't supported on this joystick */ -extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); +extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + +/** + * Start a rumble effect in the joystick's triggers + * Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling. + * + * \param joystick The joystick to vibrate + * \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF + * \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF + * \param duration_ms The duration of the rumble effect, in milliseconds + * + * \return 0, or -1 if trigger rumble isn't supported on this joystick + */ +extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); + +/** + * Return whether a joystick has an LED + * + * \param joystick The joystick to query + * + * \return SDL_TRUE, or SDL_FALSE if this joystick does not have a modifiable LED + */ +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick); + +/** + * Update a joystick's LED color. + * + * \param joystick The joystick to update + * \param red The intensity of the red LED + * \param green The intensity of the green LED + * \param blue The intensity of the blue LED + * + * \return 0, or -1 if this joystick does not have a modifiable LED + */ +extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue); /** * Close a joystick previously opened with SDL_JoystickOpen(). */ -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick); /** * Return the battery level of this joystick */ -extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h index 4b2a055d..f6853c64 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 64b72dd3..6f6b65cb 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -88,9 +88,11 @@ typedef enum SDLK_GREATER = '>', SDLK_QUESTION = '?', SDLK_AT = '@', + /* Skip uppercase letters */ + SDLK_LEFTBRACKET = '[', SDLK_BACKSLASH = '\\', SDLK_RIGHTBRACKET = ']', @@ -336,13 +338,13 @@ typedef enum KMOD_NUM = 0x1000, KMOD_CAPS = 0x2000, KMOD_MODE = 0x4000, - KMOD_RESERVED = 0x8000 -} SDL_Keymod; + KMOD_RESERVED = 0x8000, -#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) -#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) -#define KMOD_ALT (KMOD_LALT|KMOD_RALT) -#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) + KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL, + KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT, + KMOD_ALT = KMOD_LALT | KMOD_RALT, + KMOD_GUI = KMOD_LGUI | KMOD_RGUI +} SDL_Keymod; #endif /* SDL_keycode_h_ */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h index 793ba535..89578a9f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h new file mode 100644 index 00000000..1f4b0c46 --- /dev/null +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h @@ -0,0 +1,101 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2020 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/** + * \file SDL_locale.h + * + * Include file for SDL locale services + */ + +#ifndef _SDL_locale_h +#define _SDL_locale_h + +#include "SDL_stdinc.h" +#include "SDL_error.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + + +typedef struct SDL_Locale +{ + const char *language; /**< A language name, like "en" for English. */ + const char *country; /**< A country, like "US" for America. Can be NULL. */ +} SDL_Locale; + +/** + * \brief Report the user's preferred locale. + * + * This returns an array of SDL_Locale structs, the final item zeroed out. + * When the caller is done with this array, it should call SDL_free() on + * the returned value; all the memory involved is allocated in a single + * block, so a single SDL_free() will suffice. + * + * Returned language strings are in the format xx, where 'xx' is an ISO-639 + * language specifier (such as "en" for English, "de" for German, etc). + * Country strings are in the format YY, where "YY" is an ISO-3166 country + * code (such as "US" for the United States, "CA" for Canada, etc). Country + * might be NULL if there's no specific guidance on them (so you might get + * { "en", "US" } for American English, but { "en", NULL } means "English + * language, generically"). Language strings are never NULL, except to + * terminate the array. + * + * Please note that not all of these strings are 2 characters; some are + * three or more. + * + * The returned list of locales are in the order of the user's preference. + * For example, a German citizen that is fluent in US English and knows + * enough Japanese to navigate around Tokyo might have a list like: + * { "de", "en_US", "jp", NULL }. Someone from England might prefer British + * English (where "color" is spelled "colour", etc), but will settle for + * anything like it: { "en_GB", "en", NULL }. + * + * This function returns NULL on error, including when the platform does not + * supply this information at all. + * + * This might be a "slow" call that has to query the operating system. It's + * best to ask for this once and save the results. However, this list can + * change, usually because the user has changed a system preference outside + * of your program; SDL will send an SDL_LOCALECHANGED event in this case, + * if possible, and you can call this function again to get an updated copy + * of preferred locales. + * + * \return array of locales, terminated with a locale with a NULL language + * field. Will return NULL on error. + */ +extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_locale_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h index 430e4fd0..c1751fd7 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h index 623f2d00..fcb5c17d 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h index bf50deb9..03639ce4 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h index 0f1e0e94..f9673577 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -55,18 +55,13 @@ typedef void *SDL_MetalView; * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its * own. It is up to user code to do that. * - * The returned handle can be casted directly to a NSView or UIView, and the - * CAMetalLayer can be accessed from the view's 'layer' property. + * The returned handle can be casted directly to a NSView or UIView. + * To access the backing CAMetalLayer, call SDL_Metal_GetLayer(). * - * \code - * SDL_MetalView metalview = SDL_Metal_CreateView(window); - * UIView *uiview = (__bridge UIView *)metalview; - * CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer; - * // [...] - * SDL_Metal_DestroyView(metalview); - * \endcode + * \note \a window must be created with the SDL_WINDOW_METAL flag. * * \sa SDL_Metal_DestroyView + * \sa SDL_Metal_GetLayer */ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); @@ -80,6 +75,37 @@ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); */ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); +/** + * \brief Get a pointer to the backing CAMetalLayer for the given view. + * + * \sa SDL_MetalCreateView + */ +extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); + +/** + * \brief Get the size of a window's underlying drawable in pixels (for use + * with setting viewport, scissor & etc). + * + * \param window SDL_Window from which the drawable size should be queried + * \param w Pointer to variable for storing the width in pixels, + * may be NULL + * \param h Pointer to variable for storing the height in pixels, + * may be NULL + * + * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI + * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a + * platform with high-DPI support (Apple calls this "Retina"), and not disabled + * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint. + * + * \note On macOS high-DPI support must be enabled for an application by + * setting NSHighResolutionCapable to true in its Info.plist. + * + * \sa SDL_GetWindowSize() + * \sa SDL_CreateWindow() + */ +extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w, + int *h); + /* @} *//* Metal support functions */ /* Ends C function definitions when using C++ */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h new file mode 100644 index 00000000..a04f19ba --- /dev/null +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h @@ -0,0 +1,75 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2020 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/** + * \file SDL_misc.h + * + * \brief Include file for SDL API functions that don't fit elsewhere. + */ + +#ifndef SDL_misc_h_ +#define SDL_misc_h_ + +#include "SDL_stdinc.h" + +#include "begin_code.h" + +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief Open an URL / URI in the browser or other + * + * Open a URL in a separate, system-provided application. How this works will + * vary wildly depending on the platform. This will likely launch what + * makes sense to handle a specific URL's protocol (a web browser for http://, + * etc), but it might also be able to launch file managers for directories + * and other things. + * + * What happens when you open a URL varies wildly as well: your game window + * may lose focus (and may or may not lose focus if your game was fullscreen + * or grabbing input at the time). On mobile devices, your app will likely + * move to the background or your process might be paused. Any given platform + * may or may not handle a given URL. + * + * If this is unimplemented (or simply unavailable) for a platform, this will + * fail with an error. A successful result does not mean the URL loaded, just + * that we launched something to handle it (or at least believe we did). + * + * All this to say: this function can be useful, but you should definitely + * test it on every platform you target. + * + * \param url A valid URL to open. + * \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* SDL_misc_h_ */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h index 277559d2..99b658e9 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h index 970e7871..3c5b9557 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h index 690a8199..a49c4887 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h index 6685be73..5cd302cd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h index 1e0660c3..5c2a3e63 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h index df29d384..00bc180c 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h index 753f617a..aa90cbc2 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -188,18 +188,22 @@ typedef enum SDL_PIXELFORMAT_RGB332 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_332, 8, 1), - SDL_PIXELFORMAT_RGB444 = + SDL_PIXELFORMAT_XRGB4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_BGR444 = + SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444, + SDL_PIXELFORMAT_XBGR4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_RGB555 = + SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444, + SDL_PIXELFORMAT_XRGB1555 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_1555, 15, 2), - SDL_PIXELFORMAT_BGR555 = + SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555, + SDL_PIXELFORMAT_XBGR1555 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_1555, 15, 2), + SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555, SDL_PIXELFORMAT_ARGB4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_4444, 16, 2), @@ -236,15 +240,17 @@ typedef enum SDL_PIXELFORMAT_BGR24 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0, 24, 3), - SDL_PIXELFORMAT_RGB888 = + SDL_PIXELFORMAT_XRGB8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_8888, 24, 4), + SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_RGBX8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX, SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_BGR888 = + SDL_PIXELFORMAT_XBGR8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_8888, 24, 4), + SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888, SDL_PIXELFORMAT_BGRX8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX, SDL_PACKEDLAYOUT_8888, 24, 4), diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h index c2cbc6b4..71665579 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h index 4831cb77..39884cc2 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h index c979983c..b2bd5da5 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h index 71a41151..47f0d207 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h index f98c1843..f26fb7e5 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -618,8 +618,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, * \brief Set the clip rectangle for the current target. * * \param renderer The renderer for which clip rectangle should be set. - * \param rect A pointer to the rectangle to set as the clip rectangle, or - * NULL to disable clipping. + * \param rect A pointer to the rectangle to set as the clip rectangle, + * relative to the viewport, or NULL to disable clipping. * * \return 0 on success, or -1 on error * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h index 6996d603..e0bcf431 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-13387:8a12cc1abc9e" -#define SDL_REVISION_NUMBER 13387 +#define SDL_REVISION "hg-14525:e52d96ea04fc" +#define SDL_REVISION_NUMBER 14525 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h index f66119fb..2e6225fc 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -96,15 +96,7 @@ typedef struct SDL_RWops #if defined(__ANDROID__) struct { - void *fileNameRef; - void *inputStreamRef; - void *readableByteChannelRef; - void *readMethod; - void *assetFileDescriptorRef; - long position; - long size; - long offset; - int fd; + void *asset; } androidio; #elif defined(__WIN32__) struct diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h index a50305f5..b19197d2 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h index 966adbf2..e6236341 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -78,14 +78,16 @@ typedef enum * Accelerometer sensor * * The accelerometer returns the current acceleration in SI meters per - * second squared. This includes gravity, so a device at rest will have - * an acceleration of SDL_STANDARD_GRAVITY straight down. + * second squared. This measurement includes the force of gravity, so + * a device at rest will have an value of SDL_STANDARD_GRAVITY away + * from the center of the earth. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis * values[2]: Acceleration on the z axis * - * For phones held in portrait mode, the axes are defined as follows: + * For phones held in portrait mode and game controllers held in front of you, + * the axes are defined as follows: * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer @@ -105,22 +107,36 @@ typedef enum * see positive rotation on that axis when it appeared to be rotating * counter-clockwise. * - * values[0]: Angular speed around the x axis - * values[1]: Angular speed around the y axis - * values[2]: Angular speed around the z axis + * values[0]: Angular speed around the x axis (pitch) + * values[1]: Angular speed around the y axis (yaw) + * values[2]: Angular speed around the z axis (roll) * - * For phones held in portrait mode, the axes are defined as follows: + * For phones held in portrait mode and game controllers held in front of you, + * the axes are defined as follows: * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer * - * The axis data is not changed when the phone is rotated. + * The axis data is not changed when the phone or controller is rotated. * * \sa SDL_GetDisplayOrientation() */ /* Function prototypes */ +/** + * Locking for multi-threaded access to the sensor API + * + * If you are using the sensor API or handling events from multiple threads + * you should use these locking functions to protect access to the sensors. + * + * In particular, you are guaranteed that the sensor list won't change, so + * the API functions that take a sensor index will be valid, and sensor + * events will not be delivered. + */ +extern DECLSPEC void SDLCALL SDL_LockSensors(void); +extern DECLSPEC void SDLCALL SDL_UnlockSensors(void); + /** * \brief Count the number of sensors attached to the system right now */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h index 2ab43fcd..cbd9debd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h index 014675b7..91ccaa45 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +30,12 @@ #include "SDL_config.h" +#ifdef __APPLE__ +#ifndef _DARWIN_C_SOURCE +#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ +#endif +#endif + #ifdef HAVE_SYS_TYPES_H #include #endif @@ -408,9 +414,13 @@ extern DECLSPEC int SDLCALL SDL_abs(int x); extern DECLSPEC int SDLCALL SDL_isdigit(int x); extern DECLSPEC int SDLCALL SDL_isspace(int x); +extern DECLSPEC int SDLCALL SDL_isupper(int x); +extern DECLSPEC int SDLCALL SDL_islower(int x); extern DECLSPEC int SDLCALL SDL_toupper(int x); extern DECLSPEC int SDLCALL SDL_tolower(int x); +extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len); + extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len); #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) @@ -461,6 +471,8 @@ extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); +extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2); +extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len); extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); @@ -527,6 +539,8 @@ extern DECLSPEC double SDLCALL SDL_fabs(double x); extern DECLSPEC float SDLCALL SDL_fabsf(float x); extern DECLSPEC double SDLCALL SDL_floor(double x); extern DECLSPEC float SDLCALL SDL_floorf(float x); +extern DECLSPEC double SDLCALL SDL_trunc(double x); +extern DECLSPEC float SDLCALL SDL_truncf(float x); extern DECLSPEC double SDLCALL SDL_fmod(double x, double y); extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y); extern DECLSPEC double SDLCALL SDL_log(double x); @@ -573,6 +587,17 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, /* force builds using Clang's static analysis tools to use literal C runtime here, since there are possibly tests that are ineffective otherwise. */ #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS) + +/* The analyzer knows about strlcpy even when the system doesn't provide it */ +#ifndef HAVE_STRLCPY +size_t strlcpy(char* dst, const char* src, size_t size); +#endif + +/* The analyzer knows about strlcat even when the system doesn't provide it */ +#ifndef HAVE_STRLCAT +size_t strlcat(char* dst, const char* src, size_t size); +#endif + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc @@ -581,16 +606,23 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, #define SDL_memcpy memcpy #define SDL_memmove memmove #define SDL_memcmp memcmp -#define SDL_strlen strlen #define SDL_strlcpy strlcpy #define SDL_strlcat strlcat +#define SDL_strlen strlen +#define SDL_wcslen wcslen +#define SDL_wcslcpy wcslcpy +#define SDL_wcslcat wcslcat #define SDL_strdup strdup +#define SDL_wcsdup wcsdup #define SDL_strchr strchr #define SDL_strrchr strrchr #define SDL_strstr strstr +#define SDL_wcsstr wcsstr #define SDL_strtokr strtok_r #define SDL_strcmp strcmp +#define SDL_wcscmp wcscmp #define SDL_strncmp strncmp +#define SDL_wcsncmp wcsncmp #define SDL_strcasecmp strcasecmp #define SDL_strncasecmp strncasecmp #define SDL_sscanf sscanf diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h index 51a12830..d3f8c814 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -80,7 +80,9 @@ typedef struct SDL_Surface /** information needed for surfaces requiring locks */ int locked; /**< Read-only */ - void *lock_data; /**< Read-only */ + + /** list of BlitMap that hold a reference to this surface */ + void *list_blitmap; /**< Private */ /** clipping information */ SDL_Rect clip_rect; /**< Read-only */ @@ -235,6 +237,13 @@ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, int flag); +/** + * \brief Returns whether the surface is RLE enabled + * + * \return SDL_TRUE if the surface is RLE enabled, or SDL_FALSE if the surface is NULL or not RLE enabled + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface); + /** * \brief Sets the color key (transparent pixel) in a blittable surface. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h index 3b084076..d296ab1f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -89,7 +89,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int prio #endif /* __LINUX__ */ /* Platform specific functions for iOS */ -#if defined(__IPHONEOS__) && __IPHONEOS__ +#ifdef __IPHONEOS__ #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam) extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); @@ -101,7 +101,7 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); /* Platform specific functions for Android */ -#if defined(__ANDROID__) && __ANDROID__ +#ifdef __ANDROID__ /** \brief Get the JNI environment for the current thread @@ -120,6 +120,33 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void); */ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); +/** + \brief Return API level of the current device + + API level 30: Android 11 + API level 29: Android 10 + API level 28: Android 9 + API level 27: Android 8.1 + API level 26: Android 8.0 + API level 25: Android 7.1 + API level 24: Android 7.0 + API level 23: Android 6.0 + API level 22: Android 5.1 + API level 21: Android 5.0 + API level 20: Android 4.4W + API level 19: Android 4.4 + API level 18: Android 4.3 + API level 17: Android 4.2 + API level 16: Android 4.1 + API level 15: Android 4.0.3 + API level 14: Android 4.0 + API level 13: Android 3.2 + API level 12: Android 3.1 + API level 11: Android 3.0 + API level 10: Android 2.3.3 + */ +extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); + /** \brief Return true if the application is running on Android TV */ @@ -172,10 +199,18 @@ extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void); */ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void); +/** + \brief Request permissions at runtime. + + This blocks the calling thread until the permission is granted or + denied. Returns SDL_TRUE if the permission was granted. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission); + #endif /* __ANDROID__ */ /* Platform specific functions for WinRT */ -#if defined(__WINRT__) && __WINRT__ +#ifdef __WINRT__ /** * \brief WinRT / Windows Phone path types @@ -268,6 +303,17 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); */ extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); +/* Functions used by iOS application delegates to notify SDL about state changes */ +extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void); +#ifdef __IPHONEOS__ +extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void); +#endif + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h index c8236513..f0e9675d 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -106,6 +106,11 @@ typedef void *EGLSurface; #if defined(SDL_VIDEO_DRIVER_VIVANTE) #include "SDL_egl.h" #endif + +#if defined(SDL_VIDEO_DRIVER_OS2) +#define INCL_WIN +#include +#endif #endif /* SDL_PROTOTYPES_ONLY */ @@ -186,6 +191,16 @@ struct SDL_SysWMmsg int dummy; /* No Vivante window events yet */ } vivante; +#endif +#if defined(SDL_VIDEO_DRIVER_OS2) + struct + { + BOOL fFrame; /**< TRUE if hwnd is a frame window */ + HWND hwnd; /**< The window receiving the message */ + ULONG msg; /**< The message identifier */ + MPARAM mp1; /**< The first first message parameter */ + MPARAM mp2; /**< The second first message parameter */ + } os2; #endif /* Can't have an empty union */ int dummy; @@ -280,6 +295,14 @@ struct SDL_SysWMinfo } android; #endif +#if defined(SDL_VIDEO_DRIVER_OS2) + struct + { + HWND hwnd; /**< The window handle */ + HWND hwndFrame; /**< The frame window handle */ + } os2; +#endif + #if defined(SDL_VIDEO_DRIVER_VIVANTE) struct { diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h index f78b1145..4016358a 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -54,6 +54,11 @@ typedef unsigned int SDL_TLSID; /** * The SDL thread priority. * + * SDL will make system changes as necessary in order to apply the thread priority. + * Code which attempts to control thread state related to priority should be aware + * that calling SDL_SetThreadPriority may alter such state. + * SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior. + * * \note On many systems you require special privileges to set high or time critical priority. */ typedef enum { @@ -69,7 +74,7 @@ typedef enum { */ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) && !defined(HAVE_LIBC) +#if defined(__WIN32__) /** * \file SDL_thread.h * @@ -93,11 +98,18 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); #define SDL_PASSED_BEGINTHREAD_ENDTHREAD #include /* _beginthreadex() and _endthreadex() */ -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) +typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, unsigned (__stdcall *func)(void *), void * /*arg*/, unsigned, unsigned * /* threadID */); typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); +#ifndef SDL_beginthread +#define SDL_beginthread _beginthreadex +#endif +#ifndef SDL_endthread +#define SDL_endthread _endthreadex +#endif + /** * Create a thread. */ @@ -118,12 +130,12 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), */ #if defined(SDL_CreateThread) && SDL_DYNAMIC_API #undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread) #endif #elif defined(__OS2__) @@ -132,13 +144,23 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), * into a dll with Watcom's runtime statically linked. */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD + #ifndef __EMX__ #include #else #include #endif + typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/); typedef void (*pfnSDL_CurrentEndThread)(void); + +#ifndef SDL_beginthread +#define SDL_beginthread _beginthread +#endif +#ifndef SDL_endthread +#define SDL_endthread _endthread +#endif + extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, @@ -147,14 +169,15 @@ extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread); + #if defined(SDL_CreateThread) && SDL_DYNAMIC_API #undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #endif #else diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h index 2a47b043..aada7178 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h index 99dbcb8c..fa5a37ce 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h index 9c3e9896..b6bb5711 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h index 69b02706..23b65f43 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 11 +#define SDL_PATCHLEVEL 14 /** * \brief Macro to determine SDL version program was compiled against. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h index c1bb7527..54cbe0f0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -118,7 +118,8 @@ typedef enum SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */ SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */ - SDL_WINDOW_VULKAN = 0x10000000 /**< window usable for Vulkan surface */ + SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */ + SDL_WINDOW_METAL = 0x20000000 /**< window usable for Metal view */ } SDL_WindowFlags; /** @@ -174,7 +175,9 @@ typedef enum typedef enum { SDL_DISPLAYEVENT_NONE, /**< Never used */ - SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ + SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ + SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ + SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ } SDL_DisplayEventID; typedef enum @@ -484,7 +487,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS, * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED, - * ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN. + * ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN + * ::SDL_WINDOW_METAL. * * \return The created window, or NULL if window creation failed. * @@ -503,6 +507,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail. * + * If SDL_WINDOW_METAL is specified on an OS that does not support Metal, + * SDL_CreateWindow() will fail. + * * \note On non-Apple devices, SDL requires you to either not link to the * Vulkan loader or link to a dynamic library version. This limitation * may be removed in a future version of SDL. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h index d69a436b..a3de1cea 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h @@ -204,10 +204,9 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * * \sa SDL_Vulkan_CreateSurface() */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions( - SDL_Window *window, - unsigned int *pCount, - const char **pNames); +extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, + unsigned int *pCount, + const char **pNames); /** * \brief Create a Vulkan rendering surface for a window. @@ -238,10 +237,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions( * * \sa SDL_Vulkan_GetInstanceExtensions() */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface( - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR* surface); +extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, + VkInstance instance, + VkSurfaceKHR* surface); /** * \brief Get the size of a window's underlying drawable in pixels (for use diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h b/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h index 22c997c4..1ca40ccd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -51,15 +51,11 @@ /* Some compilers use a special export keyword */ #ifndef DECLSPEC -# if defined(__WIN32__) || defined(__WINRT__) -# ifdef __BORLANDC__ -# ifdef BUILD_SDL -# define DECLSPEC -# else -# define DECLSPEC __declspec(dllimport) -# endif -# else +# if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__) +# ifdef DLL_EXPORT # define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC # endif # elif defined(__OS2__) # ifdef BUILD_SDL diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h b/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h index 8e4cac3d..6aa411b0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist b/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist index 2b228c9f..0aa19b00 100644 --- a/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist +++ b/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.11 + 2.0.14 CFBundleSignature SDLX CFBundleSupportedPlatforms @@ -27,7 +27,7 @@ MacOSX CFBundleVersion - 2.0.11 + 2.0.14 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild diff --git a/MacOSX/SDL2.framework/Versions/A/SDL2 b/MacOSX/SDL2.framework/Versions/A/SDL2 index b7080fd6..51e0612a 100755 Binary files a/MacOSX/SDL2.framework/Versions/A/SDL2 and b/MacOSX/SDL2.framework/Versions/A/SDL2 differ diff --git a/Windows/SDL2/COPYING.txt b/Windows/SDL2/COPYING.txt index 1a5e2b64..f158cb42 100644 --- a/Windows/SDL2/COPYING.txt +++ b/Windows/SDL2/COPYING.txt @@ -1,6 +1,6 @@ Simple DirectMedia Layer -Copyright (C) 1997-2019 Sam Lantinga +Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/WhatsNew.txt b/Windows/SDL2/WhatsNew.txt index ef2b07b5..04c87588 100644 --- a/Windows/SDL2/WhatsNew.txt +++ b/Windows/SDL2/WhatsNew.txt @@ -2,11 +2,141 @@ This is a list of major changes in SDL's version history. --------------------------------------------------------------------------- -2.0.11/12: +2.0.14: +--------------------------------------------------------------------------- +General: +* Added support for PS5 DualSense and Xbox Series X controllers to the HIDAPI controller driver +* Added game controller button constants for paddles and new buttons +* Added game controller functions to get additional information: + * SDL_GameControllerGetSerial() + * SDL_GameControllerHasAxis() + * SDL_GameControllerHasButton() + * SDL_GameControllerGetNumTouchpads() + * SDL_GameControllerGetNumTouchpadFingers() + * SDL_GameControllerGetTouchpadFinger() + * SDL_GameControllerHasSensor() + * SDL_GameControllerSetSensorEnabled() + * SDL_GameControllerIsSensorEnabled() + * SDL_GameControllerGetSensorData() + * SDL_GameControllerRumbleTriggers() + * SDL_GameControllerHasLED() + * SDL_GameControllerSetLED() +* Added the hint SDL_HINT_JOYSTICK_HIDAPI_PS5 to control whether the HIDAPI driver for PS5 controllers should be used. +* Added joystick functions to get additional information: + * SDL_JoystickGetSerial() + * SDL_JoystickRumbleTriggers() + * SDL_JoystickHasLED() + * SDL_JoystickSetLED() +* Added an API to allow the application to create virtual joysticks: + * SDL_JoystickAttachVirtual() + * SDL_JoystickDetachVirtual() + * SDL_JoystickIsVirtual() + * SDL_JoystickSetVirtualAxis() + * SDL_JoystickSetVirtualButton() + * SDL_JoystickSetVirtualHat() +* Added SDL_LockSensors() and SDL_UnlockSensors() to guarantee exclusive access to the sensor list +* Added SDL_HAPTIC_STEERING_AXIS to play an effect on the steering wheel +* Added the hint SDL_HINT_MOUSE_RELATIVE_SCALING to control whether relative motion is scaled by the screen DPI or renderer logical size +* The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is now false for better compatibility with modern window managers +* Added SDL_GetPreferredLocales() to get the application's current locale setting +* Added the hint SDL_HINT_PREFERRED_LOCALES to override your application's default locale setting +* Added SDL_OpenURL() to open a URL in the system's default browser +* Added SDL_HasSurfaceRLE() to tell whether a surface is currently using RLE encoding +* Added SDL_SIMDRealloc() to reallocate memory obtained from SDL_SIMDAlloc() +* Added SDL_GetErrorMsg() to get the last error in a thread-safe way +* Added SDL_crc32(), SDL_wcscasecmp(), SDL_wcsncasecmp(), SDL_trunc(), SDL_truncf() +* Added clearer names for RGB pixel formats, e.g. SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_XBGR8888, etc. + +Windows: +* Added the RAWINPUT controller driver to support more than 4 Xbox controllers simultaneously +* Added the hint SDL_HINT_JOYSTICK_RAWINPUT to control whether the RAWINPUT driver should be used +* Added the hint SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT to control whether XInput and WGI should be used to for complete controller functionality with the RAWINPUT driver. + +macOS: +* Added the SDL_WINDOW_METAL flag to specify that a window should be created with a Metal view +* Added SDL_Metal_GetLayer() to get the CAMetalLayer backing a Metal view +* Added SDL_Metal_GetDrawableSize() to get the size of a window's drawable, in pixels + +Linux: +* Added the hint SDL_HINT_AUDIO_DEVICE_APP_NAME to specify the name that shows up in PulseAudio for your application +* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_NAME to specify the name that shows up in PulseAudio associated with your audio stream +* Added the hint SDL_HINT_LINUX_JOYSTICK_DEADZONES to control whether HID defined dead zones should be respected on Linux +* Added the hint SDL_HINT_THREAD_PRIORITY_POLICY to specify the thread scheduler policy +* Added the hint SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow time critical threads to use a realtime scheduling policy + +Android: +* Added SDL_AndroidRequestPermission() to request a specific system permission +* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO to control whether audio will pause when the application goes intot he background + +OS/2: +* Added support for OS/2, see docs/README-os2.md for details + +Emscripten (running in a web browser): +* Added the hint SDL_HINT_EMSCRIPTEN_ASYNCIFY to control whether SDL should call emscripten_sleep internally + + +--------------------------------------------------------------------------- +2.0.12: --------------------------------------------------------------------------- General: +* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture * Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface. +* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation +* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0. +* Added the window underneath the finger to the SDL_TouchFingerEvent +* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro) +* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection +* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index +* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device +* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled. +* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used. +* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver +* Added support for many game controllers, including: + * 8BitDo FC30 Pro + * 8BitDo M30 GamePad + * BDA PS4 Fightpad + * HORI Fighting Commander + * Hyperkin Duke + * Hyperkin X91 + * MOGA XP5-A Plus + * NACON GC-400ES + * NVIDIA Controller v01.04 + * PDP Versus Fighting Pad + * Razer Raion Fightpad for PS4 + * Razer Serval + * Stadia Controller + * SteelSeries Stratus Duo + * Victrix Pro Fight Stick for PS4 + * Xbox One Elite Series 2 +* Fixed blocking game controller rumble calls when using the HIDAPI driver +* Added SDL_zeroa() macro to zero an array of elements +* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features + +Windows: +* Fixed crash when using the release SDL DLL with applications built with gcc +* Fixed performance regression in event handling introduced in 2.0.10 +* Added support for SDL_SetThreadPriority() for UWP applications + +Linux: +* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows +* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default + +iOS / tvOS / macOS: +* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window. + +iOS/ tvOS: +* Added support for Bluetooth Steam Controllers as game controllers + +tvOS: +* Fixed support for surround sound on Apple TV + +Android: +* Added SDL_GetAndroidSDKVersion() to return the API level of the current device +* Added support for audio capture using OpenSL-ES +* Added support for Bluetooth Steam Controllers as game controllers +* Fixed rare crashes when the app goes into the background or terminates + --------------------------------------------------------------------------- 2.0.10: diff --git a/Windows/SDL2/bin/sdl2-config b/Windows/SDL2/bin/sdl2-config index 737d36f6..859dff16 100755 --- a/Windows/SDL2/bin/sdl2-config +++ b/Windows/SDL2/bin/sdl2-config @@ -40,7 +40,7 @@ while test $# -gt 0; do lib_suffix=$optarg ;; --version) - echo 2.0.11 + echo 2.0.14 ;; --cflags) echo -I${prefix}/include -Dmain=SDL_main diff --git a/Windows/SDL2/include/SDL.h b/Windows/SDL2/include/SDL.h index e4329395..e2656caf 100644 --- a/Windows/SDL2/include/SDL.h +++ b/Windows/SDL2/include/SDL.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,6 +59,8 @@ #include "SDL_timer.h" #include "SDL_version.h" #include "SDL_video.h" +#include "SDL_locale.h" +#include "SDL_misc.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ diff --git a/Windows/SDL2/include/SDL_assert.h b/Windows/SDL2/include/SDL_assert.h index 8baecb63..f8a368ec 100644 --- a/Windows/SDL2/include/SDL_assert.h +++ b/Windows/SDL2/include/SDL_assert.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +53,8 @@ assert can have unique static variables associated with it. #define SDL_TriggerBreakpoint() __debugbreak() #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) +#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */ + #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" ) #elif defined(__386__) && defined(__WATCOMC__) #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__) diff --git a/Windows/SDL2/include/SDL_atomic.h b/Windows/SDL2/include/SDL_atomic.h index deee35f9..e99f1bcc 100644 --- a/Windows/SDL2/include/SDL_atomic.h +++ b/Windows/SDL2/include/SDL_atomic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_audio.h b/Windows/SDL2/include/SDL_audio.h index 305c01a9..4ba34914 100644 --- a/Windows/SDL2/include/SDL_audio.h +++ b/Windows/SDL2/include/SDL_audio.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_bits.h b/Windows/SDL2/include/SDL_bits.h index b116cc8d..db150ed0 100644 --- a/Windows/SDL2/include/SDL_bits.h +++ b/Windows/SDL2/include/SDL_bits.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_blendmode.h b/Windows/SDL2/include/SDL_blendmode.h index 6f0a22b9..5e21a79e 100644 --- a/Windows/SDL2/include/SDL_blendmode.h +++ b/Windows/SDL2/include/SDL_blendmode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +50,9 @@ typedef enum SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate dstRGB = srcRGB * dstRGB dstA = dstA */ + SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply + dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) + dstA = (srcA * dstA) + (dstA * (1-srcA)) */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/Windows/SDL2/include/SDL_clipboard.h b/Windows/SDL2/include/SDL_clipboard.h index c4f8766c..dbf69fce 100644 --- a/Windows/SDL2/include/SDL_clipboard.h +++ b/Windows/SDL2/include/SDL_clipboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_config.h b/Windows/SDL2/include/SDL_config.h index 7d62d3e2..3937dbc3 100644 --- a/Windows/SDL2/include/SDL_config.h +++ b/Windows/SDL2/include/SDL_config.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_config_android.h b/Windows/SDL2/include/SDL_config_android.h index 9cb70bfe..d1148cf2 100644 --- a/Windows/SDL2/include/SDL_config_android.h +++ b/Windows/SDL2/include/SDL_config_android.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -121,6 +121,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -136,8 +138,9 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_ANDROID 1 -#define SDL_JOYSTICK_HIDAPI 1 -#define SDL_HAPTIC_ANDROID 1 +#define SDL_JOYSTICK_HIDAPI 1 +#define SDL_JOYSTICK_VIRTUAL 1 +#define SDL_HAPTIC_ANDROID 1 /* Enable sensor driver */ #define SDL_SENSOR_ANDROID 1 diff --git a/Windows/SDL2/include/SDL_config_iphoneos.h b/Windows/SDL2/include/SDL_config_iphoneos.h index edfc03e2..f06ad335 100644 --- a/Windows/SDL2/include/SDL_config_iphoneos.h +++ b/Windows/SDL2/include/SDL_config_iphoneos.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -122,6 +122,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -136,9 +138,11 @@ /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ #define SDL_HAPTIC_DUMMY 1 -/* Enable MFi joystick support */ -#define SDL_JOYSTICK_MFI 1 +/* Enable joystick support */ +/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */ /*#define SDL_JOYSTICK_HIDAPI 1*/ +#define SDL_JOYSTICK_MFI 1 +#define SDL_JOYSTICK_VIRTUAL 1 #ifdef __TVOS__ #define SDL_SENSOR_DUMMY 1 @@ -167,8 +171,10 @@ #define SDL_VIDEO_RENDER_OGL_ES 1 #define SDL_VIDEO_RENDER_OGL_ES2 1 -/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */ -#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)) +/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer + Also supported in simulator from iOS 13.0 and tvOS 13.0 + */ +#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))) #define SDL_PLATFORM_SUPPORTS_METAL 1 #else #define SDL_PLATFORM_SUPPORTS_METAL 0 @@ -195,11 +201,6 @@ /* enable iOS extended launch screen */ #define SDL_IPHONE_LAUNCHSCREEN 1 -/* Set max recognized G-force from accelerometer - See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed - */ -#define SDL_IPHONE_MAX_GFORCE 5.0 - /* enable filesystem support */ #define SDL_FILESYSTEM_COCOA 1 diff --git a/Windows/SDL2/include/SDL_config_macosx.h b/Windows/SDL2/include/SDL_config_macosx.h index 22287dfc..4b45f165 100644 --- a/Windows/SDL2/include/SDL_config_macosx.h +++ b/Windows/SDL2/include/SDL_config_macosx.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -125,6 +125,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -139,10 +141,16 @@ #define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable various input drivers */ +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_JOYSTICK_IOKIT 1 -#define SDL_JOYSTICK_HIDAPI 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_IOKIT 1 +/* The MFI controller support requires ARC Objective C runtime */ +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__) +#define SDL_JOYSTICK_MFI 1 +#endif + /* Enable the dummy sensor driver */ #define SDL_SENSOR_DUMMY 1 @@ -195,7 +203,7 @@ #endif /* Metal only supported on 64-bit architectures with 10.11+ */ -#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) +#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) #define SDL_PLATFORM_SUPPORTS_METAL 1 #else #define SDL_PLATFORM_SUPPORTS_METAL 0 diff --git a/Windows/SDL2/include/SDL_config_minimal.h b/Windows/SDL2/include/SDL_config_minimal.h index 20e45b88..b9c39584 100644 --- a/Windows/SDL2/include/SDL_config_minimal.h +++ b/Windows/SDL2/include/SDL_config_minimal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_config_os2.h b/Windows/SDL2/include/SDL_config_os2.h index f03ca4a5..1922217d 100644 --- a/Windows/SDL2/include/SDL_config_os2.h +++ b/Windows/SDL2/include/SDL_config_os2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -27,14 +27,17 @@ #define SDL_AUDIO_DRIVER_DUMMY 1 #define SDL_AUDIO_DRIVER_DISK 1 +#define SDL_AUDIO_DRIVER_OS2 1 #define SDL_POWER_DISABLED 1 #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 /*#undef SDL_JOYSTICK_HIDAPI */ +/*#undef SDL_JOYSTICK_VIRTUAL */ #define SDL_SENSOR_DUMMY 1 #define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_OS2 1 /* Enable OpenGL support */ /* #undef SDL_VIDEO_OPENGL */ @@ -42,18 +45,19 @@ /* Enable Vulkan support */ /* #undef SDL_VIDEO_VULKAN */ -#define SDL_LOADSO_DISABLED 1 -#define SDL_THREADS_DISABLED 1 -#define SDL_TIMERS_DISABLED 1 -#define SDL_FILESYSTEM_DUMMY 1 +#define SDL_THREAD_OS2 1 +#define SDL_LOADSO_OS2 1 +#define SDL_TIMER_OS2 1 +#define SDL_FILESYSTEM_OS2 1 /* Enable assembly routines */ #define SDL_ASSEMBLY_ROUTINES 1 -/* #undef HAVE_LIBSAMPLERATE_H */ +/* use libsamplerate for audio rate conversion. */ +/*#define HAVE_LIBSAMPLERATE_H 1 */ /* Enable dynamic libsamplerate support */ -/* #undef SDL_LIBSAMPLERATE_DYNAMIC */ +#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL" #define HAVE_LIBC 1 @@ -99,6 +103,8 @@ #define HAVE_WCSLCPY 1 #define HAVE_WCSLCAT 1 #define HAVE_WCSCMP 1 +#define HAVE__WCSICMP 1 +#define HAVE__WCSNICMP 1 #define HAVE_STRLEN 1 #define HAVE_STRLCPY 1 #define HAVE_STRLCAT 1 @@ -176,5 +182,7 @@ /* #undef HAVE_SQRTF */ #define HAVE_TAN 1 /* #undef HAVE_TANF */ +/* #undef HAVE_TRUNC */ +/* #undef HAVE_TRUNCF */ #endif /* SDL_config_os2_h_ */ diff --git a/Windows/SDL2/include/SDL_config_pandora.h b/Windows/SDL2/include/SDL_config_pandora.h index 66ccf895..8728a638 100644 --- a/Windows/SDL2/include/SDL_config_pandora.h +++ b/Windows/SDL2/include/SDL_config_pandora.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -102,6 +102,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -110,8 +112,8 @@ #define SDL_AUDIO_DRIVER_OSS 1 #define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 #define SDL_JOYSTICK_LINUX 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_LINUX 1 #define SDL_SENSOR_DUMMY 1 diff --git a/Windows/SDL2/include/SDL_config_psp.h b/Windows/SDL2/include/SDL_config_psp.h index dd2d6ecf..235fe08e 100644 --- a/Windows/SDL2/include/SDL_config_psp.h +++ b/Windows/SDL2/include/SDL_config_psp.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -136,6 +136,7 @@ /* Enable the PSP joystick driver (src/joystick/psp/\*.c) */ #define SDL_JOYSTICK_PSP 1 +#define SDL_JOYSTICK_VIRTUAL 1 /* Enable the dummy sensor driver */ #define SDL_SENSOR_DUMMY 1 diff --git a/Windows/SDL2/include/SDL_config_windows.h b/Windows/SDL2/include/SDL_config_windows.h index c66d8754..18a36382 100644 --- a/Windows/SDL2/include/SDL_config_windows.h +++ b/Windows/SDL2/include/SDL_config_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -84,6 +84,7 @@ typedef unsigned int uintptr_t; #define HAVE_XINPUT_H 1 #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 +#define HAVE_SENSORSAPI_H /* This is disabled by default to avoid C runtime dependencies and manifest requirements */ #ifdef HAVE_LIBC @@ -133,6 +134,8 @@ typedef unsigned int uintptr_t; #define HAVE_STRNCMP 1 #define HAVE__STRICMP 1 #define HAVE__STRNICMP 1 +#define HAVE__WCSICMP 1 +#define HAVE__WCSNICMP 1 #define HAVE_ACOS 1 #define HAVE_ACOSF 1 #define HAVE_ASIN 1 @@ -172,6 +175,8 @@ typedef unsigned int uintptr_t; #define HAVE_VSSCANF 1 #define HAVE_SCALBN 1 #define HAVE_SCALBNF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #endif /* This function is available with at least the VC++ 2008 C runtime library */ #if _MSC_VER >= 1400 @@ -186,8 +191,22 @@ typedef unsigned int uintptr_t; #define HAVE_STDDEF_H 1 #endif +/* Check to see if we have Windows 10 build environment */ +#if _MSC_VER >= 1911 /* Visual Studio 15.3 */ +#include +#if _WIN32_WINNT >= 0x0601 /* Windows 7 */ +#define SDL_WINDOWS7_SDK +#endif +#if _WIN32_WINNT >= 0x0602 /* Windows 8 */ +#define SDL_WINDOWS8_SDK +#endif +#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */ +#define SDL_WINDOWS10_SDK +#endif +#endif /* _MSC_VER >= 1911 */ + /* Enable various audio drivers */ -/* #undef SDL_AUDIO_DRIVER_WASAPI */ +#define SDL_AUDIO_DRIVER_WASAPI 1 #define SDL_AUDIO_DRIVER_DSOUND 1 #define SDL_AUDIO_DRIVER_WINMM 1 #define SDL_AUDIO_DRIVER_DISK 1 @@ -195,13 +214,20 @@ typedef unsigned int uintptr_t; /* Enable various input drivers */ #define SDL_JOYSTICK_DINPUT 1 -#define SDL_JOYSTICK_XINPUT 1 #define SDL_JOYSTICK_HIDAPI 1 +#ifndef __WINRT__ +#define SDL_JOYSTICK_RAWINPUT 1 +#endif +#define SDL_JOYSTICK_VIRTUAL 1 +#ifdef SDL_WINDOWS10_SDK +#define SDL_JOYSTICK_WGI 1 +#endif +#define SDL_JOYSTICK_XINPUT 1 #define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_XINPUT 1 -/* Enable the dummy sensor driver */ -#define SDL_SENSOR_DUMMY 1 +/* Enable the sensor driver */ +#define SDL_SENSOR_WINDOWS 1 /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 @@ -219,8 +245,8 @@ typedef unsigned int uintptr_t; #ifndef SDL_VIDEO_RENDER_D3D #define SDL_VIDEO_RENDER_D3D 1 #endif -#ifndef SDL_VIDEO_RENDER_D3D11 -#define SDL_VIDEO_RENDER_D3D11 0 +#ifdef SDL_WINDOWS7_SDK +#define SDL_VIDEO_RENDER_D3D11 1 #endif /* Enable OpenGL support */ @@ -258,3 +284,5 @@ typedef unsigned int uintptr_t; #endif #endif /* SDL_config_windows_h_ */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Windows/SDL2/include/SDL_config_winrt.h b/Windows/SDL2/include/SDL_config_winrt.h index cb85b234..02079f53 100644 --- a/Windows/SDL2/include/SDL_config_winrt.h +++ b/Windows/SDL2/include/SDL_config_winrt.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -181,6 +181,8 @@ typedef unsigned int uintptr_t; #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE__FSEEKI64 1 /* Enable various audio drivers */ @@ -193,6 +195,7 @@ typedef unsigned int uintptr_t; #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 #else +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_JOYSTICK_XINPUT 1 #define SDL_HAPTIC_XINPUT 1 #endif diff --git a/Windows/SDL2/include/SDL_config_wiz.h b/Windows/SDL2/include/SDL_config_wiz.h index 724c55fc..f65af8eb 100644 --- a/Windows/SDL2/include/SDL_config_wiz.h +++ b/Windows/SDL2/include/SDL_config_wiz.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -117,6 +117,8 @@ #define HAVE_SQRTF 1 #define HAVE_TAN 1 #define HAVE_TANF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 #define HAVE_SIGACTION 1 #define HAVE_SETJMP 1 #define HAVE_NANOSLEEP 1 @@ -126,8 +128,8 @@ #define SDL_AUDIO_DRIVER_OSS 1 #define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 #define SDL_JOYSTICK_LINUX 1 +#define SDL_JOYSTICK_VIRTUAL 1 #define SDL_HAPTIC_LINUX 1 #define SDL_SENSOR_DUMMY 1 diff --git a/Windows/SDL2/include/SDL_copying.h b/Windows/SDL2/include/SDL_copying.h index 1ef18cd1..4f8a2bcd 100644 --- a/Windows/SDL2/include/SDL_copying.h +++ b/Windows/SDL2/include/SDL_copying.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_cpuinfo.h b/Windows/SDL2/include/SDL_cpuinfo.h index 2d094e88..df3123c0 100644 --- a/Windows/SDL2/include/SDL_cpuinfo.h +++ b/Windows/SDL2/include/SDL_cpuinfo.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -246,10 +246,33 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void); * \return Pointer to newly-allocated block, NULL if out of memory. * * \sa SDL_SIMDAlignment + * \sa SDL_SIMDRealloc * \sa SDL_SIMDFree */ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); +/** + * \brief Reallocate memory obtained from SDL_SIMDAlloc + * + * It is not valid to use this function on a pointer from anything but + * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc, + * SDL_malloc, memalign, new[], etc. + * + * \param mem The pointer obtained from SDL_SIMDAlloc. This function also + * accepts NULL, at which point this function is the same as + * calling SDL_realloc with a NULL pointer. + * \param len The length, in bytes, of the block to allocated. The actual + * allocated block might be larger due to padding, etc. Passing 0 + * will return a non-NULL pointer, assuming the system isn't out of + * memory. + * \return Pointer to newly-reallocated block, NULL if out of memory. + * + * \sa SDL_SIMDAlignment + * \sa SDL_SIMDAlloc + * \sa SDL_SIMDFree + */ +extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len); + /** * \brief Deallocate memory obtained from SDL_SIMDAlloc * @@ -260,6 +283,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); * However, SDL_SIMDFree(NULL) is a legal no-op. * * \sa SDL_SIMDAlloc + * \sa SDL_SIMDRealloc */ extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr); diff --git a/Windows/SDL2/include/SDL_egl.h b/Windows/SDL2/include/SDL_egl.h index f95a9067..531441e6 100644 --- a/Windows/SDL2/include/SDL_egl.h +++ b/Windows/SDL2/include/SDL_egl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_endian.h b/Windows/SDL2/include/SDL_endian.h index 1e6daae1..171c008a 100644 --- a/Windows/SDL2/include/SDL_endian.h +++ b/Windows/SDL2/include/SDL_endian.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_error.h b/Windows/SDL2/include/SDL_error.h index 24416e69..962d62f6 100644 --- a/Windows/SDL2/include/SDL_error.h +++ b/Windows/SDL2/include/SDL_error.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,9 +37,45 @@ extern "C" { #endif /* Public functions */ -/* SDL_SetError() unconditionally returns -1. */ + + +/** + * \brief Set the error message for the current thread + * + * \return -1, there is no error handling for this function + */ extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); + +/** + * \brief Get the last error message that was set + * + * SDL API functions may set error messages and then succeed, so you should + * only use the error value if a function fails. + * + * This returns a pointer to a static buffer for convenience and should not + * be called by multiple threads simultaneously. + * + * \return a pointer to the last error message that was set + */ extern DECLSPEC const char *SDLCALL SDL_GetError(void); + +/** + * \brief Get the last error message that was set for the current thread + * + * SDL API functions may set error messages and then succeed, so you should + * only use the error value if a function fails. + * + * \param errstr A buffer to fill with the last error message that was set + * for the current thread + * \param maxlen The size of the buffer pointed to by the errstr parameter + * + * \return errstr + */ +extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen); + +/** + * \brief Clear the error message for the current thread + */ extern DECLSPEC void SDLCALL SDL_ClearError(void); /** diff --git a/Windows/SDL2/include/SDL_events.h b/Windows/SDL2/include/SDL_events.h index eaf57434..ae560c08 100644 --- a/Windows/SDL2/include/SDL_events.h +++ b/Windows/SDL2/include/SDL_events.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -85,6 +85,8 @@ typedef enum Called on Android in onResume() */ + SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */ + /* Display events */ SDL_DISPLAYEVENT = 0x150, /**< Display state change */ @@ -123,6 +125,10 @@ typedef enum SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */ SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */ SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */ + SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */ + SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */ + SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */ + SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */ /* Touch events */ SDL_FINGERDOWN = 0x700, @@ -413,6 +419,33 @@ typedef struct SDL_ControllerDeviceEvent Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ } SDL_ControllerDeviceEvent; +/** + * \brief Game controller touchpad event structure (event.ctouchpad.*) + */ +typedef struct SDL_ControllerTouchpadEvent +{ + Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + SDL_JoystickID which; /**< The joystick instance id */ + Sint32 touchpad; /**< The index of the touchpad */ + Sint32 finger; /**< The index of the finger on the touchpad */ + float x; /**< Normalized in the range 0...1 with 0 being on the left */ + float y; /**< Normalized in the range 0...1 with 0 being at the top */ + float pressure; /**< Normalized in the range 0...1 */ +} SDL_ControllerTouchpadEvent; + +/** + * \brief Game controller sensor event structure (event.csensor.*) + */ +typedef struct SDL_ControllerSensorEvent +{ + Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + SDL_JoystickID which; /**< The joystick instance id */ + Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */ + float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */ +} SDL_ControllerSensorEvent; + /** * \brief Audio device event structure (event.adevice.*) */ @@ -557,33 +590,35 @@ typedef struct SDL_SysWMEvent */ typedef union SDL_Event { - Uint32 type; /**< Event type, shared with all events */ - SDL_CommonEvent common; /**< Common event data */ - SDL_DisplayEvent display; /**< Display event data */ - SDL_WindowEvent window; /**< Window event data */ - SDL_KeyboardEvent key; /**< Keyboard event data */ - SDL_TextEditingEvent edit; /**< Text editing event data */ - SDL_TextInputEvent text; /**< Text input event data */ - SDL_MouseMotionEvent motion; /**< Mouse motion event data */ - SDL_MouseButtonEvent button; /**< Mouse button event data */ - SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ - SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ - SDL_JoyBallEvent jball; /**< Joystick ball event data */ - SDL_JoyHatEvent jhat; /**< Joystick hat event data */ - SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ - SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ - SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ - SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ - SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ - SDL_AudioDeviceEvent adevice; /**< Audio device event data */ - SDL_SensorEvent sensor; /**< Sensor event data */ - SDL_QuitEvent quit; /**< Quit request event data */ - SDL_UserEvent user; /**< Custom event data */ - SDL_SysWMEvent syswm; /**< System dependent window event data */ - SDL_TouchFingerEvent tfinger; /**< Touch finger event data */ - SDL_MultiGestureEvent mgesture; /**< Gesture event data */ - SDL_DollarGestureEvent dgesture; /**< Gesture event data */ - SDL_DropEvent drop; /**< Drag and drop event data */ + Uint32 type; /**< Event type, shared with all events */ + SDL_CommonEvent common; /**< Common event data */ + SDL_DisplayEvent display; /**< Display event data */ + SDL_WindowEvent window; /**< Window event data */ + SDL_KeyboardEvent key; /**< Keyboard event data */ + SDL_TextEditingEvent edit; /**< Text editing event data */ + SDL_TextInputEvent text; /**< Text input event data */ + SDL_MouseMotionEvent motion; /**< Mouse motion event data */ + SDL_MouseButtonEvent button; /**< Mouse button event data */ + SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ + SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ + SDL_JoyBallEvent jball; /**< Joystick ball event data */ + SDL_JoyHatEvent jhat; /**< Joystick hat event data */ + SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ + SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ + SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ + SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ + SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ + SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */ + SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */ + SDL_AudioDeviceEvent adevice; /**< Audio device event data */ + SDL_SensorEvent sensor; /**< Sensor event data */ + SDL_QuitEvent quit; /**< Quit request event data */ + SDL_UserEvent user; /**< Custom event data */ + SDL_SysWMEvent syswm; /**< System dependent window event data */ + SDL_TouchFingerEvent tfinger; /**< Touch finger event data */ + SDL_MultiGestureEvent mgesture; /**< Gesture event data */ + SDL_DollarGestureEvent dgesture; /**< Gesture event data */ + SDL_DropEvent drop; /**< Drag and drop event data */ /* This is necessary for ABI compatibility between Visual C++ and GCC Visual C++ will respect the push pack pragma and use 52 bytes for diff --git a/Windows/SDL2/include/SDL_filesystem.h b/Windows/SDL2/include/SDL_filesystem.h index 6d97e589..68042b60 100644 --- a/Windows/SDL2/include/SDL_filesystem.h +++ b/Windows/SDL2/include/SDL_filesystem.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_gamecontroller.h b/Windows/SDL2/include/SDL_gamecontroller.h index 5ee8e8e9..e42433c9 100644 --- a/Windows/SDL2/include/SDL_gamecontroller.h +++ b/Windows/SDL2/include/SDL_gamecontroller.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -31,6 +31,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" #include "SDL_rwops.h" +#include "SDL_sensor.h" #include "SDL_joystick.h" #include "begin_code.h" @@ -64,7 +65,9 @@ typedef enum SDL_CONTROLLER_TYPE_XBOXONE, SDL_CONTROLLER_TYPE_PS3, SDL_CONTROLLER_TYPE_PS4, - SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO + SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO, + SDL_CONTROLLER_TYPE_VIRTUAL, + SDL_CONTROLLER_TYPE_PS5 } SDL_GameControllerType; typedef enum @@ -170,7 +173,7 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID * * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller); +extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller); /** * Is the joystick on this index supported by the game controller interface? @@ -245,19 +248,26 @@ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController * Get the USB vendor ID of an opened controller, if available. * If the vendor ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller); /** * Get the USB product ID of an opened controller, if available. * If the product ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller); /** * Get the product version of an opened controller, if available. * If the product version isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller); +extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller); + +/** + * Get the serial number of an opened controller, if available. + * + * Returns the serial number of the controller, or NULL if it is not available. + */ +extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller); /** * Returns SDL_TRUE if the controller has been opened and currently connected, @@ -328,6 +338,12 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); +/** + * Return whether a game controller has a given axis + */ +extern DECLSPEC SDL_bool SDLCALL +SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); + /** * Get the current state of an axis control on a game controller. * @@ -337,8 +353,7 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, * The axis indices start at index 0. */ extern DECLSPEC Sint16 SDLCALL -SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); +SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); /** * The list of buttons available from a controller @@ -361,6 +376,12 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; @@ -381,6 +402,11 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); +/** + * Return whether a game controller has a given button + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller, + SDL_GameControllerButton button); /** * Get the current state of a button on a game controller. @@ -391,7 +417,68 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga SDL_GameControllerButton button); /** - * Trigger a rumble effect + * Get the number of touchpads on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller); + +/** + * Get the number of supported simultaneous fingers on a touchpad on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad); + +/** + * Get the current state of a finger on a touchpad on a game controller. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure); + +/** + * Return whether a game controller has a particular sensor. + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * + * \return SDL_TRUE if the sensor exists, SDL_FALSE otherwise. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type); + +/** + * Set whether data reporting for a game controller sensor is enabled + * + * \param gamecontroller The controller to update + * \param type The type of sensor to enable/disable + * \param enabled Whether data reporting should be enabled + * + * \return 0 or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled); + +/** + * Query whether sensor data reporting is enabled for a game controller + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * + * \return SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type); + +/** + * Get the current state of a game controller sensor. + * + * The number of values and interpretation of the data is sensor dependent. + * See SDL_sensor.h for the details for each type of sensor. + * + * \param gamecontroller The controller to query + * \param type The type of sensor to query + * \param data A pointer filled with the current sensor state + * \param num_values The number of values to write to data + * + * \return 0 or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values); + +/** + * Start a rumble effect * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. * * \param gamecontroller The controller to vibrate @@ -399,10 +486,44 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * - * \return 0, or -1 if rumble isn't supported on this joystick + * \return 0, or -1 if rumble isn't supported on this controller */ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); +/** + * Start a rumble effect in the game controller's triggers + * Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling. + * + * \param gamecontroller The controller to vibrate + * \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF + * \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF + * \param duration_ms The duration of the rumble effect, in milliseconds + * + * \return 0, or -1 if rumble isn't supported on this controller + */ +extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); + +/** + * Return whether a controller has an LED + * + * \param gamecontroller The controller to query + * + * \return SDL_TRUE, or SDL_FALSE if this controller does not have a modifiable LED + */ +extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller); + +/** + * Update a controller's LED color. + * + * \param gamecontroller The controller to update + * \param red The intensity of the red LED + * \param green The intensity of the green LED + * \param blue The intensity of the blue LED + * + * \return 0, or -1 if this controller does not have a modifiable LED + */ +extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue); + /** * Close a controller previously opened with SDL_GameControllerOpen(). */ diff --git a/Windows/SDL2/include/SDL_gesture.h b/Windows/SDL2/include/SDL_gesture.h index 9d25e9c1..81ed4317 100644 --- a/Windows/SDL2/include/SDL_gesture.h +++ b/Windows/SDL2/include/SDL_gesture.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_haptic.h b/Windows/SDL2/include/SDL_haptic.h index 07562768..c27da118 100644 --- a/Windows/SDL2/include/SDL_haptic.h +++ b/Windows/SDL2/include/SDL_haptic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -336,6 +336,14 @@ typedef struct _SDL_Haptic SDL_Haptic; */ #define SDL_HAPTIC_SPHERICAL 2 +/** + * \brief Use this value to play an effect on the steering wheel axis. This + * provides better compatibility across platforms and devices as SDL will guess + * the correct axis. + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_STEERING_AXIS 3 + /* @} *//* Direction encodings */ /* @} *//* Haptic features */ @@ -444,6 +452,7 @@ typedef struct _SDL_Haptic SDL_Haptic; * \sa SDL_HAPTIC_POLAR * \sa SDL_HAPTIC_CARTESIAN * \sa SDL_HAPTIC_SPHERICAL + * \sa SDL_HAPTIC_STEERING_AXIS * \sa SDL_HapticEffect * \sa SDL_HapticNumAxes */ diff --git a/Windows/SDL2/include/SDL_hints.h b/Windows/SDL2/include/SDL_hints.h index d36815b9..50a5a089 100644 --- a/Windows/SDL2/include/SDL_hints.h +++ b/Windows/SDL2/include/SDL_hints.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -244,6 +244,17 @@ extern "C" { */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" +/** + * \brief A variable controlling whether X11 should use GLX or EGL by default + * + * This variable can be set to the following values: + * "0" - Use GLX + * "1" - Use EGL + * + * By default SDL will use GLX when both are present. + */ +#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL" + /** * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * @@ -303,6 +314,17 @@ extern "C" { */ #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" +/** + * \brief A variable controlling whether relative mouse motion is affected by renderer scaling + * + * This variable can be set to the following values: + * "0" - Relative motion is unaffected by DPI or renderer's logical size + * "1" - Relative motion is scaled according to DPI scaling and logical size + * + * By default relative mouse deltas are affected by DPI and renderer scaling + */ +#define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING" + /** * \brief A variable controlling whether relative mouse mode is implemented using mouse warping * @@ -347,7 +369,9 @@ extern "C" { #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" /** - * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. + * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false. + * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're + * seeing if "true" causes more problems than it solves in modern times. * */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" @@ -457,6 +481,25 @@ extern "C" { */ #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING" +/** + * \brief A variable that overrides the automatic controller type detection + * + * The variable should be comma separated entries, in the form: VID/PID=type + * + * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd + * + * The type should be one of: + * Xbox360 + * XboxOne + * PS3 + * PS4 + * PS5 + * SwitchPro + * + * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) + */ +#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE" + /** * \brief A variable that lets you manually hint extra gamecontroller db entries. * @@ -561,6 +604,17 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" +/** + * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used. + * + * This variable can be set to the following values: + * "0" - HIDAPI driver is not used + * "1" - HIDAPI driver is used + * + * The default is the value of SDL_HINT_JOYSTICK_HIDAPI + */ +#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5" + /** * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. * @@ -605,10 +659,23 @@ extern "C" { * "0" - HIDAPI driver is not used * "1" - HIDAPI driver is used * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI + * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI */ #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" + /** + * \brief A variable controlling whether the HIDAPI driver for XBox controllers on Windows should pull correlated + * data from XInput. + * + * This variable can be set to the following values: + * "0" - HIDAPI Xbox driver will only use HIDAPI data + * "1" - HIDAPI Xbox driver will also pull data from XInput, providing better trigger axes, guide button + * presses, and rumble support + * + * The default is "1". This hint applies to any joysticks opened after setting the hint. + */ +#define SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT "SDL_JOYSTICK_HIDAPI_CORRELATE_XINPUT" + /** * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used. * @@ -631,6 +698,35 @@ extern "C" { */ #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" + /** + * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices. + * + * This variable can be set to the following values: + * "0" - RAWINPUT drivers are not used + * "1" - RAWINPUT drivers are used (the default) + * + */ +#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" + + /** + * \brief A variable controlling whether a separate thread should be used + * for handling joystick detection and raw input messages on Windows + * + * This variable can be set to the following values: + * "0" - A separate thread is not used (the default) + * "1" - A separate thread is used for handling raw input messages + * + */ +#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD" + + /** + * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values. + * + * This variable can be set to the following values: + * "0" - Return unfiltered joystick axis values (the default) + * "1" - Return axis values with deadzones taken into account + */ +#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES" /** * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. @@ -701,6 +797,42 @@ extern "C" { */ #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" +/** +* \brief A string specifying additional information to use with SDL_SetThreadPriority. +* +* By default SDL_SetThreadPriority will make appropriate system changes in order to +* apply a thread priority. For example on systems using pthreads the scheduler policy +* is changed automatically to a policy that works well with a given priority. +* Code which has specific requirements can override SDL's default behavior with this hint. +* +* pthread hint values are "current", "other", "fifo" and "rr". +* Currently no other platform hint values are defined but may be in the future. +* +* \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro +* configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME +* after calling SDL_SetThreadPriority(). +*/ +#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY" + +/** + * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime. + * + * On some platforms, like Linux, a realtime priority thread may be subject to restrictions + * that require special handling by the application. This hint exists to let SDL know that + * the app is prepared to handle said restrictions. + * + * On Linux, SDL will apply the following configuration to any thread that becomes realtime: + * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, + * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. + * * Exceeding this limit will result in the kernel sending SIGKILL to the app, + * * Refer to the man pages for more information. + * + * This variable can be set to the following values: + * "0" - default platform specific behaviour + * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy + */ +#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL" + /** * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS) */ @@ -939,6 +1071,18 @@ extern "C" { */ #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE" +/** + * \brief A variable to control whether SDL will pause audio in background + * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking") + * + * The variable can be set to the following values: + * "0" - Non paused. + * "1" - Paused. (default) + * + * The value should be set before SDL is initialized. + */ +#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO" + /** * \brief A variable to control whether the return key on the soft keyboard * should hide the soft keyboard on Android and iOS. @@ -965,10 +1109,26 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief Disable giving back control to the browser automatically + * when running with asyncify + * + * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations + * such as refreshing the screen or polling events. + * + * This hint only applies to the emscripten platform + * + * The variable can be set to the following values: + * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes) + * "1" - Enable emscripten_sleep calls (the default) + */ +#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY" + /** * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. * - * This hint only applies to Unix-like platforms. + * This hint only applies to Unix-like platforms, and should set before + * any calls to SDL_Init() * * The variable can be set to the following values: * "0" - SDL will install a SIGINT and SIGTERM handler, and when it @@ -1142,6 +1302,32 @@ extern "C" { #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" +/** + * \brief A variable controlling whether SDL updates joystick state when getting input events + * + * This variable can be set to the following values: + * + * "0" - You'll call SDL_JoystickUpdate() manually + * "1" - SDL will automatically call SDL_JoystickUpdate() (default) + * + * This hint can be toggled on and off at runtime. + */ +#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS" + + +/** + * \brief A variable controlling whether SDL updates sensor state when getting input events + * + * This variable can be set to the following values: + * + * "0" - You'll call SDL_SensorUpdate() manually + * "1" - SDL will automatically call SDL_SensorUpdate() (default) + * + * This hint can be toggled on and off at runtime. + */ +#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS" + + /** * \brief A variable controlling whether SDL logs all events pushed onto its internal queue. * @@ -1229,6 +1415,77 @@ extern "C" { */ #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK" +/** + * \brief Override for SDL_GetDisplayUsableBounds() + * + * If set, this hint will override the expected results for + * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want + * to do this, but this allows an embedded system to request that some of the + * screen be reserved for other uses when paired with a well-behaved + * application. + * + * The contents of this hint must be 4 comma-separated integers, the first + * is the bounds x, then y, width and height, in that order. + */ +#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS" + +/** + * \brief Specify an application name for an audio device. + * + * Some audio backends (such as PulseAudio) allow you to describe your audio + * stream. Among other things, this description might show up in a system + * control panel that lets the user adjust the volume on specific audio + * streams instead of using one giant master volume slider. + * + * This hints lets you transmit that information to the OS. The contents of + * this hint are used while opening an audio device. You should use a string + * that describes your program ("My Game 2: The Revenge") + * + * Setting this to "" or leaving it unset will have SDL use a reasonable + * default: probably the application's name or "SDL Application" if SDL + * doesn't have any better information. + * + * On targets where this is not supported, this hint does nothing. + */ +#define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME" + +/** + * \brief Specify an application name for an audio device. + * + * Some audio backends (such as PulseAudio) allow you to describe your audio + * stream. Among other things, this description might show up in a system + * control panel that lets the user adjust the volume on specific audio + * streams instead of using one giant master volume slider. + * + * This hints lets you transmit that information to the OS. The contents of + * this hint are used while opening an audio device. You should use a string + * that describes your what your program is playing ("audio stream" is + * probably sufficient in many cases, but this could be useful for something + * like "team chat" if you have a headset playing VoIP audio separately). + * + * Setting this to "" or leaving it unset will have SDL use a reasonable + * default: "audio stream" or something similar. + * + * On targets where this is not supported, this hint does nothing. + */ +#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME" + + +/** + * \brief Override for SDL_GetPreferredLocales() + * + * If set, this will be favored over anything the OS might report for the + * user's preferred locales. Changing this hint at runtime will not generate + * a SDL_LOCALECHANGED event (but if you can change the hint, you can push + * your own event, if you want). + * + * The format of this hint is a comma-separated list of language and locale, + * combined with an underscore, as is a common format: "en_GB". Locale is + * optional: "en". So you might have a list like this: "en_GB,jp,es_PT" + */ +#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES" + + /** * \brief An enumeration of hint priorities */ diff --git a/Windows/SDL2/include/SDL_joystick.h b/Windows/SDL2/include/SDL_joystick.h index 3c099dec..0bbeafe0 100644 --- a/Windows/SDL2/include/SDL_joystick.h +++ b/Windows/SDL2/include/SDL_joystick.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -105,6 +105,12 @@ typedef enum SDL_JOYSTICK_POWER_MAX } SDL_JoystickPowerLevel; +/* Set max recognized G-force from accelerometer + See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed + */ +#define SDL_IPHONE_MAX_GFORCE 5.0 + + /* Function prototypes */ /** @@ -199,51 +205,92 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index); +/** + * Attaches a new virtual joystick. + * Returns the joystick's device index, or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, + int naxes, + int nbuttons, + int nhats); + +/** + * Detaches a virtual joystick + * Returns 0 on success, or -1 if an error occurred. + */ +extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index); + +/** + * Indicates whether or not a virtual-joystick is at a given device index. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index); + +/** + * Set values on an opened, virtual-joystick's controls. + * Please note that values set here will not be applied until the next + * call to SDL_JoystickUpdate, which can either be called directly, + * or can be called indirectly through various other SDL APIS, + * including, but not limited to the following: SDL_PollEvent, + * SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent. + * + * Returns 0 on success, -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value); +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value); +extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value); + /** * Return the name for this currently opened joystick. * If no name can be found, this function returns NULL. */ -extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); +extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick); /** * Get the player index of an opened joystick, or -1 if it's not available * * For XInput controllers this returns the XInput user index. */ -extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick); /** * Set the player index of an opened joystick */ -extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index); +extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index); /** * Return the GUID for this opened joystick */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick); /** * Get the USB vendor ID of an opened joystick, if available. * If the vendor ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick); /** * Get the USB product ID of an opened joystick, if available. * If the product ID isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick); /** * Get the product version of an opened joystick, if available. * If the product version isn't available this function returns 0. */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick); +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick); + +/** + * Get the serial number of an opened joystick, if available. + * + * Returns the serial number of the joystick, or NULL if it is not available. + */ +extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick); /** * Get the type of an opened joystick. */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick); /** * Return a string representation for this guid. pszGUID must point to at least 33 bytes @@ -259,17 +306,17 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha /** * Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not. */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick); +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick); /** * Get the instance ID of an opened joystick or -1 if the joystick is invalid. */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick); /** * Get the number of general axis controls on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick); /** * Get the number of trackballs on a joystick. @@ -277,17 +324,17 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); * Joystick trackballs have only relative motion events associated * with them and their state cannot be polled. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick); /** * Get the number of POV hats on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick); /** * Get the number of buttons on a joystick. */ -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick); /** * Update the current state of the open joysticks. @@ -317,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); * * The axis indices start at index 0. */ -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis); /** @@ -329,7 +376,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, * * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not. */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick, +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state); /** @@ -363,7 +410,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * * - ::SDL_HAT_LEFTUP * - ::SDL_HAT_LEFTDOWN */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); /** @@ -373,7 +420,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, * * The ball indices start at index 0. */ -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy); /** @@ -381,11 +428,11 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, * * The button indices start at index 0. */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button); /** - * Trigger a rumble effect + * Start a rumble effect * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. * * \param joystick The joystick to vibrate @@ -395,17 +442,51 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, * * \return 0, or -1 if rumble isn't supported on this joystick */ -extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); +extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + +/** + * Start a rumble effect in the joystick's triggers + * Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling. + * + * \param joystick The joystick to vibrate + * \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF + * \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF + * \param duration_ms The duration of the rumble effect, in milliseconds + * + * \return 0, or -1 if trigger rumble isn't supported on this joystick + */ +extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); + +/** + * Return whether a joystick has an LED + * + * \param joystick The joystick to query + * + * \return SDL_TRUE, or SDL_FALSE if this joystick does not have a modifiable LED + */ +extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick); + +/** + * Update a joystick's LED color. + * + * \param joystick The joystick to update + * \param red The intensity of the red LED + * \param green The intensity of the green LED + * \param blue The intensity of the blue LED + * + * \return 0, or -1 if this joystick does not have a modifiable LED + */ +extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue); /** * Close a joystick previously opened with SDL_JoystickOpen(). */ -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick); /** * Return the battery level of this joystick */ -extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick); +extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/Windows/SDL2/include/SDL_keyboard.h b/Windows/SDL2/include/SDL_keyboard.h index 4b2a055d..f6853c64 100644 --- a/Windows/SDL2/include/SDL_keyboard.h +++ b/Windows/SDL2/include/SDL_keyboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_keycode.h b/Windows/SDL2/include/SDL_keycode.h index 64b72dd3..6f6b65cb 100644 --- a/Windows/SDL2/include/SDL_keycode.h +++ b/Windows/SDL2/include/SDL_keycode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -88,9 +88,11 @@ typedef enum SDLK_GREATER = '>', SDLK_QUESTION = '?', SDLK_AT = '@', + /* Skip uppercase letters */ + SDLK_LEFTBRACKET = '[', SDLK_BACKSLASH = '\\', SDLK_RIGHTBRACKET = ']', @@ -336,13 +338,13 @@ typedef enum KMOD_NUM = 0x1000, KMOD_CAPS = 0x2000, KMOD_MODE = 0x4000, - KMOD_RESERVED = 0x8000 -} SDL_Keymod; + KMOD_RESERVED = 0x8000, -#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) -#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) -#define KMOD_ALT (KMOD_LALT|KMOD_RALT) -#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) + KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL, + KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT, + KMOD_ALT = KMOD_LALT | KMOD_RALT, + KMOD_GUI = KMOD_LGUI | KMOD_RGUI +} SDL_Keymod; #endif /* SDL_keycode_h_ */ diff --git a/Windows/SDL2/include/SDL_loadso.h b/Windows/SDL2/include/SDL_loadso.h index 793ba535..89578a9f 100644 --- a/Windows/SDL2/include/SDL_loadso.h +++ b/Windows/SDL2/include/SDL_loadso.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_locale.h b/Windows/SDL2/include/SDL_locale.h new file mode 100644 index 00000000..1f4b0c46 --- /dev/null +++ b/Windows/SDL2/include/SDL_locale.h @@ -0,0 +1,101 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2020 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/** + * \file SDL_locale.h + * + * Include file for SDL locale services + */ + +#ifndef _SDL_locale_h +#define _SDL_locale_h + +#include "SDL_stdinc.h" +#include "SDL_error.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + + +typedef struct SDL_Locale +{ + const char *language; /**< A language name, like "en" for English. */ + const char *country; /**< A country, like "US" for America. Can be NULL. */ +} SDL_Locale; + +/** + * \brief Report the user's preferred locale. + * + * This returns an array of SDL_Locale structs, the final item zeroed out. + * When the caller is done with this array, it should call SDL_free() on + * the returned value; all the memory involved is allocated in a single + * block, so a single SDL_free() will suffice. + * + * Returned language strings are in the format xx, where 'xx' is an ISO-639 + * language specifier (such as "en" for English, "de" for German, etc). + * Country strings are in the format YY, where "YY" is an ISO-3166 country + * code (such as "US" for the United States, "CA" for Canada, etc). Country + * might be NULL if there's no specific guidance on them (so you might get + * { "en", "US" } for American English, but { "en", NULL } means "English + * language, generically"). Language strings are never NULL, except to + * terminate the array. + * + * Please note that not all of these strings are 2 characters; some are + * three or more. + * + * The returned list of locales are in the order of the user's preference. + * For example, a German citizen that is fluent in US English and knows + * enough Japanese to navigate around Tokyo might have a list like: + * { "de", "en_US", "jp", NULL }. Someone from England might prefer British + * English (where "color" is spelled "colour", etc), but will settle for + * anything like it: { "en_GB", "en", NULL }. + * + * This function returns NULL on error, including when the platform does not + * supply this information at all. + * + * This might be a "slow" call that has to query the operating system. It's + * best to ask for this once and save the results. However, this list can + * change, usually because the user has changed a system preference outside + * of your program; SDL will send an SDL_LOCALECHANGED event in this case, + * if possible, and you can call this function again to get an updated copy + * of preferred locales. + * + * \return array of locales, terminated with a locale with a NULL language + * field. Will return NULL on error. + */ +extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_locale_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Windows/SDL2/include/SDL_log.h b/Windows/SDL2/include/SDL_log.h index 430e4fd0..c1751fd7 100644 --- a/Windows/SDL2/include/SDL_log.h +++ b/Windows/SDL2/include/SDL_log.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_main.h b/Windows/SDL2/include/SDL_main.h index 623f2d00..fcb5c17d 100644 --- a/Windows/SDL2/include/SDL_main.h +++ b/Windows/SDL2/include/SDL_main.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_messagebox.h b/Windows/SDL2/include/SDL_messagebox.h index bf50deb9..03639ce4 100644 --- a/Windows/SDL2/include/SDL_messagebox.h +++ b/Windows/SDL2/include/SDL_messagebox.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_metal.h b/Windows/SDL2/include/SDL_metal.h index 0f1e0e94..f9673577 100644 --- a/Windows/SDL2/include/SDL_metal.h +++ b/Windows/SDL2/include/SDL_metal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -55,18 +55,13 @@ typedef void *SDL_MetalView; * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its * own. It is up to user code to do that. * - * The returned handle can be casted directly to a NSView or UIView, and the - * CAMetalLayer can be accessed from the view's 'layer' property. + * The returned handle can be casted directly to a NSView or UIView. + * To access the backing CAMetalLayer, call SDL_Metal_GetLayer(). * - * \code - * SDL_MetalView metalview = SDL_Metal_CreateView(window); - * UIView *uiview = (__bridge UIView *)metalview; - * CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer; - * // [...] - * SDL_Metal_DestroyView(metalview); - * \endcode + * \note \a window must be created with the SDL_WINDOW_METAL flag. * * \sa SDL_Metal_DestroyView + * \sa SDL_Metal_GetLayer */ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); @@ -80,6 +75,37 @@ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); */ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); +/** + * \brief Get a pointer to the backing CAMetalLayer for the given view. + * + * \sa SDL_MetalCreateView + */ +extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); + +/** + * \brief Get the size of a window's underlying drawable in pixels (for use + * with setting viewport, scissor & etc). + * + * \param window SDL_Window from which the drawable size should be queried + * \param w Pointer to variable for storing the width in pixels, + * may be NULL + * \param h Pointer to variable for storing the height in pixels, + * may be NULL + * + * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI + * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a + * platform with high-DPI support (Apple calls this "Retina"), and not disabled + * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint. + * + * \note On macOS high-DPI support must be enabled for an application by + * setting NSHighResolutionCapable to true in its Info.plist. + * + * \sa SDL_GetWindowSize() + * \sa SDL_CreateWindow() + */ +extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w, + int *h); + /* @} *//* Metal support functions */ /* Ends C function definitions when using C++ */ diff --git a/Windows/SDL2/include/SDL_misc.h b/Windows/SDL2/include/SDL_misc.h new file mode 100644 index 00000000..a04f19ba --- /dev/null +++ b/Windows/SDL2/include/SDL_misc.h @@ -0,0 +1,75 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2020 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/** + * \file SDL_misc.h + * + * \brief Include file for SDL API functions that don't fit elsewhere. + */ + +#ifndef SDL_misc_h_ +#define SDL_misc_h_ + +#include "SDL_stdinc.h" + +#include "begin_code.h" + +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief Open an URL / URI in the browser or other + * + * Open a URL in a separate, system-provided application. How this works will + * vary wildly depending on the platform. This will likely launch what + * makes sense to handle a specific URL's protocol (a web browser for http://, + * etc), but it might also be able to launch file managers for directories + * and other things. + * + * What happens when you open a URL varies wildly as well: your game window + * may lose focus (and may or may not lose focus if your game was fullscreen + * or grabbing input at the time). On mobile devices, your app will likely + * move to the background or your process might be paused. Any given platform + * may or may not handle a given URL. + * + * If this is unimplemented (or simply unavailable) for a platform, this will + * fail with an error. A successful result does not mean the URL loaded, just + * that we launched something to handle it (or at least believe we did). + * + * All this to say: this function can be useful, but you should definitely + * test it on every platform you target. + * + * \param url A valid URL to open. + * \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* SDL_misc_h_ */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Windows/SDL2/include/SDL_mouse.h b/Windows/SDL2/include/SDL_mouse.h index 277559d2..99b658e9 100644 --- a/Windows/SDL2/include/SDL_mouse.h +++ b/Windows/SDL2/include/SDL_mouse.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_mutex.h b/Windows/SDL2/include/SDL_mutex.h index 970e7871..3c5b9557 100644 --- a/Windows/SDL2/include/SDL_mutex.h +++ b/Windows/SDL2/include/SDL_mutex.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_name.h b/Windows/SDL2/include/SDL_name.h index 690a8199..a49c4887 100644 --- a/Windows/SDL2/include/SDL_name.h +++ b/Windows/SDL2/include/SDL_name.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengl.h b/Windows/SDL2/include/SDL_opengl.h index 6685be73..5cd302cd 100644 --- a/Windows/SDL2/include/SDL_opengl.h +++ b/Windows/SDL2/include/SDL_opengl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengles.h b/Windows/SDL2/include/SDL_opengles.h index 1e0660c3..5c2a3e63 100644 --- a/Windows/SDL2/include/SDL_opengles.h +++ b/Windows/SDL2/include/SDL_opengles.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengles2.h b/Windows/SDL2/include/SDL_opengles2.h index df29d384..00bc180c 100644 --- a/Windows/SDL2/include/SDL_opengles2.h +++ b/Windows/SDL2/include/SDL_opengles2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_pixels.h b/Windows/SDL2/include/SDL_pixels.h index 753f617a..aa90cbc2 100644 --- a/Windows/SDL2/include/SDL_pixels.h +++ b/Windows/SDL2/include/SDL_pixels.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -188,18 +188,22 @@ typedef enum SDL_PIXELFORMAT_RGB332 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_332, 8, 1), - SDL_PIXELFORMAT_RGB444 = + SDL_PIXELFORMAT_XRGB4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_BGR444 = + SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444, + SDL_PIXELFORMAT_XBGR4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_RGB555 = + SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444, + SDL_PIXELFORMAT_XRGB1555 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_1555, 15, 2), - SDL_PIXELFORMAT_BGR555 = + SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555, + SDL_PIXELFORMAT_XBGR1555 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_1555, 15, 2), + SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555, SDL_PIXELFORMAT_ARGB4444 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_4444, 16, 2), @@ -236,15 +240,17 @@ typedef enum SDL_PIXELFORMAT_BGR24 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0, 24, 3), - SDL_PIXELFORMAT_RGB888 = + SDL_PIXELFORMAT_XRGB8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_8888, 24, 4), + SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_RGBX8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX, SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_BGR888 = + SDL_PIXELFORMAT_XBGR8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_8888, 24, 4), + SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888, SDL_PIXELFORMAT_BGRX8888 = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX, SDL_PACKEDLAYOUT_8888, 24, 4), diff --git a/Windows/SDL2/include/SDL_platform.h b/Windows/SDL2/include/SDL_platform.h index c2cbc6b4..71665579 100644 --- a/Windows/SDL2/include/SDL_platform.h +++ b/Windows/SDL2/include/SDL_platform.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_power.h b/Windows/SDL2/include/SDL_power.h index 4831cb77..39884cc2 100644 --- a/Windows/SDL2/include/SDL_power.h +++ b/Windows/SDL2/include/SDL_power.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_quit.h b/Windows/SDL2/include/SDL_quit.h index c979983c..b2bd5da5 100644 --- a/Windows/SDL2/include/SDL_quit.h +++ b/Windows/SDL2/include/SDL_quit.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_rect.h b/Windows/SDL2/include/SDL_rect.h index 71a41151..47f0d207 100644 --- a/Windows/SDL2/include/SDL_rect.h +++ b/Windows/SDL2/include/SDL_rect.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_render.h b/Windows/SDL2/include/SDL_render.h index f98c1843..f26fb7e5 100644 --- a/Windows/SDL2/include/SDL_render.h +++ b/Windows/SDL2/include/SDL_render.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -618,8 +618,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, * \brief Set the clip rectangle for the current target. * * \param renderer The renderer for which clip rectangle should be set. - * \param rect A pointer to the rectangle to set as the clip rectangle, or - * NULL to disable clipping. + * \param rect A pointer to the rectangle to set as the clip rectangle, + * relative to the viewport, or NULL to disable clipping. * * \return 0 on success, or -1 on error * diff --git a/Windows/SDL2/include/SDL_revision.h b/Windows/SDL2/include/SDL_revision.h index 6996d603..e0bcf431 100644 --- a/Windows/SDL2/include/SDL_revision.h +++ b/Windows/SDL2/include/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-13387:8a12cc1abc9e" -#define SDL_REVISION_NUMBER 13387 +#define SDL_REVISION "hg-14525:e52d96ea04fc" +#define SDL_REVISION_NUMBER 14525 diff --git a/Windows/SDL2/include/SDL_rwops.h b/Windows/SDL2/include/SDL_rwops.h index f66119fb..2e6225fc 100644 --- a/Windows/SDL2/include/SDL_rwops.h +++ b/Windows/SDL2/include/SDL_rwops.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -96,15 +96,7 @@ typedef struct SDL_RWops #if defined(__ANDROID__) struct { - void *fileNameRef; - void *inputStreamRef; - void *readableByteChannelRef; - void *readMethod; - void *assetFileDescriptorRef; - long position; - long size; - long offset; - int fd; + void *asset; } androidio; #elif defined(__WIN32__) struct diff --git a/Windows/SDL2/include/SDL_scancode.h b/Windows/SDL2/include/SDL_scancode.h index a50305f5..b19197d2 100644 --- a/Windows/SDL2/include/SDL_scancode.h +++ b/Windows/SDL2/include/SDL_scancode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_sensor.h b/Windows/SDL2/include/SDL_sensor.h index 966adbf2..e6236341 100644 --- a/Windows/SDL2/include/SDL_sensor.h +++ b/Windows/SDL2/include/SDL_sensor.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -78,14 +78,16 @@ typedef enum * Accelerometer sensor * * The accelerometer returns the current acceleration in SI meters per - * second squared. This includes gravity, so a device at rest will have - * an acceleration of SDL_STANDARD_GRAVITY straight down. + * second squared. This measurement includes the force of gravity, so + * a device at rest will have an value of SDL_STANDARD_GRAVITY away + * from the center of the earth. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis * values[2]: Acceleration on the z axis * - * For phones held in portrait mode, the axes are defined as follows: + * For phones held in portrait mode and game controllers held in front of you, + * the axes are defined as follows: * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer @@ -105,22 +107,36 @@ typedef enum * see positive rotation on that axis when it appeared to be rotating * counter-clockwise. * - * values[0]: Angular speed around the x axis - * values[1]: Angular speed around the y axis - * values[2]: Angular speed around the z axis + * values[0]: Angular speed around the x axis (pitch) + * values[1]: Angular speed around the y axis (yaw) + * values[2]: Angular speed around the z axis (roll) * - * For phones held in portrait mode, the axes are defined as follows: + * For phones held in portrait mode and game controllers held in front of you, + * the axes are defined as follows: * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer * - * The axis data is not changed when the phone is rotated. + * The axis data is not changed when the phone or controller is rotated. * * \sa SDL_GetDisplayOrientation() */ /* Function prototypes */ +/** + * Locking for multi-threaded access to the sensor API + * + * If you are using the sensor API or handling events from multiple threads + * you should use these locking functions to protect access to the sensors. + * + * In particular, you are guaranteed that the sensor list won't change, so + * the API functions that take a sensor index will be valid, and sensor + * events will not be delivered. + */ +extern DECLSPEC void SDLCALL SDL_LockSensors(void); +extern DECLSPEC void SDLCALL SDL_UnlockSensors(void); + /** * \brief Count the number of sensors attached to the system right now */ diff --git a/Windows/SDL2/include/SDL_shape.h b/Windows/SDL2/include/SDL_shape.h index 2ab43fcd..cbd9debd 100644 --- a/Windows/SDL2/include/SDL_shape.h +++ b/Windows/SDL2/include/SDL_shape.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_stdinc.h b/Windows/SDL2/include/SDL_stdinc.h index 014675b7..91ccaa45 100644 --- a/Windows/SDL2/include/SDL_stdinc.h +++ b/Windows/SDL2/include/SDL_stdinc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga 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,6 +30,12 @@ #include "SDL_config.h" +#ifdef __APPLE__ +#ifndef _DARWIN_C_SOURCE +#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ +#endif +#endif + #ifdef HAVE_SYS_TYPES_H #include #endif @@ -408,9 +414,13 @@ extern DECLSPEC int SDLCALL SDL_abs(int x); extern DECLSPEC int SDLCALL SDL_isdigit(int x); extern DECLSPEC int SDLCALL SDL_isspace(int x); +extern DECLSPEC int SDLCALL SDL_isupper(int x); +extern DECLSPEC int SDLCALL SDL_islower(int x); extern DECLSPEC int SDLCALL SDL_toupper(int x); extern DECLSPEC int SDLCALL SDL_tolower(int x); +extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len); + extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len); #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) @@ -461,6 +471,8 @@ extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); +extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2); +extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len); extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); @@ -527,6 +539,8 @@ extern DECLSPEC double SDLCALL SDL_fabs(double x); extern DECLSPEC float SDLCALL SDL_fabsf(float x); extern DECLSPEC double SDLCALL SDL_floor(double x); extern DECLSPEC float SDLCALL SDL_floorf(float x); +extern DECLSPEC double SDLCALL SDL_trunc(double x); +extern DECLSPEC float SDLCALL SDL_truncf(float x); extern DECLSPEC double SDLCALL SDL_fmod(double x, double y); extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y); extern DECLSPEC double SDLCALL SDL_log(double x); @@ -573,6 +587,17 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, /* force builds using Clang's static analysis tools to use literal C runtime here, since there are possibly tests that are ineffective otherwise. */ #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS) + +/* The analyzer knows about strlcpy even when the system doesn't provide it */ +#ifndef HAVE_STRLCPY +size_t strlcpy(char* dst, const char* src, size_t size); +#endif + +/* The analyzer knows about strlcat even when the system doesn't provide it */ +#ifndef HAVE_STRLCAT +size_t strlcat(char* dst, const char* src, size_t size); +#endif + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc @@ -581,16 +606,23 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, #define SDL_memcpy memcpy #define SDL_memmove memmove #define SDL_memcmp memcmp -#define SDL_strlen strlen #define SDL_strlcpy strlcpy #define SDL_strlcat strlcat +#define SDL_strlen strlen +#define SDL_wcslen wcslen +#define SDL_wcslcpy wcslcpy +#define SDL_wcslcat wcslcat #define SDL_strdup strdup +#define SDL_wcsdup wcsdup #define SDL_strchr strchr #define SDL_strrchr strrchr #define SDL_strstr strstr +#define SDL_wcsstr wcsstr #define SDL_strtokr strtok_r #define SDL_strcmp strcmp +#define SDL_wcscmp wcscmp #define SDL_strncmp strncmp +#define SDL_wcsncmp wcsncmp #define SDL_strcasecmp strcasecmp #define SDL_strncasecmp strncasecmp #define SDL_sscanf sscanf diff --git a/Windows/SDL2/include/SDL_surface.h b/Windows/SDL2/include/SDL_surface.h index 51a12830..d3f8c814 100644 --- a/Windows/SDL2/include/SDL_surface.h +++ b/Windows/SDL2/include/SDL_surface.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -80,7 +80,9 @@ typedef struct SDL_Surface /** information needed for surfaces requiring locks */ int locked; /**< Read-only */ - void *lock_data; /**< Read-only */ + + /** list of BlitMap that hold a reference to this surface */ + void *list_blitmap; /**< Private */ /** clipping information */ SDL_Rect clip_rect; /**< Read-only */ @@ -235,6 +237,13 @@ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, int flag); +/** + * \brief Returns whether the surface is RLE enabled + * + * \return SDL_TRUE if the surface is RLE enabled, or SDL_FALSE if the surface is NULL or not RLE enabled + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface); + /** * \brief Sets the color key (transparent pixel) in a blittable surface. * diff --git a/Windows/SDL2/include/SDL_system.h b/Windows/SDL2/include/SDL_system.h index 3b084076..d296ab1f 100644 --- a/Windows/SDL2/include/SDL_system.h +++ b/Windows/SDL2/include/SDL_system.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -89,7 +89,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int prio #endif /* __LINUX__ */ /* Platform specific functions for iOS */ -#if defined(__IPHONEOS__) && __IPHONEOS__ +#ifdef __IPHONEOS__ #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam) extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); @@ -101,7 +101,7 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); /* Platform specific functions for Android */ -#if defined(__ANDROID__) && __ANDROID__ +#ifdef __ANDROID__ /** \brief Get the JNI environment for the current thread @@ -120,6 +120,33 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void); */ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); +/** + \brief Return API level of the current device + + API level 30: Android 11 + API level 29: Android 10 + API level 28: Android 9 + API level 27: Android 8.1 + API level 26: Android 8.0 + API level 25: Android 7.1 + API level 24: Android 7.0 + API level 23: Android 6.0 + API level 22: Android 5.1 + API level 21: Android 5.0 + API level 20: Android 4.4W + API level 19: Android 4.4 + API level 18: Android 4.3 + API level 17: Android 4.2 + API level 16: Android 4.1 + API level 15: Android 4.0.3 + API level 14: Android 4.0 + API level 13: Android 3.2 + API level 12: Android 3.1 + API level 11: Android 3.0 + API level 10: Android 2.3.3 + */ +extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); + /** \brief Return true if the application is running on Android TV */ @@ -172,10 +199,18 @@ extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void); */ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void); +/** + \brief Request permissions at runtime. + + This blocks the calling thread until the permission is granted or + denied. Returns SDL_TRUE if the permission was granted. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission); + #endif /* __ANDROID__ */ /* Platform specific functions for WinRT */ -#if defined(__WINRT__) && __WINRT__ +#ifdef __WINRT__ /** * \brief WinRT / Windows Phone path types @@ -268,6 +303,17 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); */ extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); +/* Functions used by iOS application delegates to notify SDL about state changes */ +extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void); +extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void); +#ifdef __IPHONEOS__ +extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void); +#endif + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Windows/SDL2/include/SDL_syswm.h b/Windows/SDL2/include/SDL_syswm.h index c8236513..f0e9675d 100644 --- a/Windows/SDL2/include/SDL_syswm.h +++ b/Windows/SDL2/include/SDL_syswm.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -106,6 +106,11 @@ typedef void *EGLSurface; #if defined(SDL_VIDEO_DRIVER_VIVANTE) #include "SDL_egl.h" #endif + +#if defined(SDL_VIDEO_DRIVER_OS2) +#define INCL_WIN +#include +#endif #endif /* SDL_PROTOTYPES_ONLY */ @@ -186,6 +191,16 @@ struct SDL_SysWMmsg int dummy; /* No Vivante window events yet */ } vivante; +#endif +#if defined(SDL_VIDEO_DRIVER_OS2) + struct + { + BOOL fFrame; /**< TRUE if hwnd is a frame window */ + HWND hwnd; /**< The window receiving the message */ + ULONG msg; /**< The message identifier */ + MPARAM mp1; /**< The first first message parameter */ + MPARAM mp2; /**< The second first message parameter */ + } os2; #endif /* Can't have an empty union */ int dummy; @@ -280,6 +295,14 @@ struct SDL_SysWMinfo } android; #endif +#if defined(SDL_VIDEO_DRIVER_OS2) + struct + { + HWND hwnd; /**< The window handle */ + HWND hwndFrame; /**< The frame window handle */ + } os2; +#endif + #if defined(SDL_VIDEO_DRIVER_VIVANTE) struct { diff --git a/Windows/SDL2/include/SDL_thread.h b/Windows/SDL2/include/SDL_thread.h index f78b1145..4016358a 100644 --- a/Windows/SDL2/include/SDL_thread.h +++ b/Windows/SDL2/include/SDL_thread.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -54,6 +54,11 @@ typedef unsigned int SDL_TLSID; /** * The SDL thread priority. * + * SDL will make system changes as necessary in order to apply the thread priority. + * Code which attempts to control thread state related to priority should be aware + * that calling SDL_SetThreadPriority may alter such state. + * SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior. + * * \note On many systems you require special privileges to set high or time critical priority. */ typedef enum { @@ -69,7 +74,7 @@ typedef enum { */ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) && !defined(HAVE_LIBC) +#if defined(__WIN32__) /** * \file SDL_thread.h * @@ -93,11 +98,18 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); #define SDL_PASSED_BEGINTHREAD_ENDTHREAD #include /* _beginthreadex() and _endthreadex() */ -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) +typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, unsigned (__stdcall *func)(void *), void * /*arg*/, unsigned, unsigned * /* threadID */); typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); +#ifndef SDL_beginthread +#define SDL_beginthread _beginthreadex +#endif +#ifndef SDL_endthread +#define SDL_endthread _endthreadex +#endif + /** * Create a thread. */ @@ -118,12 +130,12 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), */ #if defined(SDL_CreateThread) && SDL_DYNAMIC_API #undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread) #endif #elif defined(__OS2__) @@ -132,13 +144,23 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), * into a dll with Watcom's runtime statically linked. */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD + #ifndef __EMX__ #include #else #include #endif + typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/); typedef void (*pfnSDL_CurrentEndThread)(void); + +#ifndef SDL_beginthread +#define SDL_beginthread _beginthread +#endif +#ifndef SDL_endthread +#define SDL_endthread _endthread +#endif + extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, @@ -147,14 +169,15 @@ extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread); + #if defined(SDL_CreateThread) && SDL_DYNAMIC_API #undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) +#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) +#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) #endif #else diff --git a/Windows/SDL2/include/SDL_timer.h b/Windows/SDL2/include/SDL_timer.h index 2a47b043..aada7178 100644 --- a/Windows/SDL2/include/SDL_timer.h +++ b/Windows/SDL2/include/SDL_timer.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_touch.h b/Windows/SDL2/include/SDL_touch.h index 99dbcb8c..fa5a37ce 100644 --- a/Windows/SDL2/include/SDL_touch.h +++ b/Windows/SDL2/include/SDL_touch.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_types.h b/Windows/SDL2/include/SDL_types.h index 9c3e9896..b6bb5711 100644 --- a/Windows/SDL2/include/SDL_types.h +++ b/Windows/SDL2/include/SDL_types.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_version.h b/Windows/SDL2/include/SDL_version.h index 69b02706..23b65f43 100644 --- a/Windows/SDL2/include/SDL_version.h +++ b/Windows/SDL2/include/SDL_version.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 11 +#define SDL_PATCHLEVEL 14 /** * \brief Macro to determine SDL version program was compiled against. diff --git a/Windows/SDL2/include/SDL_video.h b/Windows/SDL2/include/SDL_video.h index c1bb7527..54cbe0f0 100644 --- a/Windows/SDL2/include/SDL_video.h +++ b/Windows/SDL2/include/SDL_video.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -118,7 +118,8 @@ typedef enum SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */ SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */ - SDL_WINDOW_VULKAN = 0x10000000 /**< window usable for Vulkan surface */ + SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */ + SDL_WINDOW_METAL = 0x20000000 /**< window usable for Metal view */ } SDL_WindowFlags; /** @@ -174,7 +175,9 @@ typedef enum typedef enum { SDL_DISPLAYEVENT_NONE, /**< Never used */ - SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ + SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ + SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ + SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ } SDL_DisplayEventID; typedef enum @@ -484,7 +487,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS, * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED, - * ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN. + * ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN + * ::SDL_WINDOW_METAL. * * \return The created window, or NULL if window creation failed. * @@ -503,6 +507,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail. * + * If SDL_WINDOW_METAL is specified on an OS that does not support Metal, + * SDL_CreateWindow() will fail. + * * \note On non-Apple devices, SDL requires you to either not link to the * Vulkan loader or link to a dynamic library version. This limitation * may be removed in a future version of SDL. diff --git a/Windows/SDL2/include/SDL_vulkan.h b/Windows/SDL2/include/SDL_vulkan.h index d69a436b..a3de1cea 100644 --- a/Windows/SDL2/include/SDL_vulkan.h +++ b/Windows/SDL2/include/SDL_vulkan.h @@ -204,10 +204,9 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * * \sa SDL_Vulkan_CreateSurface() */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions( - SDL_Window *window, - unsigned int *pCount, - const char **pNames); +extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, + unsigned int *pCount, + const char **pNames); /** * \brief Create a Vulkan rendering surface for a window. @@ -238,10 +237,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions( * * \sa SDL_Vulkan_GetInstanceExtensions() */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface( - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR* surface); +extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, + VkInstance instance, + VkSurfaceKHR* surface); /** * \brief Get the size of a window's underlying drawable in pixels (for use diff --git a/Windows/SDL2/include/begin_code.h b/Windows/SDL2/include/begin_code.h index 22c997c4..1ca40ccd 100644 --- a/Windows/SDL2/include/begin_code.h +++ b/Windows/SDL2/include/begin_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -51,15 +51,11 @@ /* Some compilers use a special export keyword */ #ifndef DECLSPEC -# if defined(__WIN32__) || defined(__WINRT__) -# ifdef __BORLANDC__ -# ifdef BUILD_SDL -# define DECLSPEC -# else -# define DECLSPEC __declspec(dllimport) -# endif -# else +# if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__) +# ifdef DLL_EXPORT # define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC # endif # elif defined(__OS2__) # ifdef BUILD_SDL diff --git a/Windows/SDL2/include/close_code.h b/Windows/SDL2/include/close_code.h index 8e4cac3d..6aa411b0 100644 --- a/Windows/SDL2/include/close_code.h +++ b/Windows/SDL2/include/close_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/lib/SDL2.dll b/Windows/SDL2/lib/SDL2.dll index be564f68..3392016f 100644 Binary files a/Windows/SDL2/lib/SDL2.dll and b/Windows/SDL2/lib/SDL2.dll differ diff --git a/Windows/SDL2/lib/SDL2.lib b/Windows/SDL2/lib/SDL2.lib index 81328beb..266b0827 100644 Binary files a/Windows/SDL2/lib/SDL2.lib and b/Windows/SDL2/lib/SDL2.lib differ diff --git a/Windows/SDL2/lib/SDL2main.lib b/Windows/SDL2/lib/SDL2main.lib index 60b24acd..29c80881 100644 Binary files a/Windows/SDL2/lib/SDL2main.lib and b/Windows/SDL2/lib/SDL2main.lib differ diff --git a/Windows/SDL2/lib/libSDL2.dll.a b/Windows/SDL2/lib/libSDL2.dll.a index eedefe06..65f29a56 100644 Binary files a/Windows/SDL2/lib/libSDL2.dll.a and b/Windows/SDL2/lib/libSDL2.dll.a differ diff --git a/Windows/SDL2/lib/libSDL2main.a b/Windows/SDL2/lib/libSDL2main.a index 9ff7a6d0..f10f6c64 100644 Binary files a/Windows/SDL2/lib/libSDL2main.a and b/Windows/SDL2/lib/libSDL2main.a differ diff --git a/Windows/SDL2/lib64/SDL2.dll b/Windows/SDL2/lib64/SDL2.dll index 36cf97f9..ddba03c7 100644 Binary files a/Windows/SDL2/lib64/SDL2.dll and b/Windows/SDL2/lib64/SDL2.dll differ diff --git a/Windows/SDL2/lib64/SDL2.lib b/Windows/SDL2/lib64/SDL2.lib index 1317f4cc..db6f19e6 100644 Binary files a/Windows/SDL2/lib64/SDL2.lib and b/Windows/SDL2/lib64/SDL2.lib differ diff --git a/Windows/SDL2/lib64/SDL2main.lib b/Windows/SDL2/lib64/SDL2main.lib index 4e72c408..aa3c4f9f 100644 Binary files a/Windows/SDL2/lib64/SDL2main.lib and b/Windows/SDL2/lib64/SDL2main.lib differ diff --git a/Windows/SDL2/lib64/libSDL2.dll.a b/Windows/SDL2/lib64/libSDL2.dll.a index edeeef6a..123fd63a 100644 Binary files a/Windows/SDL2/lib64/libSDL2.dll.a and b/Windows/SDL2/lib64/libSDL2.dll.a differ diff --git a/Windows/SDL2/lib64/libSDL2main.a b/Windows/SDL2/lib64/libSDL2main.a index 4c28ea1c..b2778053 100644 Binary files a/Windows/SDL2/lib64/libSDL2main.a and b/Windows/SDL2/lib64/libSDL2main.a differ diff --git a/Windows/SDL2/main/SDL_windows.h b/Windows/SDL2/main/SDL_windows.h index 3217026b..3707fe30 100644 --- a/Windows/SDL2/main/SDL_windows.h +++ b/Windows/SDL2/main/SDL_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2019 Sam Lantinga + Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/watcom/SDL2.def b/Windows/SDL2/watcom/SDL2.def index 7e449894..d95ebae7 100644 --- a/Windows/SDL2/watcom/SDL2.def +++ b/Windows/SDL2/watcom/SDL2.def @@ -125,13 +125,23 @@ SDL_GameControllerGetBindForButton SDL_GameControllerGetButton SDL_GameControllerGetButtonFromString SDL_GameControllerGetJoystick +SDL_GameControllerGetNumTouchpadFingers +SDL_GameControllerGetNumTouchpads SDL_GameControllerGetPlayerIndex SDL_GameControllerGetProduct SDL_GameControllerGetProductVersion +SDL_GameControllerGetSensorData +SDL_GameControllerGetSerial SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForButton +SDL_GameControllerGetTouchpadFinger SDL_GameControllerGetType SDL_GameControllerGetVendor +SDL_GameControllerHasAxis +SDL_GameControllerHasButton +SDL_GameControllerHasLED +SDL_GameControllerHasSensor +SDL_GameControllerIsSensorEnabled SDL_GameControllerMapping SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForGUID @@ -141,7 +151,10 @@ SDL_GameControllerNameForIndex SDL_GameControllerNumMappings SDL_GameControllerOpen SDL_GameControllerRumble +SDL_GameControllerRumbleTriggers +SDL_GameControllerSetLED SDL_GameControllerSetPlayerIndex +SDL_GameControllerSetSensorEnabled SDL_GameControllerTypeForIndex SDL_GameControllerUpdate SDL_GetAssertionHandler @@ -171,6 +184,7 @@ SDL_GetDisplayName SDL_GetDisplayOrientation SDL_GetDisplayUsableBounds SDL_GetError +SDL_GetErrorMsg SDL_GetEventFilter SDL_GetGlobalMouseState SDL_GetGrabbedWindow @@ -200,6 +214,7 @@ SDL_GetPixelFormatName SDL_GetPlatform SDL_GetPowerInfo SDL_GetPrefPath +SDL_GetPreferredLocales SDL_GetQueuedAudioSize SDL_GetRGB SDL_GetRGBA @@ -302,6 +317,7 @@ SDL_HasSSE3 SDL_HasSSE41 SDL_HasSSE42 SDL_HasScreenKeyboardSupport +SDL_HasSurfaceRLE SDL_HideWindow SDL_Init SDL_InitSubSystem @@ -313,8 +329,10 @@ SDL_IsScreenSaverEnabled SDL_IsShapedWindow SDL_IsTablet SDL_IsTextInputActive +SDL_JoystickAttachVirtual SDL_JoystickClose SDL_JoystickCurrentPowerLevel +SDL_JoystickDetachVirtual SDL_JoystickEventState SDL_JoystickFromInstanceID SDL_JoystickFromPlayerIndex @@ -337,10 +355,13 @@ SDL_JoystickGetHat SDL_JoystickGetPlayerIndex SDL_JoystickGetProduct SDL_JoystickGetProductVersion +SDL_JoystickGetSerial SDL_JoystickGetType SDL_JoystickGetVendor +SDL_JoystickHasLED SDL_JoystickInstanceID SDL_JoystickIsHaptic +SDL_JoystickIsVirtual SDL_JoystickName SDL_JoystickNameForIndex SDL_JoystickNumAxes @@ -349,7 +370,12 @@ SDL_JoystickNumButtons SDL_JoystickNumHats SDL_JoystickOpen SDL_JoystickRumble +SDL_JoystickRumbleTriggers +SDL_JoystickSetLED SDL_JoystickSetPlayerIndex +SDL_JoystickSetVirtualAxis +SDL_JoystickSetVirtualButton +SDL_JoystickSetVirtualHat SDL_JoystickUpdate SDL_LoadBMP_RW SDL_LoadDollarTemplates @@ -362,6 +388,7 @@ SDL_LockAudio SDL_LockAudioDevice SDL_LockJoysticks SDL_LockMutex +SDL_LockSensors SDL_LockSurface SDL_LockTexture SDL_LockTextureToSurface @@ -390,6 +417,8 @@ SDL_MemoryBarrierAcquireFunction SDL_MemoryBarrierReleaseFunction SDL_Metal_CreateView SDL_Metal_DestroyView +SDL_Metal_GetDrawableSize +SDL_Metal_GetLayer SDL_MinimizeWindow SDL_MixAudio SDL_MixAudioFormat @@ -398,8 +427,15 @@ SDL_NewAudioStream SDL_NumHaptics SDL_NumJoysticks SDL_NumSensors +SDL_OnApplicationDidBecomeActive +SDL_OnApplicationDidEnterBackground +SDL_OnApplicationDidReceiveMemoryWarning +SDL_OnApplicationWillEnterForeground +SDL_OnApplicationWillResignActive +SDL_OnApplicationWillTerminate SDL_OpenAudio SDL_OpenAudioDevice +SDL_OpenURL SDL_PauseAudio SDL_PauseAudioDevice SDL_PeepEvents @@ -478,6 +514,7 @@ SDL_RestoreWindow SDL_SIMDAlloc SDL_SIMDFree SDL_SIMDGetAlignment +SDL_SIMDRealloc SDL_SaveAllDollarTemplates SDL_SaveBMP_RW SDL_SaveDollarTemplate @@ -567,6 +604,7 @@ SDL_UnlockAudio SDL_UnlockAudioDevice SDL_UnlockJoysticks SDL_UnlockMutex +SDL_UnlockSensors SDL_UnlockSurface SDL_UnlockTexture SDL_UnregisterApp @@ -615,6 +653,7 @@ SDL_copysign SDL_copysignf SDL_cos SDL_cosf +SDL_crc32 SDL_exp SDL_expf SDL_fabs @@ -630,7 +669,9 @@ SDL_iconv_close SDL_iconv_open SDL_iconv_string SDL_isdigit +SDL_islower SDL_isspace +SDL_isupper SDL_itoa SDL_lltoa SDL_log @@ -680,6 +721,8 @@ SDL_tan SDL_tanf SDL_tolower SDL_toupper +SDL_trunc +SDL_truncf SDL_uitoa SDL_ulltoa SDL_ultoa @@ -687,10 +730,12 @@ SDL_utf8strlcpy SDL_utf8strlen SDL_vsnprintf SDL_vsscanf +SDL_wcscasecmp SDL_wcscmp SDL_wcsdup SDL_wcslcat SDL_wcslcpy SDL_wcslen +SDL_wcsncasecmp SDL_wcsncmp SDL_wcsstr diff --git a/Windows/SDL2/watcom/SDL2.exp b/Windows/SDL2/watcom/SDL2.exp index 648b8612..0d6d8c75 100644 --- a/Windows/SDL2/watcom/SDL2.exp +++ b/Windows/SDL2/watcom/SDL2.exp @@ -122,13 +122,23 @@ ++'_SDL_GameControllerGetButton'.'SDL2.DLL'..'SDL_GameControllerGetButton' ++'_SDL_GameControllerGetButtonFromString'.'SDL2.DLL'..'SDL_GameControllerGetButtonFromString' ++'_SDL_GameControllerGetJoystick'.'SDL2.DLL'..'SDL_GameControllerGetJoystick' +++'_SDL_GameControllerGetNumTouchpadFingers'.'SDL2.DLL'..'SDL_GameControllerGetNumTouchpadFingers' +++'_SDL_GameControllerGetNumTouchpads'.'SDL2.DLL'..'SDL_GameControllerGetNumTouchpads' ++'_SDL_GameControllerGetPlayerIndex'.'SDL2.DLL'..'SDL_GameControllerGetPlayerIndex' ++'_SDL_GameControllerGetProduct'.'SDL2.DLL'..'SDL_GameControllerGetProduct' ++'_SDL_GameControllerGetProductVersion'.'SDL2.DLL'..'SDL_GameControllerGetProductVersion' +++'_SDL_GameControllerGetSensorData'.'SDL2.DLL'..'SDL_GameControllerGetSensorData' +++'_SDL_GameControllerGetSerial'.'SDL2.DLL'..'SDL_GameControllerGetSerial' ++'_SDL_GameControllerGetStringForAxis'.'SDL2.DLL'..'SDL_GameControllerGetStringForAxis' ++'_SDL_GameControllerGetStringForButton'.'SDL2.DLL'..'SDL_GameControllerGetStringForButton' +++'_SDL_GameControllerGetTouchpadFinger'.'SDL2.DLL'..'SDL_GameControllerGetTouchpadFinger' ++'_SDL_GameControllerGetType'.'SDL2.DLL'..'SDL_GameControllerGetType' ++'_SDL_GameControllerGetVendor'.'SDL2.DLL'..'SDL_GameControllerGetVendor' +++'_SDL_GameControllerHasAxis'.'SDL2.DLL'..'SDL_GameControllerHasAxis' +++'_SDL_GameControllerHasButton'.'SDL2.DLL'..'SDL_GameControllerHasButton' +++'_SDL_GameControllerHasLED'.'SDL2.DLL'..'SDL_GameControllerHasLED' +++'_SDL_GameControllerHasSensor'.'SDL2.DLL'..'SDL_GameControllerHasSensor' +++'_SDL_GameControllerIsSensorEnabled'.'SDL2.DLL'..'SDL_GameControllerIsSensorEnabled' ++'_SDL_GameControllerMapping'.'SDL2.DLL'..'SDL_GameControllerMapping' ++'_SDL_GameControllerMappingForDeviceIndex'.'SDL2.DLL'..'SDL_GameControllerMappingForDeviceIndex' ++'_SDL_GameControllerMappingForGUID'.'SDL2.DLL'..'SDL_GameControllerMappingForGUID' @@ -138,7 +148,10 @@ ++'_SDL_GameControllerNumMappings'.'SDL2.DLL'..'SDL_GameControllerNumMappings' ++'_SDL_GameControllerOpen'.'SDL2.DLL'..'SDL_GameControllerOpen' ++'_SDL_GameControllerRumble'.'SDL2.DLL'..'SDL_GameControllerRumble' +++'_SDL_GameControllerRumbleTriggers'.'SDL2.DLL'..'SDL_GameControllerRumbleTriggers' +++'_SDL_GameControllerSetLED'.'SDL2.DLL'..'SDL_GameControllerSetLED' ++'_SDL_GameControllerSetPlayerIndex'.'SDL2.DLL'..'SDL_GameControllerSetPlayerIndex' +++'_SDL_GameControllerSetSensorEnabled'.'SDL2.DLL'..'SDL_GameControllerSetSensorEnabled' ++'_SDL_GameControllerTypeForIndex'.'SDL2.DLL'..'SDL_GameControllerTypeForIndex' ++'_SDL_GameControllerUpdate'.'SDL2.DLL'..'SDL_GameControllerUpdate' ++'_SDL_GetAssertionHandler'.'SDL2.DLL'..'SDL_GetAssertionHandler' @@ -168,6 +181,7 @@ ++'_SDL_GetDisplayOrientation'.'SDL2.DLL'..'SDL_GetDisplayOrientation' ++'_SDL_GetDisplayUsableBounds'.'SDL2.DLL'..'SDL_GetDisplayUsableBounds' ++'_SDL_GetError'.'SDL2.DLL'..'SDL_GetError' +++'_SDL_GetErrorMsg'.'SDL2.DLL'..'SDL_GetErrorMsg' ++'_SDL_GetEventFilter'.'SDL2.DLL'..'SDL_GetEventFilter' ++'_SDL_GetGlobalMouseState'.'SDL2.DLL'..'SDL_GetGlobalMouseState' ++'_SDL_GetGrabbedWindow'.'SDL2.DLL'..'SDL_GetGrabbedWindow' @@ -197,6 +211,7 @@ ++'_SDL_GetPlatform'.'SDL2.DLL'..'SDL_GetPlatform' ++'_SDL_GetPowerInfo'.'SDL2.DLL'..'SDL_GetPowerInfo' ++'_SDL_GetPrefPath'.'SDL2.DLL'..'SDL_GetPrefPath' +++'_SDL_GetPreferredLocales'.'SDL2.DLL'..'SDL_GetPreferredLocales' ++'_SDL_GetQueuedAudioSize'.'SDL2.DLL'..'SDL_GetQueuedAudioSize' ++'_SDL_GetRGB'.'SDL2.DLL'..'SDL_GetRGB' ++'_SDL_GetRGBA'.'SDL2.DLL'..'SDL_GetRGBA' @@ -299,6 +314,7 @@ ++'_SDL_HasSSE41'.'SDL2.DLL'..'SDL_HasSSE41' ++'_SDL_HasSSE42'.'SDL2.DLL'..'SDL_HasSSE42' ++'_SDL_HasScreenKeyboardSupport'.'SDL2.DLL'..'SDL_HasScreenKeyboardSupport' +++'_SDL_HasSurfaceRLE'.'SDL2.DLL'..'SDL_HasSurfaceRLE' ++'_SDL_HideWindow'.'SDL2.DLL'..'SDL_HideWindow' ++'_SDL_Init'.'SDL2.DLL'..'SDL_Init' ++'_SDL_InitSubSystem'.'SDL2.DLL'..'SDL_InitSubSystem' @@ -310,8 +326,10 @@ ++'_SDL_IsShapedWindow'.'SDL2.DLL'..'SDL_IsShapedWindow' ++'_SDL_IsTablet'.'SDL2.DLL'..'SDL_IsTablet' ++'_SDL_IsTextInputActive'.'SDL2.DLL'..'SDL_IsTextInputActive' +++'_SDL_JoystickAttachVirtual'.'SDL2.DLL'..'SDL_JoystickAttachVirtual' ++'_SDL_JoystickClose'.'SDL2.DLL'..'SDL_JoystickClose' ++'_SDL_JoystickCurrentPowerLevel'.'SDL2.DLL'..'SDL_JoystickCurrentPowerLevel' +++'_SDL_JoystickDetachVirtual'.'SDL2.DLL'..'SDL_JoystickDetachVirtual' ++'_SDL_JoystickEventState'.'SDL2.DLL'..'SDL_JoystickEventState' ++'_SDL_JoystickFromInstanceID'.'SDL2.DLL'..'SDL_JoystickFromInstanceID' ++'_SDL_JoystickFromPlayerIndex'.'SDL2.DLL'..'SDL_JoystickFromPlayerIndex' @@ -334,10 +352,13 @@ ++'_SDL_JoystickGetPlayerIndex'.'SDL2.DLL'..'SDL_JoystickGetPlayerIndex' ++'_SDL_JoystickGetProduct'.'SDL2.DLL'..'SDL_JoystickGetProduct' ++'_SDL_JoystickGetProductVersion'.'SDL2.DLL'..'SDL_JoystickGetProductVersion' +++'_SDL_JoystickGetSerial'.'SDL2.DLL'..'SDL_JoystickGetSerial' ++'_SDL_JoystickGetType'.'SDL2.DLL'..'SDL_JoystickGetType' ++'_SDL_JoystickGetVendor'.'SDL2.DLL'..'SDL_JoystickGetVendor' +++'_SDL_JoystickHasLED'.'SDL2.DLL'..'SDL_JoystickHasLED' ++'_SDL_JoystickInstanceID'.'SDL2.DLL'..'SDL_JoystickInstanceID' ++'_SDL_JoystickIsHaptic'.'SDL2.DLL'..'SDL_JoystickIsHaptic' +++'_SDL_JoystickIsVirtual'.'SDL2.DLL'..'SDL_JoystickIsVirtual' ++'_SDL_JoystickName'.'SDL2.DLL'..'SDL_JoystickName' ++'_SDL_JoystickNameForIndex'.'SDL2.DLL'..'SDL_JoystickNameForIndex' ++'_SDL_JoystickNumAxes'.'SDL2.DLL'..'SDL_JoystickNumAxes' @@ -346,7 +367,12 @@ ++'_SDL_JoystickNumHats'.'SDL2.DLL'..'SDL_JoystickNumHats' ++'_SDL_JoystickOpen'.'SDL2.DLL'..'SDL_JoystickOpen' ++'_SDL_JoystickRumble'.'SDL2.DLL'..'SDL_JoystickRumble' +++'_SDL_JoystickRumbleTriggers'.'SDL2.DLL'..'SDL_JoystickRumbleTriggers' +++'_SDL_JoystickSetLED'.'SDL2.DLL'..'SDL_JoystickSetLED' ++'_SDL_JoystickSetPlayerIndex'.'SDL2.DLL'..'SDL_JoystickSetPlayerIndex' +++'_SDL_JoystickSetVirtualAxis'.'SDL2.DLL'..'SDL_JoystickSetVirtualAxis' +++'_SDL_JoystickSetVirtualButton'.'SDL2.DLL'..'SDL_JoystickSetVirtualButton' +++'_SDL_JoystickSetVirtualHat'.'SDL2.DLL'..'SDL_JoystickSetVirtualHat' ++'_SDL_JoystickUpdate'.'SDL2.DLL'..'SDL_JoystickUpdate' ++'_SDL_LoadBMP_RW'.'SDL2.DLL'..'SDL_LoadBMP_RW' ++'_SDL_LoadDollarTemplates'.'SDL2.DLL'..'SDL_LoadDollarTemplates' @@ -359,6 +385,7 @@ ++'_SDL_LockAudioDevice'.'SDL2.DLL'..'SDL_LockAudioDevice' ++'_SDL_LockJoysticks'.'SDL2.DLL'..'SDL_LockJoysticks' ++'_SDL_LockMutex'.'SDL2.DLL'..'SDL_LockMutex' +++'_SDL_LockSensors'.'SDL2.DLL'..'SDL_LockSensors' ++'_SDL_LockSurface'.'SDL2.DLL'..'SDL_LockSurface' ++'_SDL_LockTexture'.'SDL2.DLL'..'SDL_LockTexture' ++'_SDL_LockTextureToSurface'.'SDL2.DLL'..'SDL_LockTextureToSurface' @@ -387,6 +414,8 @@ ++'_SDL_MemoryBarrierReleaseFunction'.'SDL2.DLL'..'SDL_MemoryBarrierReleaseFunction' ++'_SDL_Metal_CreateView'.'SDL2.DLL'..'SDL_Metal_CreateView' ++'_SDL_Metal_DestroyView'.'SDL2.DLL'..'SDL_Metal_DestroyView' +++'_SDL_Metal_GetDrawableSize'.'SDL2.DLL'..'SDL_Metal_GetDrawableSize' +++'_SDL_Metal_GetLayer'.'SDL2.DLL'..'SDL_Metal_GetLayer' ++'_SDL_MinimizeWindow'.'SDL2.DLL'..'SDL_MinimizeWindow' ++'_SDL_MixAudio'.'SDL2.DLL'..'SDL_MixAudio' ++'_SDL_MixAudioFormat'.'SDL2.DLL'..'SDL_MixAudioFormat' @@ -395,8 +424,15 @@ ++'_SDL_NumHaptics'.'SDL2.DLL'..'SDL_NumHaptics' ++'_SDL_NumJoysticks'.'SDL2.DLL'..'SDL_NumJoysticks' ++'_SDL_NumSensors'.'SDL2.DLL'..'SDL_NumSensors' +++'_SDL_OnApplicationDidBecomeActive'.'SDL2.DLL'..'SDL_OnApplicationDidBecomeActive' +++'_SDL_OnApplicationDidEnterBackground'.'SDL2.DLL'..'SDL_OnApplicationDidEnterBackground' +++'_SDL_OnApplicationDidReceiveMemoryWarning'.'SDL2.DLL'..'SDL_OnApplicationDidReceiveMemoryWarning' +++'_SDL_OnApplicationWillEnterForeground'.'SDL2.DLL'..'SDL_OnApplicationWillEnterForeground' +++'_SDL_OnApplicationWillResignActive'.'SDL2.DLL'..'SDL_OnApplicationWillResignActive' +++'_SDL_OnApplicationWillTerminate'.'SDL2.DLL'..'SDL_OnApplicationWillTerminate' ++'_SDL_OpenAudio'.'SDL2.DLL'..'SDL_OpenAudio' ++'_SDL_OpenAudioDevice'.'SDL2.DLL'..'SDL_OpenAudioDevice' +++'_SDL_OpenURL'.'SDL2.DLL'..'SDL_OpenURL' ++'_SDL_PauseAudio'.'SDL2.DLL'..'SDL_PauseAudio' ++'_SDL_PauseAudioDevice'.'SDL2.DLL'..'SDL_PauseAudioDevice' ++'_SDL_PeepEvents'.'SDL2.DLL'..'SDL_PeepEvents' @@ -475,6 +511,7 @@ ++'_SDL_SIMDAlloc'.'SDL2.DLL'..'SDL_SIMDAlloc' ++'_SDL_SIMDFree'.'SDL2.DLL'..'SDL_SIMDFree' ++'_SDL_SIMDGetAlignment'.'SDL2.DLL'..'SDL_SIMDGetAlignment' +++'_SDL_SIMDRealloc'.'SDL2.DLL'..'SDL_SIMDRealloc' ++'_SDL_SaveAllDollarTemplates'.'SDL2.DLL'..'SDL_SaveAllDollarTemplates' ++'_SDL_SaveBMP_RW'.'SDL2.DLL'..'SDL_SaveBMP_RW' ++'_SDL_SaveDollarTemplate'.'SDL2.DLL'..'SDL_SaveDollarTemplate' @@ -564,6 +601,7 @@ ++'_SDL_UnlockAudioDevice'.'SDL2.DLL'..'SDL_UnlockAudioDevice' ++'_SDL_UnlockJoysticks'.'SDL2.DLL'..'SDL_UnlockJoysticks' ++'_SDL_UnlockMutex'.'SDL2.DLL'..'SDL_UnlockMutex' +++'_SDL_UnlockSensors'.'SDL2.DLL'..'SDL_UnlockSensors' ++'_SDL_UnlockSurface'.'SDL2.DLL'..'SDL_UnlockSurface' ++'_SDL_UnlockTexture'.'SDL2.DLL'..'SDL_UnlockTexture' ++'_SDL_UnregisterApp'.'SDL2.DLL'..'SDL_UnregisterApp' @@ -612,6 +650,7 @@ ++'_SDL_copysignf'.'SDL2.DLL'..'SDL_copysignf' ++'_SDL_cos'.'SDL2.DLL'..'SDL_cos' ++'_SDL_cosf'.'SDL2.DLL'..'SDL_cosf' +++'_SDL_crc32'.'SDL2.DLL'..'SDL_crc32' ++'_SDL_exp'.'SDL2.DLL'..'SDL_exp' ++'_SDL_expf'.'SDL2.DLL'..'SDL_expf' ++'_SDL_fabs'.'SDL2.DLL'..'SDL_fabs' @@ -627,7 +666,9 @@ ++'_SDL_iconv_open'.'SDL2.DLL'..'SDL_iconv_open' ++'_SDL_iconv_string'.'SDL2.DLL'..'SDL_iconv_string' ++'_SDL_isdigit'.'SDL2.DLL'..'SDL_isdigit' +++'_SDL_islower'.'SDL2.DLL'..'SDL_islower' ++'_SDL_isspace'.'SDL2.DLL'..'SDL_isspace' +++'_SDL_isupper'.'SDL2.DLL'..'SDL_isupper' ++'_SDL_itoa'.'SDL2.DLL'..'SDL_itoa' ++'_SDL_lltoa'.'SDL2.DLL'..'SDL_lltoa' ++'_SDL_log'.'SDL2.DLL'..'SDL_log' @@ -677,6 +718,8 @@ ++'_SDL_tanf'.'SDL2.DLL'..'SDL_tanf' ++'_SDL_tolower'.'SDL2.DLL'..'SDL_tolower' ++'_SDL_toupper'.'SDL2.DLL'..'SDL_toupper' +++'_SDL_trunc'.'SDL2.DLL'..'SDL_trunc' +++'_SDL_truncf'.'SDL2.DLL'..'SDL_truncf' ++'_SDL_uitoa'.'SDL2.DLL'..'SDL_uitoa' ++'_SDL_ulltoa'.'SDL2.DLL'..'SDL_ulltoa' ++'_SDL_ultoa'.'SDL2.DLL'..'SDL_ultoa' @@ -684,10 +727,12 @@ ++'_SDL_utf8strlen'.'SDL2.DLL'..'SDL_utf8strlen' ++'_SDL_vsnprintf'.'SDL2.DLL'..'SDL_vsnprintf' ++'_SDL_vsscanf'.'SDL2.DLL'..'SDL_vsscanf' +++'_SDL_wcscasecmp'.'SDL2.DLL'..'SDL_wcscasecmp' ++'_SDL_wcscmp'.'SDL2.DLL'..'SDL_wcscmp' ++'_SDL_wcsdup'.'SDL2.DLL'..'SDL_wcsdup' ++'_SDL_wcslcat'.'SDL2.DLL'..'SDL_wcslcat' ++'_SDL_wcslcpy'.'SDL2.DLL'..'SDL_wcslcpy' ++'_SDL_wcslen'.'SDL2.DLL'..'SDL_wcslen' +++'_SDL_wcsncasecmp'.'SDL2.DLL'..'SDL_wcsncasecmp' ++'_SDL_wcsncmp'.'SDL2.DLL'..'SDL_wcsncmp' ++'_SDL_wcsstr'.'SDL2.DLL'..'SDL_wcsstr' diff --git a/Windows/SDL2/watcom/SDL2.lib b/Windows/SDL2/watcom/SDL2.lib index df572140..97502cce 100644 Binary files a/Windows/SDL2/watcom/SDL2.lib and b/Windows/SDL2/watcom/SDL2.lib differ