Frank Praznik
fab52b578f
wayland: Ensure that color descriptions are always retrieved
2025-02-26 15:15:44 -05:00
jsoulier
9464aaa8af
Change D3D12 GPU backend to respect has_depth_stencil_target
2025-02-26 10:16:50 -08:00
Sam Lantinga
cf819ca818
Don't allow further operations on properties while we're destroying them
...
Fixes https://github.com/libsdl-org/SDL/issues/12407
2025-02-26 08:34:14 -08:00
Sam Lantinga
e012573766
Don't fixup mappings for Joy-Con controllers
...
They don't have a D-pad mapping, so look at the paddles instead to see whether we need to fix up the mapping.
Fixes https://github.com/libsdl-org/SDL/issues/12232
2025-02-25 19:14:18 -08:00
Sam Lantinga
34c3734953
Fixed opening one Joy-Con when the other is visible but disconnected
...
This can happen on Windows when the controller is turned off directly. It still shows up in the device list and you can send packets to it, but it's off and doesn't respond. We'll mark this device as broken and open the other as a single Joy-Con.
2025-02-25 19:14:18 -08:00
Sam Lantinga
049a7a04de
Wake the main thread for main function dispatch
...
Also added a test case to catch the main thread waiting indefinitely when a function is pending.
Fixes https://github.com/libsdl-org/SDL/issues/12390
2025-02-25 12:50:41 -08:00
hwsmm
f0f593f04b
Embed a description about Wayland clipboard instead of a link
...
Co-authored-by: Frank Praznik <frank.praznik@gmail.com >
2025-02-25 14:33:33 -05:00
hwsmm
bb748ef2d9
Don't cleanup clipboard in SDL_SendClipboardUpdate on Wayland
2025-02-25 14:33:33 -05:00
Sam Lantinga
85a302550d
Set an error message if the rect passed to SDL_RenderReadPixels() is entirely outside the viewport
2025-02-25 10:28:57 -08:00
cosmonaut
2f77558bad
fix comment
2025-02-25 09:44:10 -08:00
cosmonaut
44f1ec35c4
GPU: Make Vulkan transfer buffers dedicated allocs
2025-02-25 09:44:10 -08:00
Sam Lantinga
6980325310
Added support for the "%n" sscanf format specifier
2025-02-24 20:02:59 -08:00
Sam Lantinga
e6a24fcbb5
fix stbi__parse_png_file() reading too much bytes (thanks @miniupnp!)
...
just "rewind" the bytes that have been read past the IEND chunk.
2025-02-24 17:29:25 -08:00
Sam Lantinga
db4e6c1931
Cocoa metal layers need their size updated before renderer updates
...
Also refactored event watch code so it can be shared between internal window event dispatch and public event watchers.
Fixes https://github.com/libsdl-org/SDL/issues/12376
2025-02-24 15:37:13 -08:00
Tomasz Pakuła
58388e8db4
Add SDL_HINT_JOYSTICK_HAPTIC_AXES
...
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of `0xFFFF/0xFFFF`
2025-02-24 15:12:04 -08:00
Ethan Lee
db817a37f4
gpu: Fix forward declaration and inclusion of PrivateGPUDriver
2025-02-24 15:46:39 -05:00
zopsicle
a7bc6c5e08
gpu: initialize VkDebugUtilsLabelEXT::color
...
Fixes #12383 .
2025-02-24 11:51:13 -08:00
Caleb Cornett
60b7faa987
gpu: Validate that reserved struct members are unset
2025-02-24 08:57:09 -08:00
Ralph Sennhauser
2990d142c4
Map additonal Linux keycodes to SDL scancodes
...
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-02-24 07:53:22 -08:00
Ralph Sennhauser
a0086a5cc4
Add missing scancode names
...
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com >
2025-02-24 07:53:22 -08:00
Petter Reinholdtsen
35544df838
Changed PULSEAUDIO_FlushRecording() to only flush audio present when called.
...
When the flushing is not able to keep up with the audio stream coming in, it
will end up flushing forever and block API clients from getting any audio.
The example program in #9706 get some audio with SDL 3, while do not get any
audio with SDL 2, which I suspect is because SDL 3 is quicker at flushing the audio.
A fix for the SDL 2 issue is available in #12378 .
2025-02-24 07:30:36 -08:00
Caleb Cornett
0815637cf0
vulkan build fix
2025-02-23 12:19:12 -08:00
Caleb Cornett
ea77472d75
Document/ignore GPU features without universal support
2025-02-23 12:19:12 -08:00
Petar Popovic
ad11c6988c
src/io/SDL_asyncio.c:SDL_AsyncIOFromFile(): Fix null-dereference warning
2025-02-23 11:12:24 -08:00
Frank Praznik
52af81ea17
wayland: Fix mapping borderless windows under libdecor
...
Additionally, add a warning about calling the frame visibility function universally during the mapping process, as the libdecor Cairo plugin has a bug that will cause a crash in this scenario.
2025-02-23 11:04:29 -05:00
Frank Praznik
1a0a94b501
x11: Accommodate the borders when setting the initial window position
2025-02-23 10:49:40 -05:00
Sam Lantinga
52e64f816c
Use SDL C runtime functions in OpenVR driver
...
Fixes link errors when building with -DSDL_LIBC=OFF
2025-02-22 12:41:03 -08:00
Sam Lantinga
7224b40407
Fix errors when building stb_image with -DSDL_LIBC=OFF
...
I integrated changes from SDL_image and updated as needed for JPEG memory loading functionality.
Fixes https://github.com/libsdl-org/SDL/issues/12364
2025-02-22 12:41:03 -08:00
Cameron Gutman
945da099ae
pipewire: Fix possible deadlock when opening a device
...
If the pipewire thread invokes output_callback() while we're still
waiting inside PIPEWIRE_OpenDevice(), we will deadlock. The pipewire
thread owns the loop lock and is blocked on the audio device lock,
which cannot be released because pw_thread_loop_wait() needs to
reacquire the loop lock before it can return and allow
PIPEWIRE_OpenDevice() to complete and release the device lock.
2025-02-22 11:37:06 -08:00
Sam Lantinga
e50db698e2
Disable all camera drivers if SDL_CAMERA_DISABLED is defined
...
Fixes https://github.com/libsdl-org/SDL/issues/12182
2025-02-22 09:48:49 -08:00
Sam Lantinga
1ddba3ad55
Replace "8BitDo Tech Ltd" with "8BitDo" in the manufacturer string
...
Fixes the 8BitDo Micro gamepad so it shows up as "8BitDo Bluetooth Wireless Controller" in keyboard mode over Bluetooth.
2025-02-22 09:19:59 -08:00
Sam Lantinga
fdf72d1e45
Use the keyboard/mouse vendor if available
...
Fixes the 8BitDo Micro gamepad so it shows up as "8BitDo HID-compliant mouse" and "8BitDo HID Keyboard Device" in keyboard mode over USB.
2025-02-22 09:19:59 -08:00
Sam Lantinga
a811e0ef0f
Added support for the 8BitDo Micro gamepad
2025-02-22 09:19:59 -08:00
Sam Lantinga
75bbcbf87b
Added support for Motion JPEG pipewire camera capture
2025-02-22 00:23:03 -08:00
Anonymous Maarten
03e00cd347
v4l2: map SDL_PIXELFORMAT_MJPG to V4L2_PIX_FMT_MJPEG
2025-02-21 23:04:13 -08:00
Sam Lantinga
fcd41c1d2c
Check desired window area when checking zoom state
...
isZoomed returns true if the window has the size and position that it would if it were maximized, so we need to check to see if our floating state matches that before saying we're zoomed.
This fixes calling zoom:nil on a borderless resizable window that was created with the same size as the usable desktop area, which happens to also be the maximized state.
Fixes https://github.com/libsdl-org/SDL/issues/12228
2025-02-21 18:38:12 -08:00
Petar Popovic
b5297de56f
Add 'const' to pointer parameters
2025-02-21 15:59:40 -08:00
Sam Lantinga
911e53dece
Retain mouse focus as long as we're getting mouse events
...
Fixes https://github.com/libsdl-org/SDL/issues/12218
Fixes https://github.com/libsdl-org/SDL/issues/12323
2025-02-21 15:35:28 -08:00
Sam Lantinga
3b8cb62283
Make it easier to enable IME debug logs
2025-02-21 15:24:45 -08:00
williamhCode
9a607e886e
make start&length represent utf32 indices
2025-02-21 12:54:56 -08:00
Petar Popovic
c70f54e28b
Remove redundant casts
2025-02-21 10:09:10 -08:00
Sam Lantinga
2e346d7166
Added 32-bit texture formats to Texture_GetBlockWidth() and Texture_GetBlockHeight()
...
Fixes https://github.com/libsdl-org/SDL/issues/12335
2025-02-21 09:29:18 -08:00
Sam Lantinga
5d776c070a
Refactored SDL_CreateJoystickName() into a general SDL_CreateDeviceName()
2025-02-21 09:10:54 -08:00
expikr
3293eb1a16
use hidapi to get mouse/keyboard string
2025-02-21 07:42:20 -08:00
Anonymous Maarten
28f0867948
SPA_FALLTHROUGH expands to nothing when using the Intel compiler
2025-02-21 04:30:19 +01:00
Sam Lantinga
9267930fea
Added a fast path for converting the same format and pitch
2025-02-20 12:16:26 -08:00
Sam Lantinga
2e89c53ebc
Added support for decoding MJPG into NV12 textures
2025-02-20 12:16:26 -08:00
Sam Lantinga
a792434a37
Added initial MJPG support using stb_image
2025-02-20 12:16:26 -08:00
Frank Praznik
b48de48efb
wayland: Add support for high-DPI icons
2025-02-20 13:57:37 -05:00
Frank Praznik
6e0264d38e
x11: Use the current or last-requested window position when setting the size hint
...
The move operation is just a no-op to try and force the hint to take effect, so it should use the current window coordinates.
2025-02-20 13:25:47 -05:00