diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h index d48d9d4a..fc35a419 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h @@ -51,6 +51,7 @@ #include "SDL_power.h" #include "SDL_render.h" #include "SDL_rwops.h" +#include "SDL_sensor.h" #include "SDL_shape.h" #include "SDL_system.h" #include "SDL_thread.h" @@ -80,10 +81,11 @@ extern "C" { #define SDL_INIT_HAPTIC 0x00001000u #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ #define SDL_INIT_EVENTS 0x00004000u +#define SDL_INIT_SENSOR 0x00008000u #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ #define SDL_INIT_EVERYTHING ( \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ - SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ + SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \ ) /* @} */ 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 4c4da37e..f2b28cfb 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_android.h @@ -98,6 +98,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -132,8 +134,12 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_ANDROID 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_ANDROID 1 +/* Enable sensor driver */ +#define SDL_SENSOR_ANDROID 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_DLOPEN 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 7b0a6ca2..a0d4f523 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_iphoneos.h @@ -99,6 +99,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -135,6 +137,14 @@ /* Enable MFi joystick support */ #define SDL_JOYSTICK_MFI 1 +#define SDL_JOYSTICK_HIDAPI 1 + +#ifdef __TVOS__ +#define SDL_SENSOR_DUMMY 1 +#else +/* Enable the CoreMotion sensor driver */ +#define SDL_SENSOR_COREMOTION 1 +#endif /* Enable Unix style SO loading */ #define SDL_LOADSO_DLOPEN 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 29f583e1..9ebd4a33 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h @@ -102,6 +102,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -135,8 +137,12 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_IOKIT 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_IOKIT 1 +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_DLOPEN 1 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 5b03d8b6..bf7fc447 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_minimal.h @@ -64,6 +64,9 @@ typedef unsigned long uintptr_t; /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ #define SDL_HAPTIC_DISABLED 1 +/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */ +#define SDL_SENSOR_DISABLED 1 + /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ #define SDL_LOADSO_DISABLED 1 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 dc95fb43..e4d00ba1 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_os2.h @@ -31,7 +31,9 @@ #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 +/*#undef SDL_JOYSTICK_HIDAPI */ +#define SDL_SENSOR_DUMMY 1 #define SDL_VIDEO_DRIVER_DUMMY 1 #define SDL_VIDEO_DRIVER_OS2 1 @@ -144,6 +146,8 @@ /* #undef HAVE_COPYSIGNF */ #define HAVE_COS 1 /* #undef HAVE_COSF */ +#define HAVE_EXP 1 +/* #undef HAVE_EXPF */ #define HAVE_FABS 1 /* #undef HAVE_FABSF */ #define HAVE_FLOOR 1 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 be5a85c1..64111a12 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_pandora.h @@ -90,6 +90,7 @@ #define HAVE_COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 #define HAVE_FABS 1 #define HAVE_FLOOR 1 #define HAVE_LOG 1 @@ -113,6 +114,8 @@ #define SDL_JOYSTICK_LINUX 1 #define SDL_HAPTIC_LINUX 1 +#define SDL_SENSOR_DUMMY 1 + #define SDL_LOADSO_DLOPEN 1 #define SDL_THREAD_PTHREAD 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 61c33497..2422672a 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_psp.h @@ -97,6 +97,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -126,22 +128,25 @@ /* PSP isn't that sophisticated */ #define LACKS_SYS_MMAN_H 1 -/* Enable the stub thread support (src/thread/psp/\*.c) */ +/* Enable the PSP thread support (src/thread/psp/\*.c) */ #define SDL_THREAD_PSP 1 -/* Enable the stub timer support (src/timer/psp/\*.c) */ +/* Enable the PSP timer support (src/timer/psp/\*.c) */ #define SDL_TIMERS_PSP 1 -/* Enable the stub joystick driver (src/joystick/psp/\*.c) */ +/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */ #define SDL_JOYSTICK_PSP 1 -/* Enable the stub audio driver (src/audio/psp/\*.c) */ +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + +/* Enable the PSP audio driver (src/audio/psp/\*.c) */ #define SDL_AUDIO_DRIVER_PSP 1 -/* PSP video dirver */ +/* PSP video driver */ #define SDL_VIDEO_DRIVER_PSP 1 -/* PSP render dirver */ +/* PSP render driver */ #define SDL_VIDEO_RENDER_PSP 1 #define SDL_POWER_PSP 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 1b561722..37a380ab 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_windows.h @@ -139,6 +139,8 @@ typedef unsigned int uintptr_t; #define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -188,9 +190,13 @@ typedef unsigned int uintptr_t; /* Enable various input drivers */ #define SDL_JOYSTICK_DINPUT 1 #define SDL_JOYSTICK_XINPUT 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_XINPUT 1 +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 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 aac0e601..568b4211 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_winrt.h @@ -155,6 +155,8 @@ typedef unsigned int uintptr_t; #define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -190,6 +192,9 @@ typedef unsigned int uintptr_t; #define SDL_HAPTIC_XINPUT 1 #endif +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 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 fe86d5ec..b6c00d0f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_wiz.h @@ -94,6 +94,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -127,6 +129,8 @@ #define SDL_JOYSTICK_LINUX 1 #define SDL_HAPTIC_LINUX 1 +#define SDL_SENSOR_DUMMY 1 + #define SDL_LOADSO_DLOPEN 1 #define SDL_THREAD_PTHREAD 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h index 74d9fdf8..ee3a47e8 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h @@ -57,6 +57,9 @@ #undef bool #endif #endif +#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H) +#include +#endif #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) #include #endif @@ -159,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); +/** + * This function returns true if the CPU has AVX-512F (foundation) features. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); + /** * This function returns true if the CPU has NEON (ARM SIMD) features. */ @@ -169,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); */ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); - /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h index 3d39e6a7..af22eb64 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h @@ -85,6 +85,9 @@ typedef enum Called on Android in onResume() */ + /* Display events */ + SDL_DISPLAYEVENT = 0x150, /**< Display state change */ + /* Window events */ SDL_WINDOWEVENT = 0x200, /**< Window state change */ SDL_SYSWMEVENT, /**< System specific event */ @@ -144,6 +147,9 @@ typedef enum SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ + /* Sensor events */ + SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */ + /* Render events */ SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ @@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ } SDL_CommonEvent; +/** + * \brief Display state change event data (event.display.*) + */ +typedef struct SDL_DisplayEvent +{ + Uint32 type; /**< ::SDL_DISPLAYEVENT */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Uint32 display; /**< The associated display index */ + Uint8 event; /**< ::SDL_DisplayEventID */ + Uint8 padding1; + Uint8 padding2; + Uint8 padding3; + Sint32 data1; /**< event dependent data */ +} SDL_DisplayEvent; + /** * \brief Window state change event data (event.window.*) */ @@ -471,6 +492,17 @@ typedef struct SDL_DropEvent } SDL_DropEvent; +/** + * \brief Sensor event structure (event.sensor.*) + */ +typedef struct SDL_SensorEvent +{ + Uint32 type; /**< ::SDL_SENSORUPDATE */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Sint32 which; /**< The instance ID of the sensor */ + float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */ +} SDL_SensorEvent; + /** * \brief The "quit requested" event */ @@ -526,6 +558,7 @@ typedef union SDL_Event { Uint32 type; /**< Event type, shared with all events */ SDL_CommonEvent common; /**< Common event data */ + SDL_DisplayEvent display; /**< Window event data */ SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ @@ -542,6 +575,7 @@ typedef union SDL_Event 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 */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h index 2e024be6..fb8a7a52 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index); */ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); +/** + * Get the mapping of a game controller. + * This can be called before any controllers are opened. + * + * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available + */ +extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index); + /** * Open a game controller for use. * The index passed as an argument refers to the N'th game controller on the system. @@ -345,6 +353,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); +/** + * Trigger 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 + * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF + * \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 + */ +extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + /** * Close a controller previously opened with SDL_GameControllerOpen(). */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h index e3a2bca5..cfb91c53 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h @@ -656,8 +656,8 @@ typedef struct SDL_HapticRamp * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. * * The Left/Right effect is used to explicitly control the large and small - * motors, commonly found in modern game controllers. One motor is high - * frequency, the other is low frequency. + * motors, commonly found in modern game controllers. The small (right) motor + * is high frequency, and the large (left) motor is low frequency. * * \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HapticEffect @@ -668,7 +668,7 @@ typedef struct SDL_HapticLeftRight Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ /* Replay */ - Uint32 length; /**< Duration of the effect. */ + Uint32 length; /**< Duration of the effect in milliseconds. */ /* Rumble */ Uint16 large_magnitude; /**< Control of the large controller motor. */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h index 3834640f..07a91133 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -465,6 +465,88 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" +/** + * \brief A variable controlling whether the HIDAPI joystick drivers should be used. + * + * This variable can be set to the following values: + * "0" - HIDAPI drivers are not used + * "1" - HIDAPI drivers are used (the default) + * + * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below. + */ +#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" + +/** + * \brief A variable controlling whether the HIDAPI driver for PS4 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_PS4 "SDL_JOYSTICK_HIDAPI_PS4" + +/** + * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. + * + * This variable can be set to the following values: + * "0" - extended reports are not enabled (the default) + * "1" - extended reports + * + * Extended input reports allow rumble on Bluetooth PS4 controllers, but + * break DirectInput handling for applications that don't use SDL. + * + * Once extended reports are enabled, they can not be disabled without + * power cycling the controller. + */ +#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" + +/** + * \brief A variable controlling whether the HIDAPI driver for Steam 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_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" + +/** + * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch 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_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" + +/** + * \brief A variable controlling whether the HIDAPI driver for XBox 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_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" + +/** + * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs + * + * The variable can be set to the following values: + * "0" - Do not scan for Steam Controllers + * "1" - Scan for Steam Controllers (the default) + * + * The default value is "1". This hint must be set before initializing the joystick subsystem. + */ +#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" + + /** * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. * This is a debugging aid for developers and not expected to be used by end users. The default is "1" @@ -752,6 +834,23 @@ extern "C" { */ #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" + /** + * \brief A variable to control whether we trap the Android back button to handle it manually. + * This is necessary for the right mouse button to work on some Android devices, or + * to be able to trap the back button for use in your code reliably. If set to true, + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * SDL_SCANCODE_AC_BACK. + * + * The variable can be set to the following values: + * "0" - Back button will be handled as usual for system. (default) + * "1" - Back button will be trapped, allowing you to handle the key press + * manually. (This will also let right mouse click work on systems + * where the right mouse button functions as back.) + * + * The value of this hint is used at runtime, so it can be changed at any time. + */ +#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" + /** * \brief A variable to control whether the return key on the soft keyboard * should hide the soft keyboard on Android and iOS. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h index f67772d7..8303c5e8 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -97,10 +97,10 @@ typedef enum typedef enum { SDL_JOYSTICK_POWER_UNKNOWN = -1, - SDL_JOYSTICK_POWER_EMPTY, - SDL_JOYSTICK_POWER_LOW, - SDL_JOYSTICK_POWER_MEDIUM, - SDL_JOYSTICK_POWER_FULL, + SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */ + SDL_JOYSTICK_POWER_LOW, /* <= 20% */ + SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */ + SDL_JOYSTICK_POWER_FULL, /* <= 100% */ SDL_JOYSTICK_POWER_WIRED, SDL_JOYSTICK_POWER_MAX } SDL_JoystickPowerLevel; @@ -361,6 +361,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, int button); +/** + * Trigger 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 + * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF + * \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 + */ +extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + /** * Close a joystick previously opened with SDL_JoystickOpen(). */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h index dbe9b97d..519a2439 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-11914:f1084c419f33" -#define SDL_REVISION_NUMBER 11914 +#define SDL_REVISION "hg-12184:02509665751f" +#define SDL_REVISION_NUMBER 12184 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h new file mode 100644 index 00000000..fa19c41f --- /dev/null +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h @@ -0,0 +1,251 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2018 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_sensor.h + * + * Include file for SDL sensor event handling + * + */ + +#ifndef _SDL_sensor_h +#define _SDL_sensor_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 + +/** + * \file SDL_sensor.h + * + * In order to use these functions, SDL_Init() must have been called + * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system + * for sensors, and load appropriate drivers. + */ + +struct _SDL_Sensor; +typedef struct _SDL_Sensor SDL_Sensor; + +/** + * This is a unique ID for a sensor for the time it is connected to the system, + * and is never reused for the lifetime of the application. + * + * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. + */ +typedef Sint32 SDL_SensorID; + +/* The different sensors defined by SDL + * + * Additional sensors may be available, using platform dependent semantics. + * + * Hare are the additional Android sensors: + * https://developer.android.com/reference/android/hardware/SensorEvent.html#values + */ +typedef enum +{ + SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */ + SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */ + SDL_SENSOR_ACCEL, /**< Accelerometer */ + SDL_SENSOR_GYRO /**< Gyroscope */ +} SDL_SensorType; + +/** + * 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. + * + * 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: + * -X ... +X : left ... right + * -Y ... +Y : bottom ... top + * -Z ... +Z : farther ... closer + * + * The axis data is not changed when the phone is rotated. + * + * \sa SDL_GetDisplayOrientation() + */ +#define SDL_STANDARD_GRAVITY 9.80665f + +/** + * Gyroscope sensor + * + * The gyroscope returns the current rate of rotation in radians per second. + * The rotation is positive in the counter-clockwise direction. That is, + * an observer looking from a positive location on one of the axes would + * 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 + * + * For phones held in portrait mode, 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. + * + * \sa SDL_GetDisplayOrientation() + */ + +/* Function prototypes */ + +/** + * \brief Count the number of sensors attached to the system right now + */ +extern DECLSPEC int SDLCALL SDL_NumSensors(void); + +/** + * \brief Get the implementation dependent name of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor name, or NULL if device_index is out of range. + */ +extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); + +/** + * \brief Get the type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range. + */ +extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index); + +/** + * \brief Get the platform dependent type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor platform dependent type, or -1 if device_index is out of range. + */ +extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index); + +/** + * \brief Get the instance ID of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor instance ID, or -1 if device_index is out of range. + */ +extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index); + +/** + * \brief Open a sensor for use. + * + * The index passed as an argument refers to the N'th sensor on the system. + * + * \return A sensor identifier, or NULL if an error occurred. + */ +extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); + +/** + * Return the SDL_Sensor associated with an instance id. + */ +extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id); + +/** + * \brief Get the implementation dependent name of a sensor. + * + * \return The sensor name, or NULL if the sensor is NULL. + */ +extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); + +/** + * \brief Get the type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL. + */ +extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); + +/** + * \brief Get the platform dependent type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor platform dependent type, or -1 if the sensor is NULL. + */ +extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); + +/** + * \brief Get the instance ID of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor instance ID, or -1 if the sensor is NULL. + */ +extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor); + +/** + * Get the current state of an opened sensor. + * + * The number of values and interpretation of the data is sensor dependent. + * + * \param sensor The 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_SensorGetData(SDL_Sensor * sensor, float *data, int num_values); + +/** + * Close a sensor previously opened with SDL_SensorOpen() + */ +extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); + +/** + * Update the current state of the open sensors. + * + * This is called automatically by the event loop if sensor events are enabled. + * + * This needs to be called from the thread that initialized the sensor subsystem. + */ +extern DECLSPEC void SDLCALL SDL_SensorUpdate(void); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_sensor_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h index 92fcbcc2..e373bc38 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -450,6 +450,7 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_ extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); +extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr); extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); @@ -513,6 +514,8 @@ extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); extern DECLSPEC double SDLCALL SDL_cos(double x); extern DECLSPEC float SDLCALL SDL_cosf(float x); +extern DECLSPEC double SDLCALL SDL_exp(double x); +extern DECLSPEC float SDLCALL SDL_expf(float x); extern DECLSPEC double SDLCALL SDL_fabs(double x); extern DECLSPEC float SDLCALL SDL_fabsf(float x); extern DECLSPEC double SDLCALL SDL_floor(double x); diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h index 7b776fdf..4dc372d6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h @@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a #endif /* __WIN32__ */ +/* Platform specific functions for Linux */ +#ifdef __LINUX__ + +/** + \brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available. + + \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority); + +#endif /* __LINUX__ */ + /* Platform specific functions for iOS */ #if defined(__IPHONEOS__) && __IPHONEOS__ @@ -113,6 +125,21 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); +/** + \brief Return true if the application is running on a Chromebook + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); + +/** + \brief Return true is the application is running on a Samsung DeX docking station + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void); + +/** + \brief Trigger the Android system back button behavior. + */ +extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void); + /** See the official Android developer guide for more information: http://developer.android.com/guide/topics/data/data-storage.html @@ -236,6 +263,11 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); #endif /* __WINRT__ */ +/** + \brief Return true if the current device is a tablet. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h index 82a43fc0..5d01d5a5 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h @@ -54,12 +54,13 @@ typedef unsigned int SDL_TLSID; /** * The SDL thread priority. * - * \note On many systems you require special privileges to set high priority. + * \note On many systems you require special privileges to set high or time critical priority. */ typedef enum { SDL_THREAD_PRIORITY_LOW, SDL_THREAD_PRIORITY_NORMAL, - SDL_THREAD_PRIORITY_HIGH + SDL_THREAD_PRIORITY_HIGH, + SDL_THREAD_PRIORITY_TIME_CRITICAL } SDL_ThreadPriority; /** diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h index 83f49faa..461f1380 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -169,6 +169,24 @@ typedef enum SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */ } SDL_WindowEventID; +/** + * \brief Event subtype for display events + */ +typedef enum +{ + SDL_DISPLAYEVENT_NONE, /**< Never used */ + SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ +} SDL_DisplayEventID; + +typedef enum +{ + SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */ + SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */ + SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */ + SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */ + SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */ +} SDL_DisplayOrientation; + /** * \brief An opaque handle to an OpenGL context. */ @@ -316,18 +334,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); */ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); -/** - * \brief Get the dots/pixels-per-inch for a display - * - * \note Diagonal, horizontal and vertical DPI can all be optionally - * returned if the parameter is non-NULL. - * - * \return 0 on success, or -1 if no DPI information is available or the index is out of range. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); - /** * \brief Get the usable desktop area represented by a display, with the * primary display located at 0,0 @@ -347,6 +353,27 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl */ extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect); +/** + * \brief Get the dots/pixels-per-inch for a display + * + * \note Diagonal, horizontal and vertical DPI can all be optionally + * returned if the parameter is non-NULL. + * + * \return 0 on success, or -1 if no DPI information is available or the index is out of range. + * + * \sa SDL_GetNumVideoDisplays() + */ +extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); + +/** + * \brief Get the orientation of a display + * + * \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available. + * + * \sa SDL_GetNumVideoDisplays() + */ +extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex); + /** * \brief Returns the number of available display modes. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h index f04c21ad..51373b18 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_vulkan.h @@ -135,7 +135,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * \brief Get the names of the Vulkan instance extensions needed to create * a surface with \c SDL_Vulkan_CreateSurface(). * - * \param [in] window Window for which the required Vulkan instance + * \param [in] \c NULL or window Window for which the required Vulkan instance * extensions should be retrieved * \param [in,out] count pointer to an \c unsigned related to the number of * required Vulkan instance extensions @@ -153,6 +153,10 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * is smaller than the number of required extensions, \c SDL_FALSE will be * returned instead of \c SDL_TRUE, to indicate that not all the required * extensions were returned. + * + * \note If \c window is not NULL, it will be checked against its creation + * flags to ensure that the Vulkan flag is present. This parameter + * will be removed in a future major release. * * \note The returned list of extensions will contain \c VK_KHR_surface * and zero or more platform specific extensions @@ -160,12 +164,13 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * \note The extension names queried here must be enabled when calling * VkCreateInstance, otherwise surface creation will fail. * - * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag. + * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag + * or be \c NULL * * \code * unsigned int count; * // get count of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL)) + * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL)) * handle_error(); * * static const char *const additionalExtensions[] = @@ -179,7 +184,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * handle_error(); * * // get names of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names)) + * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names)) * handle_error(); * * // copy additional extensions after required extensions diff --git a/MacOSX/SDL2.framework/Versions/A/SDL2 b/MacOSX/SDL2.framework/Versions/A/SDL2 index 749e7daa..a4d443da 100755 Binary files a/MacOSX/SDL2.framework/Versions/A/SDL2 and b/MacOSX/SDL2.framework/Versions/A/SDL2 differ diff --git a/Windows/SDL2/include/SDL.h b/Windows/SDL2/include/SDL.h index d48d9d4a..fc35a419 100644 --- a/Windows/SDL2/include/SDL.h +++ b/Windows/SDL2/include/SDL.h @@ -51,6 +51,7 @@ #include "SDL_power.h" #include "SDL_render.h" #include "SDL_rwops.h" +#include "SDL_sensor.h" #include "SDL_shape.h" #include "SDL_system.h" #include "SDL_thread.h" @@ -80,10 +81,11 @@ extern "C" { #define SDL_INIT_HAPTIC 0x00001000u #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ #define SDL_INIT_EVENTS 0x00004000u +#define SDL_INIT_SENSOR 0x00008000u #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ #define SDL_INIT_EVERYTHING ( \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ - SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ + SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \ ) /* @} */ diff --git a/Windows/SDL2/include/SDL_config_android.h b/Windows/SDL2/include/SDL_config_android.h index 4c4da37e..f2b28cfb 100644 --- a/Windows/SDL2/include/SDL_config_android.h +++ b/Windows/SDL2/include/SDL_config_android.h @@ -98,6 +98,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -132,8 +134,12 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_ANDROID 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_ANDROID 1 +/* Enable sensor driver */ +#define SDL_SENSOR_ANDROID 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_DLOPEN 1 diff --git a/Windows/SDL2/include/SDL_config_iphoneos.h b/Windows/SDL2/include/SDL_config_iphoneos.h index 7b0a6ca2..a0d4f523 100644 --- a/Windows/SDL2/include/SDL_config_iphoneos.h +++ b/Windows/SDL2/include/SDL_config_iphoneos.h @@ -99,6 +99,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -135,6 +137,14 @@ /* Enable MFi joystick support */ #define SDL_JOYSTICK_MFI 1 +#define SDL_JOYSTICK_HIDAPI 1 + +#ifdef __TVOS__ +#define SDL_SENSOR_DUMMY 1 +#else +/* Enable the CoreMotion sensor driver */ +#define SDL_SENSOR_COREMOTION 1 +#endif /* Enable Unix style SO loading */ #define SDL_LOADSO_DLOPEN 1 diff --git a/Windows/SDL2/include/SDL_config_macosx.h b/Windows/SDL2/include/SDL_config_macosx.h index 29f583e1..9ebd4a33 100644 --- a/Windows/SDL2/include/SDL_config_macosx.h +++ b/Windows/SDL2/include/SDL_config_macosx.h @@ -102,6 +102,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -135,8 +137,12 @@ /* Enable various input drivers */ #define SDL_JOYSTICK_IOKIT 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_IOKIT 1 +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_DLOPEN 1 diff --git a/Windows/SDL2/include/SDL_config_minimal.h b/Windows/SDL2/include/SDL_config_minimal.h index 5b03d8b6..bf7fc447 100644 --- a/Windows/SDL2/include/SDL_config_minimal.h +++ b/Windows/SDL2/include/SDL_config_minimal.h @@ -64,6 +64,9 @@ typedef unsigned long uintptr_t; /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ #define SDL_HAPTIC_DISABLED 1 +/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */ +#define SDL_SENSOR_DISABLED 1 + /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ #define SDL_LOADSO_DISABLED 1 diff --git a/Windows/SDL2/include/SDL_config_os2.h b/Windows/SDL2/include/SDL_config_os2.h index dc95fb43..e4d00ba1 100644 --- a/Windows/SDL2/include/SDL_config_os2.h +++ b/Windows/SDL2/include/SDL_config_os2.h @@ -31,7 +31,9 @@ #define SDL_JOYSTICK_DISABLED 1 #define SDL_HAPTIC_DISABLED 1 +/*#undef SDL_JOYSTICK_HIDAPI */ +#define SDL_SENSOR_DUMMY 1 #define SDL_VIDEO_DRIVER_DUMMY 1 #define SDL_VIDEO_DRIVER_OS2 1 @@ -144,6 +146,8 @@ /* #undef HAVE_COPYSIGNF */ #define HAVE_COS 1 /* #undef HAVE_COSF */ +#define HAVE_EXP 1 +/* #undef HAVE_EXPF */ #define HAVE_FABS 1 /* #undef HAVE_FABSF */ #define HAVE_FLOOR 1 diff --git a/Windows/SDL2/include/SDL_config_pandora.h b/Windows/SDL2/include/SDL_config_pandora.h index be5a85c1..64111a12 100644 --- a/Windows/SDL2/include/SDL_config_pandora.h +++ b/Windows/SDL2/include/SDL_config_pandora.h @@ -90,6 +90,7 @@ #define HAVE_COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 #define HAVE_FABS 1 #define HAVE_FLOOR 1 #define HAVE_LOG 1 @@ -113,6 +114,8 @@ #define SDL_JOYSTICK_LINUX 1 #define SDL_HAPTIC_LINUX 1 +#define SDL_SENSOR_DUMMY 1 + #define SDL_LOADSO_DLOPEN 1 #define SDL_THREAD_PTHREAD 1 diff --git a/Windows/SDL2/include/SDL_config_psp.h b/Windows/SDL2/include/SDL_config_psp.h index 61c33497..2422672a 100644 --- a/Windows/SDL2/include/SDL_config_psp.h +++ b/Windows/SDL2/include/SDL_config_psp.h @@ -97,6 +97,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -126,22 +128,25 @@ /* PSP isn't that sophisticated */ #define LACKS_SYS_MMAN_H 1 -/* Enable the stub thread support (src/thread/psp/\*.c) */ +/* Enable the PSP thread support (src/thread/psp/\*.c) */ #define SDL_THREAD_PSP 1 -/* Enable the stub timer support (src/timer/psp/\*.c) */ +/* Enable the PSP timer support (src/timer/psp/\*.c) */ #define SDL_TIMERS_PSP 1 -/* Enable the stub joystick driver (src/joystick/psp/\*.c) */ +/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */ #define SDL_JOYSTICK_PSP 1 -/* Enable the stub audio driver (src/audio/psp/\*.c) */ +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + +/* Enable the PSP audio driver (src/audio/psp/\*.c) */ #define SDL_AUDIO_DRIVER_PSP 1 -/* PSP video dirver */ +/* PSP video driver */ #define SDL_VIDEO_DRIVER_PSP 1 -/* PSP render dirver */ +/* PSP render driver */ #define SDL_VIDEO_RENDER_PSP 1 #define SDL_POWER_PSP 1 diff --git a/Windows/SDL2/include/SDL_config_windows.h b/Windows/SDL2/include/SDL_config_windows.h index 1b561722..37a380ab 100644 --- a/Windows/SDL2/include/SDL_config_windows.h +++ b/Windows/SDL2/include/SDL_config_windows.h @@ -139,6 +139,8 @@ typedef unsigned int uintptr_t; #define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -188,9 +190,13 @@ typedef unsigned int uintptr_t; /* Enable various input drivers */ #define SDL_JOYSTICK_DINPUT 1 #define SDL_JOYSTICK_XINPUT 1 +#define SDL_JOYSTICK_HIDAPI 1 #define SDL_HAPTIC_DINPUT 1 #define SDL_HAPTIC_XINPUT 1 +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 diff --git a/Windows/SDL2/include/SDL_config_winrt.h b/Windows/SDL2/include/SDL_config_winrt.h index aac0e601..568b4211 100644 --- a/Windows/SDL2/include/SDL_config_winrt.h +++ b/Windows/SDL2/include/SDL_config_winrt.h @@ -155,6 +155,8 @@ typedef unsigned int uintptr_t; #define HAVE__COPYSIGN 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -190,6 +192,9 @@ typedef unsigned int uintptr_t; #define SDL_HAPTIC_XINPUT 1 #endif +/* Enable the dummy sensor driver */ +#define SDL_SENSOR_DUMMY 1 + /* Enable various shared object loading systems */ #define SDL_LOADSO_WINDOWS 1 diff --git a/Windows/SDL2/include/SDL_config_wiz.h b/Windows/SDL2/include/SDL_config_wiz.h index fe86d5ec..b6c00d0f 100644 --- a/Windows/SDL2/include/SDL_config_wiz.h +++ b/Windows/SDL2/include/SDL_config_wiz.h @@ -94,6 +94,8 @@ #define HAVE_COPYSIGNF 1 #define HAVE_COS 1 #define HAVE_COSF 1 +#define HAVE_EXP 1 +#define HAVE_EXPF 1 #define HAVE_FABS 1 #define HAVE_FABSF 1 #define HAVE_FLOOR 1 @@ -127,6 +129,8 @@ #define SDL_JOYSTICK_LINUX 1 #define SDL_HAPTIC_LINUX 1 +#define SDL_SENSOR_DUMMY 1 + #define SDL_LOADSO_DLOPEN 1 #define SDL_THREAD_PTHREAD 1 diff --git a/Windows/SDL2/include/SDL_cpuinfo.h b/Windows/SDL2/include/SDL_cpuinfo.h index 74d9fdf8..ee3a47e8 100644 --- a/Windows/SDL2/include/SDL_cpuinfo.h +++ b/Windows/SDL2/include/SDL_cpuinfo.h @@ -57,6 +57,9 @@ #undef bool #endif #endif +#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H) +#include +#endif #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) #include #endif @@ -159,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); +/** + * This function returns true if the CPU has AVX-512F (foundation) features. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); + /** * This function returns true if the CPU has NEON (ARM SIMD) features. */ @@ -169,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); */ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); - /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Windows/SDL2/include/SDL_events.h b/Windows/SDL2/include/SDL_events.h index 3d39e6a7..af22eb64 100644 --- a/Windows/SDL2/include/SDL_events.h +++ b/Windows/SDL2/include/SDL_events.h @@ -85,6 +85,9 @@ typedef enum Called on Android in onResume() */ + /* Display events */ + SDL_DISPLAYEVENT = 0x150, /**< Display state change */ + /* Window events */ SDL_WINDOWEVENT = 0x200, /**< Window state change */ SDL_SYSWMEVENT, /**< System specific event */ @@ -144,6 +147,9 @@ typedef enum SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ + /* Sensor events */ + SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */ + /* Render events */ SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ @@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ } SDL_CommonEvent; +/** + * \brief Display state change event data (event.display.*) + */ +typedef struct SDL_DisplayEvent +{ + Uint32 type; /**< ::SDL_DISPLAYEVENT */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Uint32 display; /**< The associated display index */ + Uint8 event; /**< ::SDL_DisplayEventID */ + Uint8 padding1; + Uint8 padding2; + Uint8 padding3; + Sint32 data1; /**< event dependent data */ +} SDL_DisplayEvent; + /** * \brief Window state change event data (event.window.*) */ @@ -471,6 +492,17 @@ typedef struct SDL_DropEvent } SDL_DropEvent; +/** + * \brief Sensor event structure (event.sensor.*) + */ +typedef struct SDL_SensorEvent +{ + Uint32 type; /**< ::SDL_SENSORUPDATE */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Sint32 which; /**< The instance ID of the sensor */ + float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */ +} SDL_SensorEvent; + /** * \brief The "quit requested" event */ @@ -526,6 +558,7 @@ typedef union SDL_Event { Uint32 type; /**< Event type, shared with all events */ SDL_CommonEvent common; /**< Common event data */ + SDL_DisplayEvent display; /**< Window event data */ SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ @@ -542,6 +575,7 @@ typedef union SDL_Event 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 */ diff --git a/Windows/SDL2/include/SDL_gamecontroller.h b/Windows/SDL2/include/SDL_gamecontroller.h index 2e024be6..fb8a7a52 100644 --- a/Windows/SDL2/include/SDL_gamecontroller.h +++ b/Windows/SDL2/include/SDL_gamecontroller.h @@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index); */ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); +/** + * Get the mapping of a game controller. + * This can be called before any controllers are opened. + * + * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available + */ +extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index); + /** * Open a game controller for use. * The index passed as an argument refers to the N'th game controller on the system. @@ -345,6 +353,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); +/** + * Trigger 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 + * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF + * \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 + */ +extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + /** * Close a controller previously opened with SDL_GameControllerOpen(). */ diff --git a/Windows/SDL2/include/SDL_haptic.h b/Windows/SDL2/include/SDL_haptic.h index e3a2bca5..cfb91c53 100644 --- a/Windows/SDL2/include/SDL_haptic.h +++ b/Windows/SDL2/include/SDL_haptic.h @@ -656,8 +656,8 @@ typedef struct SDL_HapticRamp * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. * * The Left/Right effect is used to explicitly control the large and small - * motors, commonly found in modern game controllers. One motor is high - * frequency, the other is low frequency. + * motors, commonly found in modern game controllers. The small (right) motor + * is high frequency, and the large (left) motor is low frequency. * * \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HapticEffect @@ -668,7 +668,7 @@ typedef struct SDL_HapticLeftRight Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ /* Replay */ - Uint32 length; /**< Duration of the effect. */ + Uint32 length; /**< Duration of the effect in milliseconds. */ /* Rumble */ Uint16 large_magnitude; /**< Control of the large controller motor. */ diff --git a/Windows/SDL2/include/SDL_hints.h b/Windows/SDL2/include/SDL_hints.h index 3834640f..07a91133 100644 --- a/Windows/SDL2/include/SDL_hints.h +++ b/Windows/SDL2/include/SDL_hints.h @@ -465,6 +465,88 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" +/** + * \brief A variable controlling whether the HIDAPI joystick drivers should be used. + * + * This variable can be set to the following values: + * "0" - HIDAPI drivers are not used + * "1" - HIDAPI drivers are used (the default) + * + * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below. + */ +#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" + +/** + * \brief A variable controlling whether the HIDAPI driver for PS4 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_PS4 "SDL_JOYSTICK_HIDAPI_PS4" + +/** + * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. + * + * This variable can be set to the following values: + * "0" - extended reports are not enabled (the default) + * "1" - extended reports + * + * Extended input reports allow rumble on Bluetooth PS4 controllers, but + * break DirectInput handling for applications that don't use SDL. + * + * Once extended reports are enabled, they can not be disabled without + * power cycling the controller. + */ +#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" + +/** + * \brief A variable controlling whether the HIDAPI driver for Steam 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_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" + +/** + * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch 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_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" + +/** + * \brief A variable controlling whether the HIDAPI driver for XBox 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_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" + +/** + * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs + * + * The variable can be set to the following values: + * "0" - Do not scan for Steam Controllers + * "1" - Scan for Steam Controllers (the default) + * + * The default value is "1". This hint must be set before initializing the joystick subsystem. + */ +#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" + + /** * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. * This is a debugging aid for developers and not expected to be used by end users. The default is "1" @@ -752,6 +834,23 @@ extern "C" { */ #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" + /** + * \brief A variable to control whether we trap the Android back button to handle it manually. + * This is necessary for the right mouse button to work on some Android devices, or + * to be able to trap the back button for use in your code reliably. If set to true, + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * SDL_SCANCODE_AC_BACK. + * + * The variable can be set to the following values: + * "0" - Back button will be handled as usual for system. (default) + * "1" - Back button will be trapped, allowing you to handle the key press + * manually. (This will also let right mouse click work on systems + * where the right mouse button functions as back.) + * + * The value of this hint is used at runtime, so it can be changed at any time. + */ +#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" + /** * \brief A variable to control whether the return key on the soft keyboard * should hide the soft keyboard on Android and iOS. diff --git a/Windows/SDL2/include/SDL_joystick.h b/Windows/SDL2/include/SDL_joystick.h index f67772d7..8303c5e8 100644 --- a/Windows/SDL2/include/SDL_joystick.h +++ b/Windows/SDL2/include/SDL_joystick.h @@ -97,10 +97,10 @@ typedef enum typedef enum { SDL_JOYSTICK_POWER_UNKNOWN = -1, - SDL_JOYSTICK_POWER_EMPTY, - SDL_JOYSTICK_POWER_LOW, - SDL_JOYSTICK_POWER_MEDIUM, - SDL_JOYSTICK_POWER_FULL, + SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */ + SDL_JOYSTICK_POWER_LOW, /* <= 20% */ + SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */ + SDL_JOYSTICK_POWER_FULL, /* <= 100% */ SDL_JOYSTICK_POWER_WIRED, SDL_JOYSTICK_POWER_MAX } SDL_JoystickPowerLevel; @@ -361,6 +361,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, int button); +/** + * Trigger 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 + * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF + * \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 + */ +extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); + /** * Close a joystick previously opened with SDL_JoystickOpen(). */ diff --git a/Windows/SDL2/include/SDL_revision.h b/Windows/SDL2/include/SDL_revision.h index dbe9b97d..519a2439 100644 --- a/Windows/SDL2/include/SDL_revision.h +++ b/Windows/SDL2/include/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-11914:f1084c419f33" -#define SDL_REVISION_NUMBER 11914 +#define SDL_REVISION "hg-12184:02509665751f" +#define SDL_REVISION_NUMBER 12184 diff --git a/Windows/SDL2/include/SDL_sensor.h b/Windows/SDL2/include/SDL_sensor.h new file mode 100644 index 00000000..fa19c41f --- /dev/null +++ b/Windows/SDL2/include/SDL_sensor.h @@ -0,0 +1,251 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2018 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_sensor.h + * + * Include file for SDL sensor event handling + * + */ + +#ifndef _SDL_sensor_h +#define _SDL_sensor_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 + +/** + * \file SDL_sensor.h + * + * In order to use these functions, SDL_Init() must have been called + * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system + * for sensors, and load appropriate drivers. + */ + +struct _SDL_Sensor; +typedef struct _SDL_Sensor SDL_Sensor; + +/** + * This is a unique ID for a sensor for the time it is connected to the system, + * and is never reused for the lifetime of the application. + * + * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. + */ +typedef Sint32 SDL_SensorID; + +/* The different sensors defined by SDL + * + * Additional sensors may be available, using platform dependent semantics. + * + * Hare are the additional Android sensors: + * https://developer.android.com/reference/android/hardware/SensorEvent.html#values + */ +typedef enum +{ + SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */ + SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */ + SDL_SENSOR_ACCEL, /**< Accelerometer */ + SDL_SENSOR_GYRO /**< Gyroscope */ +} SDL_SensorType; + +/** + * 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. + * + * 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: + * -X ... +X : left ... right + * -Y ... +Y : bottom ... top + * -Z ... +Z : farther ... closer + * + * The axis data is not changed when the phone is rotated. + * + * \sa SDL_GetDisplayOrientation() + */ +#define SDL_STANDARD_GRAVITY 9.80665f + +/** + * Gyroscope sensor + * + * The gyroscope returns the current rate of rotation in radians per second. + * The rotation is positive in the counter-clockwise direction. That is, + * an observer looking from a positive location on one of the axes would + * 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 + * + * For phones held in portrait mode, 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. + * + * \sa SDL_GetDisplayOrientation() + */ + +/* Function prototypes */ + +/** + * \brief Count the number of sensors attached to the system right now + */ +extern DECLSPEC int SDLCALL SDL_NumSensors(void); + +/** + * \brief Get the implementation dependent name of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor name, or NULL if device_index is out of range. + */ +extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); + +/** + * \brief Get the type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range. + */ +extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index); + +/** + * \brief Get the platform dependent type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor platform dependent type, or -1 if device_index is out of range. + */ +extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index); + +/** + * \brief Get the instance ID of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor instance ID, or -1 if device_index is out of range. + */ +extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index); + +/** + * \brief Open a sensor for use. + * + * The index passed as an argument refers to the N'th sensor on the system. + * + * \return A sensor identifier, or NULL if an error occurred. + */ +extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); + +/** + * Return the SDL_Sensor associated with an instance id. + */ +extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id); + +/** + * \brief Get the implementation dependent name of a sensor. + * + * \return The sensor name, or NULL if the sensor is NULL. + */ +extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); + +/** + * \brief Get the type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL. + */ +extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); + +/** + * \brief Get the platform dependent type of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor platform dependent type, or -1 if the sensor is NULL. + */ +extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); + +/** + * \brief Get the instance ID of a sensor. + * + * This can be called before any sensors are opened. + * + * \return The sensor instance ID, or -1 if the sensor is NULL. + */ +extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor); + +/** + * Get the current state of an opened sensor. + * + * The number of values and interpretation of the data is sensor dependent. + * + * \param sensor The 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_SensorGetData(SDL_Sensor * sensor, float *data, int num_values); + +/** + * Close a sensor previously opened with SDL_SensorOpen() + */ +extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); + +/** + * Update the current state of the open sensors. + * + * This is called automatically by the event loop if sensor events are enabled. + * + * This needs to be called from the thread that initialized the sensor subsystem. + */ +extern DECLSPEC void SDLCALL SDL_SensorUpdate(void); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_sensor_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Windows/SDL2/include/SDL_stdinc.h b/Windows/SDL2/include/SDL_stdinc.h index 92fcbcc2..e373bc38 100644 --- a/Windows/SDL2/include/SDL_stdinc.h +++ b/Windows/SDL2/include/SDL_stdinc.h @@ -450,6 +450,7 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_ extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); +extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr); extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); @@ -513,6 +514,8 @@ extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); extern DECLSPEC double SDLCALL SDL_cos(double x); extern DECLSPEC float SDLCALL SDL_cosf(float x); +extern DECLSPEC double SDLCALL SDL_exp(double x); +extern DECLSPEC float SDLCALL SDL_expf(float x); extern DECLSPEC double SDLCALL SDL_fabs(double x); extern DECLSPEC float SDLCALL SDL_fabsf(float x); extern DECLSPEC double SDLCALL SDL_floor(double x); diff --git a/Windows/SDL2/include/SDL_system.h b/Windows/SDL2/include/SDL_system.h index 7b776fdf..4dc372d6 100644 --- a/Windows/SDL2/include/SDL_system.h +++ b/Windows/SDL2/include/SDL_system.h @@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a #endif /* __WIN32__ */ +/* Platform specific functions for Linux */ +#ifdef __LINUX__ + +/** + \brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available. + + \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority); + +#endif /* __LINUX__ */ + /* Platform specific functions for iOS */ #if defined(__IPHONEOS__) && __IPHONEOS__ @@ -113,6 +125,21 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); */ extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); +/** + \brief Return true if the application is running on a Chromebook + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); + +/** + \brief Return true is the application is running on a Samsung DeX docking station + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void); + +/** + \brief Trigger the Android system back button behavior. + */ +extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void); + /** See the official Android developer guide for more information: http://developer.android.com/guide/topics/data/data-storage.html @@ -236,6 +263,11 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); #endif /* __WINRT__ */ +/** + \brief Return true if the current device is a tablet. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Windows/SDL2/include/SDL_thread.h b/Windows/SDL2/include/SDL_thread.h index 82a43fc0..5d01d5a5 100644 --- a/Windows/SDL2/include/SDL_thread.h +++ b/Windows/SDL2/include/SDL_thread.h @@ -54,12 +54,13 @@ typedef unsigned int SDL_TLSID; /** * The SDL thread priority. * - * \note On many systems you require special privileges to set high priority. + * \note On many systems you require special privileges to set high or time critical priority. */ typedef enum { SDL_THREAD_PRIORITY_LOW, SDL_THREAD_PRIORITY_NORMAL, - SDL_THREAD_PRIORITY_HIGH + SDL_THREAD_PRIORITY_HIGH, + SDL_THREAD_PRIORITY_TIME_CRITICAL } SDL_ThreadPriority; /** diff --git a/Windows/SDL2/include/SDL_video.h b/Windows/SDL2/include/SDL_video.h index 83f49faa..461f1380 100644 --- a/Windows/SDL2/include/SDL_video.h +++ b/Windows/SDL2/include/SDL_video.h @@ -169,6 +169,24 @@ typedef enum SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */ } SDL_WindowEventID; +/** + * \brief Event subtype for display events + */ +typedef enum +{ + SDL_DISPLAYEVENT_NONE, /**< Never used */ + SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ +} SDL_DisplayEventID; + +typedef enum +{ + SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */ + SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */ + SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */ + SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */ + SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */ +} SDL_DisplayOrientation; + /** * \brief An opaque handle to an OpenGL context. */ @@ -316,18 +334,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); */ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); -/** - * \brief Get the dots/pixels-per-inch for a display - * - * \note Diagonal, horizontal and vertical DPI can all be optionally - * returned if the parameter is non-NULL. - * - * \return 0 on success, or -1 if no DPI information is available or the index is out of range. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); - /** * \brief Get the usable desktop area represented by a display, with the * primary display located at 0,0 @@ -347,6 +353,27 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl */ extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect); +/** + * \brief Get the dots/pixels-per-inch for a display + * + * \note Diagonal, horizontal and vertical DPI can all be optionally + * returned if the parameter is non-NULL. + * + * \return 0 on success, or -1 if no DPI information is available or the index is out of range. + * + * \sa SDL_GetNumVideoDisplays() + */ +extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); + +/** + * \brief Get the orientation of a display + * + * \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available. + * + * \sa SDL_GetNumVideoDisplays() + */ +extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex); + /** * \brief Returns the number of available display modes. * diff --git a/Windows/SDL2/include/SDL_vulkan.h b/Windows/SDL2/include/SDL_vulkan.h index f04c21ad..51373b18 100644 --- a/Windows/SDL2/include/SDL_vulkan.h +++ b/Windows/SDL2/include/SDL_vulkan.h @@ -135,7 +135,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * \brief Get the names of the Vulkan instance extensions needed to create * a surface with \c SDL_Vulkan_CreateSurface(). * - * \param [in] window Window for which the required Vulkan instance + * \param [in] \c NULL or window Window for which the required Vulkan instance * extensions should be retrieved * \param [in,out] count pointer to an \c unsigned related to the number of * required Vulkan instance extensions @@ -153,6 +153,10 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * is smaller than the number of required extensions, \c SDL_FALSE will be * returned instead of \c SDL_TRUE, to indicate that not all the required * extensions were returned. + * + * \note If \c window is not NULL, it will be checked against its creation + * flags to ensure that the Vulkan flag is present. This parameter + * will be removed in a future major release. * * \note The returned list of extensions will contain \c VK_KHR_surface * and zero or more platform specific extensions @@ -160,12 +164,13 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * \note The extension names queried here must be enabled when calling * VkCreateInstance, otherwise surface creation will fail. * - * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag. + * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag + * or be \c NULL * * \code * unsigned int count; * // get count of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL)) + * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL)) * handle_error(); * * static const char *const additionalExtensions[] = @@ -179,7 +184,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * handle_error(); * * // get names of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names)) + * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names)) * handle_error(); * * // copy additional extensions after required extensions diff --git a/Windows/SDL2/lib/SDL2.dll b/Windows/SDL2/lib/SDL2.dll index 29ef1ae3..a1890615 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 6e823506..f725dcf5 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 a418c818..b35d5b68 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 d64bf470..ff669d97 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 bd84d1f4..bb221ebd 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 d8b87456..996e85ba 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 0a195704..0d253916 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 a0e99e1d..9548e3fc 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 6a73420c..27e41820 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 7b15c843..d4848844 100644 Binary files a/Windows/SDL2/lib64/libSDL2main.a and b/Windows/SDL2/lib64/libSDL2main.a differ diff --git a/Windows/SDL2/watcom/SDL2.def b/Windows/SDL2/watcom/SDL2.def index 7b5c54df..917cce30 100644 --- a/Windows/SDL2/watcom/SDL2.def +++ b/Windows/SDL2/watcom/SDL2.def @@ -129,12 +129,14 @@ SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForButton SDL_GameControllerGetVendor SDL_GameControllerMapping +SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForGUID SDL_GameControllerMappingForIndex SDL_GameControllerName SDL_GameControllerNameForIndex SDL_GameControllerNumMappings SDL_GameControllerOpen +SDL_GameControllerRumble SDL_GameControllerUpdate SDL_GetAssertionHandler SDL_GetAssertionReport @@ -160,6 +162,7 @@ SDL_GetDisplayBounds SDL_GetDisplayDPI SDL_GetDisplayMode SDL_GetDisplayName +SDL_GetDisplayOrientation SDL_GetDisplayUsableBounds SDL_GetError SDL_GetEventFilter @@ -274,6 +277,7 @@ SDL_HapticUpdateEffect SDL_Has3DNow SDL_HasAVX SDL_HasAVX2 +SDL_HasAVX512F SDL_HasAltiVec SDL_HasClipboardText SDL_HasEvent @@ -297,6 +301,7 @@ SDL_IsGameController SDL_IsScreenKeyboardShown SDL_IsScreenSaverEnabled SDL_IsShapedWindow +SDL_IsTablet SDL_IsTextInputActive SDL_JoystickClose SDL_JoystickCurrentPowerLevel @@ -330,6 +335,7 @@ SDL_JoystickNumBalls SDL_JoystickNumButtons SDL_JoystickNumHats SDL_JoystickOpen +SDL_JoystickRumble SDL_JoystickUpdate SDL_LoadBMP_RW SDL_LoadDollarTemplates @@ -373,6 +379,7 @@ SDL_MouseIsHaptic SDL_NewAudioStream SDL_NumHaptics SDL_NumJoysticks +SDL_NumSensors SDL_OpenAudio SDL_OpenAudioDevice SDL_PauseAudio @@ -441,6 +448,19 @@ SDL_SemTryWait SDL_SemValue SDL_SemWait SDL_SemWaitTimeout +SDL_SensorClose +SDL_SensorFromInstanceID +SDL_SensorGetData +SDL_SensorGetDeviceInstanceID +SDL_SensorGetDeviceName +SDL_SensorGetDeviceNonPortableType +SDL_SensorGetDeviceType +SDL_SensorGetInstanceID +SDL_SensorGetName +SDL_SensorGetNonPortableType +SDL_SensorGetType +SDL_SensorOpen +SDL_SensorUpdate SDL_SetAssertionHandler SDL_SetClipRect SDL_SetClipboardText @@ -556,6 +576,8 @@ SDL_copysign SDL_copysignf SDL_cos SDL_cosf +SDL_exp +SDL_expf SDL_fabs SDL_fabsf SDL_floor @@ -626,6 +648,7 @@ SDL_utf8strlen SDL_vsnprintf SDL_vsscanf SDL_wcscmp +SDL_wcsdup SDL_wcslcat SDL_wcslcpy SDL_wcslen diff --git a/Windows/SDL2/watcom/SDL2.exp b/Windows/SDL2/watcom/SDL2.exp index 18e7a69a..16818a12 100644 --- a/Windows/SDL2/watcom/SDL2.exp +++ b/Windows/SDL2/watcom/SDL2.exp @@ -126,12 +126,14 @@ ++'_SDL_GameControllerGetStringForButton'.'SDL2.DLL'..'SDL_GameControllerGetStringForButton' ++'_SDL_GameControllerGetVendor'.'SDL2.DLL'..'SDL_GameControllerGetVendor' ++'_SDL_GameControllerMapping'.'SDL2.DLL'..'SDL_GameControllerMapping' +++'_SDL_GameControllerMappingForDeviceIndex'.'SDL2.DLL'..'SDL_GameControllerMappingForDeviceIndex' ++'_SDL_GameControllerMappingForGUID'.'SDL2.DLL'..'SDL_GameControllerMappingForGUID' ++'_SDL_GameControllerMappingForIndex'.'SDL2.DLL'..'SDL_GameControllerMappingForIndex' ++'_SDL_GameControllerName'.'SDL2.DLL'..'SDL_GameControllerName' ++'_SDL_GameControllerNameForIndex'.'SDL2.DLL'..'SDL_GameControllerNameForIndex' ++'_SDL_GameControllerNumMappings'.'SDL2.DLL'..'SDL_GameControllerNumMappings' ++'_SDL_GameControllerOpen'.'SDL2.DLL'..'SDL_GameControllerOpen' +++'_SDL_GameControllerRumble'.'SDL2.DLL'..'SDL_GameControllerRumble' ++'_SDL_GameControllerUpdate'.'SDL2.DLL'..'SDL_GameControllerUpdate' ++'_SDL_GetAssertionHandler'.'SDL2.DLL'..'SDL_GetAssertionHandler' ++'_SDL_GetAssertionReport'.'SDL2.DLL'..'SDL_GetAssertionReport' @@ -157,6 +159,7 @@ ++'_SDL_GetDisplayDPI'.'SDL2.DLL'..'SDL_GetDisplayDPI' ++'_SDL_GetDisplayMode'.'SDL2.DLL'..'SDL_GetDisplayMode' ++'_SDL_GetDisplayName'.'SDL2.DLL'..'SDL_GetDisplayName' +++'_SDL_GetDisplayOrientation'.'SDL2.DLL'..'SDL_GetDisplayOrientation' ++'_SDL_GetDisplayUsableBounds'.'SDL2.DLL'..'SDL_GetDisplayUsableBounds' ++'_SDL_GetError'.'SDL2.DLL'..'SDL_GetError' ++'_SDL_GetEventFilter'.'SDL2.DLL'..'SDL_GetEventFilter' @@ -271,6 +274,7 @@ ++'_SDL_Has3DNow'.'SDL2.DLL'..'SDL_Has3DNow' ++'_SDL_HasAVX'.'SDL2.DLL'..'SDL_HasAVX' ++'_SDL_HasAVX2'.'SDL2.DLL'..'SDL_HasAVX2' +++'_SDL_HasAVX512F'.'SDL2.DLL'..'SDL_HasAVX512F' ++'_SDL_HasAltiVec'.'SDL2.DLL'..'SDL_HasAltiVec' ++'_SDL_HasClipboardText'.'SDL2.DLL'..'SDL_HasClipboardText' ++'_SDL_HasEvent'.'SDL2.DLL'..'SDL_HasEvent' @@ -294,6 +298,7 @@ ++'_SDL_IsScreenKeyboardShown'.'SDL2.DLL'..'SDL_IsScreenKeyboardShown' ++'_SDL_IsScreenSaverEnabled'.'SDL2.DLL'..'SDL_IsScreenSaverEnabled' ++'_SDL_IsShapedWindow'.'SDL2.DLL'..'SDL_IsShapedWindow' +++'_SDL_IsTablet'.'SDL2.DLL'..'SDL_IsTablet' ++'_SDL_IsTextInputActive'.'SDL2.DLL'..'SDL_IsTextInputActive' ++'_SDL_JoystickClose'.'SDL2.DLL'..'SDL_JoystickClose' ++'_SDL_JoystickCurrentPowerLevel'.'SDL2.DLL'..'SDL_JoystickCurrentPowerLevel' @@ -327,6 +332,7 @@ ++'_SDL_JoystickNumButtons'.'SDL2.DLL'..'SDL_JoystickNumButtons' ++'_SDL_JoystickNumHats'.'SDL2.DLL'..'SDL_JoystickNumHats' ++'_SDL_JoystickOpen'.'SDL2.DLL'..'SDL_JoystickOpen' +++'_SDL_JoystickRumble'.'SDL2.DLL'..'SDL_JoystickRumble' ++'_SDL_JoystickUpdate'.'SDL2.DLL'..'SDL_JoystickUpdate' ++'_SDL_LoadBMP_RW'.'SDL2.DLL'..'SDL_LoadBMP_RW' ++'_SDL_LoadDollarTemplates'.'SDL2.DLL'..'SDL_LoadDollarTemplates' @@ -370,6 +376,7 @@ ++'_SDL_NewAudioStream'.'SDL2.DLL'..'SDL_NewAudioStream' ++'_SDL_NumHaptics'.'SDL2.DLL'..'SDL_NumHaptics' ++'_SDL_NumJoysticks'.'SDL2.DLL'..'SDL_NumJoysticks' +++'_SDL_NumSensors'.'SDL2.DLL'..'SDL_NumSensors' ++'_SDL_OpenAudio'.'SDL2.DLL'..'SDL_OpenAudio' ++'_SDL_OpenAudioDevice'.'SDL2.DLL'..'SDL_OpenAudioDevice' ++'_SDL_PauseAudio'.'SDL2.DLL'..'SDL_PauseAudio' @@ -438,6 +445,19 @@ ++'_SDL_SemValue'.'SDL2.DLL'..'SDL_SemValue' ++'_SDL_SemWait'.'SDL2.DLL'..'SDL_SemWait' ++'_SDL_SemWaitTimeout'.'SDL2.DLL'..'SDL_SemWaitTimeout' +++'_SDL_SensorClose'.'SDL2.DLL'..'SDL_SensorClose' +++'_SDL_SensorFromInstanceID'.'SDL2.DLL'..'SDL_SensorFromInstanceID' +++'_SDL_SensorGetData'.'SDL2.DLL'..'SDL_SensorGetData' +++'_SDL_SensorGetDeviceInstanceID'.'SDL2.DLL'..'SDL_SensorGetDeviceInstanceID' +++'_SDL_SensorGetDeviceName'.'SDL2.DLL'..'SDL_SensorGetDeviceName' +++'_SDL_SensorGetDeviceNonPortableType'.'SDL2.DLL'..'SDL_SensorGetDeviceNonPortableType' +++'_SDL_SensorGetDeviceType'.'SDL2.DLL'..'SDL_SensorGetDeviceType' +++'_SDL_SensorGetInstanceID'.'SDL2.DLL'..'SDL_SensorGetInstanceID' +++'_SDL_SensorGetName'.'SDL2.DLL'..'SDL_SensorGetName' +++'_SDL_SensorGetNonPortableType'.'SDL2.DLL'..'SDL_SensorGetNonPortableType' +++'_SDL_SensorGetType'.'SDL2.DLL'..'SDL_SensorGetType' +++'_SDL_SensorOpen'.'SDL2.DLL'..'SDL_SensorOpen' +++'_SDL_SensorUpdate'.'SDL2.DLL'..'SDL_SensorUpdate' ++'_SDL_SetAssertionHandler'.'SDL2.DLL'..'SDL_SetAssertionHandler' ++'_SDL_SetClipRect'.'SDL2.DLL'..'SDL_SetClipRect' ++'_SDL_SetClipboardText'.'SDL2.DLL'..'SDL_SetClipboardText' @@ -553,6 +573,8 @@ ++'_SDL_copysignf'.'SDL2.DLL'..'SDL_copysignf' ++'_SDL_cos'.'SDL2.DLL'..'SDL_cos' ++'_SDL_cosf'.'SDL2.DLL'..'SDL_cosf' +++'_SDL_exp'.'SDL2.DLL'..'SDL_exp' +++'_SDL_expf'.'SDL2.DLL'..'SDL_expf' ++'_SDL_fabs'.'SDL2.DLL'..'SDL_fabs' ++'_SDL_fabsf'.'SDL2.DLL'..'SDL_fabsf' ++'_SDL_floor'.'SDL2.DLL'..'SDL_floor' @@ -623,6 +645,7 @@ ++'_SDL_vsnprintf'.'SDL2.DLL'..'SDL_vsnprintf' ++'_SDL_vsscanf'.'SDL2.DLL'..'SDL_vsscanf' ++'_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' diff --git a/Windows/SDL2/watcom/SDL2.lib b/Windows/SDL2/watcom/SDL2.lib index e2d99d8e..17b0c6bc 100644 Binary files a/Windows/SDL2/watcom/SDL2.lib and b/Windows/SDL2/watcom/SDL2.lib differ