Commit Graph

139 Commits (4e60fc9b2b189cad83dc3d5f75ced9c55fbfc411)

Author SHA1 Message Date
Ozkan Sezer 0b8309da0c renamed SDL PI constants to SDL_PI_D and SDL_PI_F. 2022-11-25 22:35:24 +03:00
Sam Lantinga 05139f4a2e Removed SDL_RWFromFP from the public API
This will blow up if the SDL library and the application have a different C runtime, which can easily happen on Windows.
2022-11-25 10:46:26 -08:00
Sam Lantinga 670f1df469 Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead 2022-11-25 10:33:37 -08:00
Sam Lantinga b0840eb32e Updated SDL_syswm.h for SDL 3.0
* The header is no longer dependent on SDL build configuration
* The structures are versioned separately from the rest of SDL
* SDL_GetWindowWMInfo() now returns a standard result code and is passed the version expected by the application
* Updated WhatsNew.txt and docs/README-migration.md with the first API changes in SDL 3.0
2022-11-23 14:05:59 -08:00
Sam Lantinga 1f87e9e24e Updated patch notes for 2.26 release 2022-11-17 09:00:27 -08:00
Sam Lantinga 0bc852ce53 Revert "Disable the RAWINPUT joystick driver by default"
Disabling RAWINPUT on Windows 10 causes these issues:
* All Xbox controllers are named "XInput Controller".
* Trigger rumble no longer works.
* "XInput Controllers" are now also listed as separate haptic devices
2022-10-17 17:43:06 -07:00
Sam Lantinga 47ba997f06 Disable the RAWINPUT joystick driver by default
It's only needed to support more than 4 Xbox controllers, and adds significant complexity to the joystick processing, and we regularly get bugs from people who aren't using an SDL window who need to turn on SDL_HINT_JOYSTICK_THREAD.
2022-10-17 07:39:52 -07:00
Sam Lantinga c887cb02af Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
Also fixed the Y axes on the Wii U Pro controller, and various formatting cleanup
2022-09-01 16:30:55 -07:00
Sam Lantinga 3cbfd75d0f Re-added the CRC to the joystick guid
This is now used as a crc field in the mapping rather than directly in mapping guids, for better mapping compatibility between versions of SDL.

Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID, so that mapping programs can clear the CRC from the GUID when generating mappings.

sort_controllers.py has been updated to extract the CRC from mappings created by older mapping programs and convert it into the new crc field. It will also take the CRC into account when checking for duplicate mappings.

Also regenerated the GUIDs for the PS2/PSP/Vita controller mappings, fixing https://github.com/libsdl-org/SDL/issues/6151
2022-08-27 19:00:31 -07:00
Sam Lantinga cf134235d7 Removed line wrapping in patch notes 2022-08-13 08:23:40 -07:00
Sam Lantinga f1416ef2ba Updated to version 2.23.2 for release candidate 2022-08-12 20:27:22 -07:00
Sam Lantinga 3861c557da Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION
This hint controls whether mouse warping generates motion events in relative mode, and defaults off.

Fixes https://github.com/libsdl-org/SDL/issues/6034
Fixes https://github.com/libsdl-org/SDL/issues/5741
2022-08-11 14:02:03 -07:00
Sam Lantinga b4c4dd84c2 Added SDL_crc16() to be used in joystick GUIDs after 2.24.0 2022-08-11 09:53:25 -07:00
Sam Lantinga d4192850c1 Added SDL_ResetHint() to reset a hint to the default value
Resolves question of how to clear an override hint raised by @pionere in https://github.com/libsdl-org/SDL/pull/5309
2022-08-10 08:01:24 -07:00
Sam Lantinga bcdef4aaf9 Added separate hints for Nintendo Online classic controllers and Joy-Cons
This allows them to be enabled/disabled separately from Switch Pro HIDAPI support
2022-08-03 13:07:47 -07:00
Sam Lantinga 2fa2f9ff77 Greatly improved Nintendo Joy-Con support using the HIDAPI driver
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:22:27 -07:00
Ryan C. Gordon 31d38f2f30
WhatsNew.txt: Note that minimum macOS version is now 10.9. 2022-07-26 15:14:37 -04:00
Ozkan Sezer 8cd515c324 better wording. 2022-07-22 20:37:28 +03:00
Ozkan Sezer 192ae1e356 WhatsNew.txt: added line for the calling convention fixes. 2022-07-21 17:11:30 +03:00
Ethan Lee a33b5449ff
WhatsNew.txt: Added audio channel support changes 2022-07-20 19:11:42 -04:00
Cameron Gutman d21a18c65f WhatsNew.txt: Add line for Shield HIDAPI driver 2022-07-17 01:06:16 -05:00
Ethan Lee cdf9010a19
Added new audio features to WhatsNew.txt 2022-07-16 12:39:30 -04:00
Sam Lantinga cbd0187475 Removed the limit on the size of the SDL error message
Also added SDL_GetOriginalMemoryFunctions()

Fixes https://github.com/libsdl-org/SDL/issues/5795
2022-06-27 16:59:50 -07:00
Sam Lantinga 269fc1bd79 Added more details to WhatsNew.txt 2022-06-16 12:34:35 -07:00
Simon McVittie cd7c2f1de7 Switch versioning scheme to be the same as GLib and Flatpak
For stable releases, this gives us the ability to make bugfix-only point
releases such as 2.24.1 if we want to, and distinguish between them
programmatically. For example, this ability could have been useful after
2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop
regressions.

For development releases, this gives us the ability to make multiple
prereleases during the same feature cycle, and distinguish between them
programmatically. For example, this would have been useful during 2.0.22
development, which went through three prereleases before reaching the
final release.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 09:55:35 -07:00
Sam Lantinga e551384a99 Added functions to get the platform dependent name for a joystick or game controller 2022-04-26 14:54:14 -07:00
Eddy Jansson 8c1584e8e8 WhatsNew: Start block for 2.0.24 2022-04-26 09:21:40 -07:00
Eddy Jansson 5d4a1f8356 WhatsNew.txt: Add SDL_FRectEqualsEpsilon() 2022-04-20 08:38:53 -07:00
Simon McVittie c36bd78474 WhatsNew.txt: Document new dependency on libwayland-client 1.18.0
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-13 10:14:29 -04:00
Ethan Lee 46616af722
WhatsNew.txt: Added SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR 2022-04-12 11:53:40 -04:00
Sam Lantinga a256e6ba7f Updated the patch notes with API changes for 2.0.22 2022-04-08 18:10:56 -07:00
Sam Lantinga 18032979d8 Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
This hint defaults off, but when it is enabled the mice will have a game controller mapping set up for Profile 3 (set in the Armoury Crate software)
2022-02-15 13:07:51 -08:00
Sam Lantinga 9f1e609aa0 Document SDL_HINT_RENDER_LINE_METHOD in the release notes 2022-01-08 12:42:36 -08:00
Sam Lantinga 9294634840 Updated to version 2.0.20 for release 2022-01-07 18:29:40 -08:00
Cameron Gutman b7a0200aab Update 2.0.18 release notes with CMake prefix change 2021-12-03 09:35:47 -08:00
Sam Lantinga 2e9821423a Aded a patch note for relative mouse mode over RDP 2021-11-29 20:20:07 -08:00
Sam Lantinga aa1d76e829 Added a patch note about WinRT/UWP WGI support 2021-11-27 10:55:54 -08:00
Sam Lantinga b6c1cfb93a Added API changes in 2.0.18 2021-11-26 09:37:27 -08:00
Sam Lantinga c97b721868 Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels 2021-11-21 12:18:10 -08:00
Sam Lantinga 66058bbbd5 Fixed exception accessing Bluetooth devices on Android 12
Since accessing Bluetooth prompts the user for permission on both Android and iOS, and we only need it for Steam Controller support, we'll leave it off by default. You can enable it by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()

Fixes https://github.com/libsdl-org/SDL/issues/4952
2021-11-15 16:52:56 -08:00
Sam Lantinga 1c78b08007 Added support for /dev/input/js* on Linux
Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices

Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices t
hat will be opened in addition to the normal joystick detection

Fixes https://github.com/libsdl-org/SDL/issues/1314
Fixes https://github.com/libsdl-org/SDL/issues/1727
Fixes https://github.com/libsdl-org/SDL/issues/1981
Closes https://github.com/libsdl-org/SDL/pull/4727
2021-11-10 20:02:25 -08:00
Sam Lantinga dca5ce4ea3 Clarified that AAudio is only used on Android 8.1 and newer 2021-11-10 10:15:47 -08:00
Sam Lantinga 19c129faba Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true
in your application's Info.plist in order to get real Bluetooth mouse events.
2021-11-09 20:32:16 -08:00
Sam Lantinga 6810399352 Enable AAUDIO driver for Android
I thought this was already enabled for 2.0.16, but apparently not.

Fixes https://github.com/libsdl-org/SDL/issues/3710
2021-08-10 14:50:43 -07:00
Cameron Gutman f5bc58bf57 Add note about keyboard grab to WhatsNew.txt for 2.0.16 2021-08-04 09:03:28 -07:00
Sam Lantinga d784dd20b6 Updated WhatsNew with major changes for 2.0.16 2021-07-31 17:53:07 -07:00
Sam Lantinga d3d2aee7f4 Fixed the name of the PS5 hint 2020-12-09 10:39:36 -08:00
Sam Lantinga a2098a47b6 Updated SDL to 2.0.14 in preparation for release candidate 2020-12-08 18:56:06 -08:00
Sam Lantinga f00ddd0a38 Updated WhatsNew.txt with SDL 2.0.12 release notes 2020-03-02 11:39:44 -08:00
Sylvain Becker 1ae61f1009 Added a helper function SDL_LockTextureToSurface()
Similar to SDL_LockTexture(), except the locked area is exposed as a SDL surface.
2019-09-30 20:58:44 +02:00
Sam Lantinga 972bdfb47f Made it more explicit that 2.0.10 and newer are required for the SDL_RW* functions 2019-07-01 09:05:15 -07:00
Sam Lantinga 60606dfb31 Documented that the SDL_RW* macros no longer exist, and you can't use an older SDL library if you build with SDL 2.0.10. 2019-07-01 09:02:04 -07:00
Sam Lantinga 63506ae195 Added a patch note about batched rendering 2019-06-18 08:35:31 -07:00
Sam Lantinga e89789bb4b Added patch notes for 2.0.10 2019-06-18 07:55:30 -07:00
Sylvain Becker 05333a6e9f Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE
to set whether the event loop will block itself when the app is paused.
2019-04-05 09:16:30 +02:00
Sylvain Becker b470cd9b09 Android: default SDL_HINT_MOUSE_TOUCH_EVENTS to 1 as previous behaviour 2019-04-05 08:36:31 +02:00
Sylvain Becker 6f732d4ee8 Update WhatsNew.txt 2019-04-04 20:24:22 +02:00
Sylvain Becker 458c60e6a4 Update WhatsNew.txt 2019-04-04 20:10:55 +02:00
Sam Lantinga 91da4963d3 Added patch note for SDL_GameControllerGetPlayerIndex() and friends 2018-10-26 09:49:27 -07:00
Sam Lantinga 88f9f0307d Added patch notes for SDL 2.0.9 2018-09-27 23:54:40 -07:00
Sam Lantinga a8ac588549 Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened 2018-03-07 13:30:40 -08:00
Sam Lantinga e9fc66a038 Added patch note for Android Studio support 2018-03-01 08:26:10 -08:00
Sam Lantinga eac3766698 Added a patch note for OpenGL ES support on Mac 2018-03-01 08:08:20 -08:00
Sam Lantinga 99683f7c04 Added patch note about the Vulkan Mac SDK 2018-02-26 08:39:25 -08:00
Sam Lantinga cbfee82dff Moved Android patch note into the Android section 2018-02-24 09:09:20 -08:00
Sam Lantinga 8e4afb556a Added patch note for Ryan's work 2018-02-24 08:42:04 -08:00
Sam Lantinga 5adc1b7d3e Updated documentation with API changes in SDL 2.0.8 2018-02-24 08:18:09 -08:00
Sam Lantinga baae74c857 Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on (thanks Daniel Knobe!) 2017-12-10 09:10:02 -08:00
Sam Lantinga 2c5724ef5d Updated version to 2.0.8 since SDL_image depends on it 2017-11-04 21:58:48 -07:00
Sam Lantinga 7a6cf53aea Added SDL_AudioStreamFlush() to the list of new audio stream functions 2017-10-20 10:45:38 -07:00
Sam Lantinga 80f8464d97 Added audio stream conversion functions:
SDL_NewAudioStream
    SDL_AudioStreamPut
    SDL_AudioStreamGet
    SDL_AudioStreamAvailable
    SDL_AudioStreamClear
    SDL_FreeAudioStream
2017-10-18 15:54:05 -07:00
Sam Lantinga 9c580e14c9 Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga 0e495e83dd Updated WhatsNew.txt for 2.0.7 changes 2017-10-10 20:16:52 -07:00
Sam Lantinga c08a7a74a5 Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category,
determining whether the phone mute switch affects the audio
2017-09-15 17:27:32 -07:00
Sam Lantinga 3261ca754f Fixed typos in 2.0.6 patch notes 2017-09-04 23:10:12 -07:00
Sam Lantinga 657ad72ac4 Added some more big 2.0.6 changes 2017-09-04 21:16:28 -07:00
Sam Lantinga d75fea89d2 Updated WhatsNew.txt for 2.0.6 2017-09-04 20:48:01 -07:00
Sam Lantinga 4c9f31398f Added note for David Carlier's work on OpenBSD 2016-10-12 18:57:12 -07:00
Sam Lantinga 3b3dd9af5a Updated WhatsNew with 2.0.5 changes 2016-10-11 23:56:52 -07:00
Alex Szpakowski 4aae0290ea Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes. 2015-12-31 21:16:43 -04:00
David Ludwig fd9f06a0c2 WinRT: noted Win10/UWP support in WhatsNew.txt (under 2.0.4) 2015-11-30 23:30:01 -05:00
Philipp Wiesemann 2e525193ef Added SDL_HINT_VIDEO_X11_NET_WM_PING to WhatsNew.txt for 2.0.4. 2015-11-25 21:31:02 +01:00
Ryan C. Gordon e6ad29aec8 Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID(). 2015-11-14 12:35:45 -05:00
Philipp Wiesemann ceb43129ac Added SDL_JoystickCurrentPowerLevel() to WhatsNew.txt for 2.0.4. 2015-10-07 21:18:08 +02:00
Alex Szpakowski 2bf6f1bcb7 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Philipp Wiesemann cdfec382c6 Added more entries to WhatsNew.txt for 2.0.4. 2015-09-18 21:27:00 +02:00
Philipp Wiesemann 440d6cc00e Added another entry to WhatsNew.txt for 2.0.4. 2015-09-05 20:20:35 +02:00
Philipp Wiesemann 2d8c49fdbd Added more entries to WhatsNew.txt for 2.0.4. 2015-08-05 21:03:31 +02:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00