Recalculate the backing viewport dimensions in the resize handler, otherwise, this data can be out-of-sync with the logical window size if queried during transition animations.
This makes sure that anything that hooks window creation to set up window proc hooks will call DefWindowProc instead of infinitely recursing when we set up our window proc afterwards.
Fixes https://github.com/libsdl-org/SDL/issues/10529
The controller can be in XInput mode or enhanced mode, so it will always show up as an XInput controller, and the enhanced mode controller will come and go as enhanced mode is enabled or disabled in the FlyDigi Space Station app.
Store the images in order from smallest to largest to simplify lookup and be able to early-out of the search loop even if there is no exact match for the scale.
Some compositors don't implicitly use the pointer cursor when the tablet cursor is not set, and the presence of a tablet doesn't necessarily guarantee pointer capability. Set the cursor for tablet tools independently of pointer cursors.
This required refactoring of cursor state handling, as well as some tablet related structures.
Cache the cursor image data at creation time, and use a viewport to render scaled custom cursors, instead of generating new cursor images for every scale.
pa_channel_map_init_auto() with PA_CHANNEL_MAP_WAVEEX does the wrong
thing as it just takes the lest significant bits of
WAVEFORMATEXTENSIBLE's dwChannelMask in order. This doesn't match SDL's
chosen channel ordering.
The implementation here mirrors what we do for PipeWire.
Setting AudioCategory_GameChat breaks audio on several devices, including Behringer U-PHORIA UM2 and RODE NT-USB Mini. We'll disable this for now until we understand more about what's happening.
libdecor 0.3, which changes the signature of libdecor_new and
libdecor_decorate to use a const pointer to the interface struct, has
not yet been released. In the latest release, libdecor 0.2.4, the
interface struct is a mutable pointer.
This doesn't affect typical upstream builds with
SDL_WAYLAND_LIBDECOR_SHARED=ON, in which case we're casting a pointer
returned by dlsym(); but Linux distributions that want tighter control
over dependencies often prefer to link them in the normal way, in which
case the build will fail if the signature doesn't match.
Fixes: 33834360 "wayland: Fix libdecor incompatible pointer types"
Signed-off-by: Simon McVittie <smcv@collabora.com>