Commit Graph

2571 Commits

Author SHA1 Message Date
SDL Wiki Bot
1f1ee7fa08 Sync SDL3 wiki -> header
[ci skip]
2025-09-07 18:03:10 +00:00
Sam Lantinga
ec33da05b3 Added SDL_HINT_RENDER_DIRECT3D11_WARP
Fixes https://github.com/libsdl-org/SDL/issues/13002
2025-09-07 11:00:59 -07:00
SDL Wiki Bot
cbcb1d42c4 Sync SDL3 wiki -> header
[ci skip]
2025-09-06 18:23:12 +00:00
Sam Lantinga
fb2daa2f5f Updated the documentation for SDL_GetRenderLogicalPresentation()
Fixes https://github.com/libsdl-org/SDL/issues/13791
2025-09-06 11:21:36 -07:00
Sam Lantinga
d03f3e11f6 Change the default YUV colorspace to SDL_COLORSPACE_BT601_LIMITED
This was the default for SDL2 and what people expect, migrating code.

Fixes https://github.com/libsdl-org/SDL/issues/13796
2025-09-06 11:04:25 -07:00
SDL Wiki Bot
197bfab0b5 Sync SDL3 wiki -> header
[ci skip]
2025-09-05 16:44:33 +00:00
Ryan C. Gordon
b8197a2291 io: rework how we set SDL_IOStream status.
This now relies on the implementation to set these flags on short reads/writes
instead of the higher level checking if SDL_SetError() was called.

Additionally (and crucially), this now sets ERROR or EOF on all short reads,
across all backends, not just when we get a zero-byte return value.

Fixes #13720.
2025-09-05 12:43:13 -04:00
SDL Wiki Bot
5505cb2bb9 Sync SDL3 wiki -> header
[ci skip]
2025-09-04 23:54:17 +00:00
Ryan C. Gordon
3597877277 SDL_main.h: Cleanups in SDL_RegisterApp documentation.
There is an escaped pipe character, because this ends up in a Markdown table
on the wiki, and the wiki software (incorrectly, I think) sees the pipe inside
a code-block and thinks it's the end of the table cell if not escaped.

But this escape char looks wrong everywhere else.

Keeping the parameter table terse is always a good idea, so I moved the
detail out to the Remarks section, which doesn't have a problem with this
character appearing in the text.
2025-09-04 19:50:04 -04:00
Maia
5938dce5de Add missing include 2025-09-02 12:52:53 +02:00
Xander
dc7a3a1219 Add SDL_SENSOR_COUNT to SDL_SensorType 2025-08-29 07:31:02 -07:00
SDL Wiki Bot
edfbfa27b4 Sync SDL3 wiki -> header
[ci skip]
2025-08-29 03:02:44 +00:00
SDL Wiki Bot
c1e7b1a540 Sync SDL3 wiki -> header
[ci skip]
2025-08-28 16:12:34 +00:00
Sam Lantinga
65c1fc1b42 Added SDL_hid_get_properties() 2025-08-28 09:10:47 -07:00
Ethan Lee
efea62ed61 hidapi: Add a stub driver for Switch 2.
Thanks to kiddkaffeine for the Xcode updates!
2025-08-28 09:10:47 -07:00
Sam Lantinga
5d9b170a3d Be explicit that SDL_FLIP_HORIZONTAL_AND_VERTICAL combines horizontal and vertical flipping
Closes https://github.com/libsdl-org/SDL/pull/13821
2025-08-28 04:22:31 -07:00
Ryan C. Gordon
e9c2e9bfc3 SDL_iostream.h: Clarified thread-safety docs.
Fixes #13814.
2025-08-27 22:03:50 -04:00
SDL Wiki Bot
a1964dd673 Sync SDL3 wiki -> header
[ci skip]
2025-08-27 22:35:48 +00:00
Sam Lantinga
285df94623 Renamed SDL_GPURenderStateDesc to SDL_GPURenderStateCreateInfo for consistency with GPU API conventions
Fixes https://github.com/libsdl-org/SDL/issues/12817
2025-08-27 09:14:19 -07:00
SDL Wiki Bot
943d0f67ba Sync SDL3 wiki -> header
[ci skip]
2025-08-27 13:46:21 +00:00
Sam Lantinga
42f634ff7a Added SDL_AddAtomicU32()
Fixes https://github.com/libsdl-org/SDL/issues/13496
2025-08-27 06:44:51 -07:00
SDL Wiki Bot
15e60cd37f Sync SDL3 wiki -> header
[ci skip]
2025-08-26 18:55:26 +00:00
Sam Lantinga
66ab91a314 Added SDL_FLIP_HORIZONTAL_AND_VERTICAL
Closes https://github.com/libsdl-org/SDL/pull/13788
2025-08-26 05:50:51 -07:00
Merlyn Morgan-Graham
385715c0dd Introduce enum for SDL_GetCameraPermissionState result 2025-08-25 14:43:31 -04:00
Ethan Lee
0fcaf47658 gpu: D3D12 only requires feature level 11_0 with Resource Binding Tier 2.
We previously thought this wasn't possible because constant buffer offsets and
partial updates were unavailable, but we were reading the wrong table - this is
only the case for D3D11...

https://learn.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro

... while 12 doesn't list this feature at all:

https://learn.microsoft.com/en-us/windows/win32/direct3d12/hardware-feature-levels

We double checked and Jesse Natalie confirmed that this feature is required for
D3D12 even for 11_0 drivers. (Thanks Jesse!)

Additionally, D3D12 requires that UAVs are accessible from all shader stages,
meaning Tier 2 is enough to support the number of UAVs we need. Tier 1 could be
a property to lower the requirements, but that can be done later.
2025-08-22 15:46:05 -04:00
Merlyn Morgan-Graham
dee2414ee7 Fix typo in SDL_power doc comment 2025-08-21 08:40:57 +03:00
arnau.nau
ee5e249008 Docs fix for SDL_stdinc.h: floor,floorf,ceil,ceilf 2025-08-20 18:01:46 -04:00
SDL Wiki Bot
0b082b25b2 Sync SDL3 wiki -> header
[ci skip]
2025-08-19 20:39:22 +00:00
SDL Wiki Bot
e3db7f83c2 Sync SDL3 wiki -> header
[ci skip]
2025-08-19 04:41:07 +00:00
Ryan C. Gordon
ec0e4e21c7 docs: Mark most of SDL_filesystem.h as thread-safe.
Fixes #13738.
2025-08-13 16:32:55 -04:00
SDL Wiki Bot
7487880e4c Sync SDL3 wiki -> header
[ci skip]
2025-08-12 17:05:23 +00:00
SDL Wiki Bot
4b2a87a5d3 Sync SDL3 wiki -> header
[ci skip]
2025-08-12 16:53:08 +00:00
SDL Wiki Bot
f2df279adc Sync SDL3 wiki -> header
[ci skip]
2025-08-10 05:08:26 +00:00
Sam Lantinga
40ec9592f1 Restored text missing during wiki sync (thanks @sezero!) 2025-08-09 22:07:14 -07:00
SDL Wiki Bot
3970acd1c2 Sync SDL3 wiki -> header
[ci skip]
2025-08-10 02:21:43 +00:00
SDL Wiki Bot
44ce826b57 Sync SDL3 wiki -> header
[ci skip]
2025-08-09 18:34:27 +00:00
Mohamed Shazan
f4c124e4bf SDL_TriggerBreakpoint() will default to __debugbreak() on MinGW toolchain on windows 2025-08-08 16:20:59 -07:00
Pino Toscano
171885010d Add GNU/Hurd as platform
SDL has been building on GNU/Hurd for a long time, using either drivers
based on external libraries (e.g. X11, pulseaudio, sndio, etc) or dummy
drivers. This commit introduces it explicitly as platform, so it can be
recognized, and tweaked as needed. In particular:
- introduce the SDL_PLATFORM_HURD define
- tighten/improve the platform detection in cmake, and use "Hurd" as
  identifier
- return the platform name in SDL_GetPlatform()
- tweak the CFLAGS/LDFLAGS so pthreads can be used properly
- implement SDL_GetExeName(), using /proc/self/exe as provided by the
  basic Linux-like procfs
- enable GLES 2 in tests (mostly for consistency with Linux)
2025-08-08 12:47:09 -07:00
Simon McVittie
d83503f80e Fix some typos detected by Debian's lintian QA tool
I assume the demoninator is a typo, rather than an indication that
someone has been playing too much Doom :-)

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-08-07 13:55:15 -07:00
Simon McVittie
40b941c826 hints: Rephrase documentation to improve grammar
"This thing allows to do something" is not really grammatically correct.
The closest rephrasing would be "allows one to do something" or "allows
the user to do something", but I think the passive voice reads more
naturally here.

Detected by Debian's lintian QA tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-08-07 13:55:15 -07:00
Pino Toscano
561c99ee11 SDL_endian.h: extend Linux way for GNU libc
The currently used way to determine the endianness (i.e. include
<endian.h> and use the __BYTE_ORDER macro) is provided in general by
GNU libc. Thus, extend that to any platform/OS based on GNU libc.
2025-08-06 16:13:26 -07:00
Sam Lantinga
aae7736ec6 Added additional examples of paddle and misc buttons (thanks @AL2009man!) 2025-08-05 12:01:31 -07:00
Sam Lantinga
9a71e3fd50 Revert "Add SDL_IsTraySupported"
This reverts commit 47d8bdd1c3.

There are runtime reasons why creating a tray can fail, so the correct approach is not to assume that just because a platform supports a tray that trays are available. Instead, you should create a tray at application startup, for the lifetime of the application, and handle failures at that point.

Closes https://github.com/libsdl-org/SDL/pull/13632
2025-08-04 10:42:43 -07:00
Petar Popovic
faf3bd9991 SDL_enabled_assert(): Use NULL istead of 0 to explicity initialize the pointer members of SDL_AssertData 2025-08-03 13:33:48 -04:00
SDL Wiki Bot
e2392984b2 Sync SDL3 wiki -> header
[ci skip]
2025-07-30 08:06:30 +00:00
Ryan C. Gordon
dec21043a0 docs: Slightly improve virtual joystick docs.
Reference https://github.com/libsdl-org/sdlwiki/issues/78
2025-07-30 00:52:29 -04:00
Ryan C. Gordon
ea04bdb5f3 docs: Added a note about virtual joysticks to CategoryJoystick.
Fixes https://github.com/libsdl-org/sdlwiki/issues/78
2025-07-30 00:44:35 -04:00
SDL Wiki Bot
cd15893ea3 Sync SDL3 wiki -> header
[ci skip]
2025-07-30 03:30:05 +00:00
Ryan C. Gordon
acbe86399d docs: Note SDL_EVENT_AUDIO_DEVICE_ADDED is sent for all devices at startup.
Fixes https://github.com/libsdl-org/sdlwiki/issues/721
2025-07-29 23:22:50 -04:00
SDL Wiki Bot
39794ae9cd Sync SDL3 wiki -> header
[ci skip]
2025-07-30 03:13:02 +00:00