Commit Graph

2117 Commits (0f78aa7c30c50c5bcd89115197b87f4bbf96c70b)

Author SHA1 Message Date
Sam Lantinga 0f78aa7c30 Add some high bit-depth pixel formats
These are not fully supported yet, just preparing for future work.
2024-01-25 16:40:46 -08:00
Ryan C. Gordon ecbbef8b8d
blendmode: Corrected docs for `SDL_BLENDOPERATION_[REV_]SUBTRACT`.
They were documented backwards.

Fixes #8910.
2024-01-25 17:48:12 -05:00
Ryan C. Gordon 8814095aa8
main: Indented SDL_main headers for readability, removed SDL2 compat macros.
Specifically, SDL_WinRTRunApp, SDL_UIKitRunApp, and SDL_GDKRunApp macros were
removed, as likely unnecessary to SDL3 users. A note was added to the
migration doc about how to roll replacements. These are not going into
SDL_oldnames.h.

Fixes #8245.
2024-01-25 17:39:38 -05:00
Sam Lantinga 02f59f3ae6 Note that SDL_GetHaptics() is useful in combination with SDL_OpenHaptic() 2024-01-25 08:21:01 -08:00
Ozkan Sezer fd6ec3b9aa SDL_intrin.h: adjust for new SDL_PLATFORM_WINDOWS meaning. 2024-01-24 21:20:50 +03:00
Ozkan Sezer 2654c52d0e macro SDL_PLATFORM_WINDOWS now means Win32 api and Windows-based OS's.
macro SDL_PLATFORM_WIN32 means desktop windows, i.e. anything other than
WinRT or GDK, etc.
2024-01-24 21:20:50 +03:00
Sam Lantinga 8fe257b541 Added support for other HDR color primaries
Specifically, SDL_COLOR_PRIMARIES_XYZ, SDL_COLOR_PRIMARIES_SMPTE431, and SDL_COLOR_PRIMARIES_SMPTE432
2024-01-23 20:35:29 -08:00
Ozkan Sezer c5792cc0de SDL_thread.h: replace uses of __GDK__ and __WINRT__ (missed in #8875.) 2024-01-24 06:28:10 +03:00
Anonymous Maarten 31d133db40
Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
SDL Wiki Bot ceccf24519 Sync SDL3 wiki -> header 2024-01-24 01:20:29 +00:00
Sam Lantinga 7cd914593f Added HDR surface properties and tone mapping from HDR to SDR
This currently only supports PQ, but can be expanded in the future
2024-01-23 17:19:41 -08:00
SDL Wiki Bot 6fb188eb35 Sync SDL3 wiki -> header 2024-01-23 03:24:26 +00:00
Sam Lantinga cd231a65f6 Added SDL_GetJoystickCaps() and SDL_GetGamepadCaps() to get the capabilities of controllers
Also added SDL_GAMEPAD_CAP_PLAYER_LED to let the application know if the controller has a visible player LED
2024-01-22 19:23:42 -08:00
Sam Lantinga a28a42cfc6 Fixed declaration of SDL_HapticRumbleSupported 2024-01-21 11:36:38 -08:00
Sam Lantinga 052b958bf2 Made SDL_HapticEffect const in the API
Also added some additional parameter validation to haptic effect functions
2024-01-21 11:29:40 -08:00
Sam Lantinga 5e70ee29cc Build SDL with the static C runtime on Visual Studio 2024-01-21 06:55:29 -08:00
Sam Lantinga e2f35a16c2 Added <string.h> for declaration of memset() and memcpy() 2024-01-21 06:55:29 -08:00
Sam Lantinga 7a069cc4b0 Allow optimizing memcpy and memset where possible
Modern C runtimes have well optimized memset and memcpy, so use those instead of dispatching into SDL's versions. In addition, some compilers can analyze memset and memcpy calls and directly turn them into optimized assembly.
2024-01-21 06:55:29 -08:00
SDL Wiki Bot 4d6e2d8b73 Sync SDL3 wiki -> header 2024-01-20 14:33:19 +00:00
Sam Lantinga 308906ba25 Added SDL_FlipSurface() to flip a surface vertically or horizontally
Fixes https://github.com/libsdl-org/SDL/issues/8857
2024-01-20 06:31:37 -08:00
Sam Lantinga a31dc6dfcb Switched SDL_TouchID and SDL_FingerID to be Uint64 with 0 being an invalid value 2024-01-18 10:55:24 -08:00
Edoardo Lolletti b384973936 Remove no longer needed hint 2024-01-18 10:19:18 -08:00
Sam Lantinga cda2bffeee Re-add SDL_HAPTIC_SQUARE for SDL 3.0
Fixes https://github.com/libsdl-org/SDL/issues/8753
Closes https://github.com/libsdl-org/SDL/pull/8831
Closes https://github.com/libsdl-org/SDL/pull/8783
2024-01-18 09:24:03 -08:00
Sam Lantinga df4b855af5 Updated SDL_TLSID to use the same type as other IDs in SDL 2024-01-18 08:18:37 -08:00
Sam Lantinga fc0c774976 Renamed SDL_ThreadID() to SDL_GetCurrentThreadID()
Also renamed SDL_threadID to SDL_ThreadID and made it Uint64 for consistency with other ID types
2024-01-18 08:18:37 -08:00
Sam Lantinga d6a41f8f31 Updated SDL_TimerID to use the same type as other IDs in SDL 2024-01-18 07:08:15 -08:00
SDL Wiki Bot bc3a71d400 Sync SDL3 wiki -> header 2024-01-18 15:01:21 +00:00
Sam Lantinga 464f4d19fe Removed obsolete XInput mapping hint 2024-01-18 07:00:21 -08:00
Sam Lantinga f8dfee01bb Made SDL_ReadSurfacePixel a public function
Fixes https://github.com/libsdl-org/SDL/issues/8320
2024-01-18 07:00:10 -08:00
Sam Lantinga c540c77756 Removed SDL_INIT_EVERYTHING
Fixes https://github.com/libsdl-org/SDL/issues/8709
2024-01-18 06:17:58 -08:00
Sam Lantinga 26996e2c02 We've decided to keep separate functions for creating a thread with and without stack size specified.
Fixes https://github.com/libsdl-org/SDL/issues/6652
2024-01-18 06:11:55 -08:00
Sam Lantinga a2665f54c8 Updated the atomic API for SDL 3.0 naming conventions
Fixes https://github.com/libsdl-org/SDL/issues/7388
2024-01-18 04:41:34 -08:00
SDL Wiki Bot 4e60fc9b2b Sync SDL3 wiki -> header 2024-01-18 12:07:19 +00:00
Sam Lantinga fb898d6df0 Clarify that desktop mode is the non-exclusive borderless fullscreen mode
Fixes https://github.com/libsdl-org/SDL/issues/8413
2024-01-18 04:06:32 -08:00
SDL Wiki Bot b5bcf45a65 Sync SDL3 wiki -> header 2024-01-18 12:02:08 +00:00
Sam Lantinga 4fee6cb274 Added documentation for custom event cleanup in SDL_FlushEvent() 2024-01-18 04:00:48 -08:00
SDL Wiki Bot 20e8411b12 Sync SDL3 wiki -> header 2024-01-18 11:27:24 +00:00
Sam Lantinga f224af5ac5 Updated Haptic API for SDL 3.0 conventions
Also removed the XInput haptic support since using the haptic API for rumble is no longer supported.
2024-01-18 03:26:11 -08:00
Sam Lantinga 75dd7e1658 Note that we only allow disabling major subsystems 2024-01-17 09:24:04 -08:00
Sam Lantinga 130b361904 Removed SDL_MISC_DISABLED 2024-01-17 09:24:04 -08:00
Sam Lantinga 20fa5e6ad0 Removed SDL_LOCALE_DISABLED 2024-01-17 09:24:04 -08:00
Sam Lantinga 6efadfdb77 Removed SDL_FILESYSTEM_DISABLED 2024-01-17 09:24:04 -08:00
Sam Lantinga 3d951134a3 Removed SDL_FILE_DISABLED
This didn't actually do anything except break functionality on Apple platforms
2024-01-17 09:24:04 -08:00
Sam Lantinga 31f34e9504 Removed SDL_ATOMIC_DISABLED
It turns out that because we redefine SDL functions internally, it is safe to call SDL mutex functions while initializing the jump table
2024-01-17 09:24:04 -08:00
Sam Lantinga 6e1b11368d Removed SDL_CPUINFO_DISABLED
CPU info is a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga 52d6587084 Removed SDL_EVENTS_DISABLED
Events are a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga ba02722755 Removed SDL_LOADSO_DISABLED
Loading shared libraries is core functionality on platforms that support it.
2024-01-17 09:24:04 -08:00
Sam Lantinga 0d7df16812 Timers are a required platform feature
Many SDL subsystems depend on being able to see time passing. If you are porting to a new platform, you'll need to fill in a timer implementation as part of the initial port.

Fixes https://github.com/libsdl-org/SDL/issues/8850
2024-01-16 20:50:08 -08:00
SDL Wiki Bot 3ca8cee874 Sync SDL3 wiki -> header 2024-01-16 20:27:25 +00:00
Ryan C. Gordon 8bf74280e0
docs: Note SDL_UpdateWindowSurfaceRects can update beyond specified areas.
Reference Issue #8825.
2024-01-16 15:26:13 -05:00