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.
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.
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.
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)
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>
"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>
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.
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