Commit Graph

21212 Commits

Author SHA1 Message Date
Sam Lantinga
77290f9788 You can't change the size of a window while in macOS fullscreen space 2026-01-14 15:05:14 -08:00
Frank Praznik
32747ceb84 tests: Don't try to load unsupported image types in testclipboard
Requesting certain MIME types (e.g. EPS formats offered by KDE) can be *very* slow, on the order of multiple seconds, due to requiring significant processing. Only try to load image MIME types that SDL is known to support (BMP and PNG).
2026-01-14 11:00:50 -05:00
Frank Praznik
2a0d04613c wayland: Increase the read timeout when reading from SDL_GetClipboardData()
The default timeout value of 14ms is ideal when querying clipboard data while polling events, to prevent excessive lag if the source takes a long time to respond, however, when reading from SDL_GetClipboardData(), the timeout can be too short if a large amount of data must be processed or transferred. SDL_GetClipboardData() is not called while polling events, so using a longer read timeout to greatly increase the chance of success is acceptable.

Use a 5 second timeout when reading from SDL_GetClipboardData() and GetPrimarySelectionText() to greatly increase the chances of a successful read, even if the requested format requires heavy processing.
2026-01-14 11:00:50 -05:00
Sam Lantinga
206989a22d Revert "Fix duplicate event dispatch in Cocoa event pump"
This reverts commit dd52dd8995.

After that commit mouse input is not received and the window cannot be closed or resized.

Fixes https://github.com/libsdl-org/SDL/issues/14818
2026-01-13 16:23:41 -08:00
Sam Lantinga
54fdeb9e79 Added support for the Razer Raiju V5 Pro in wireless mode 2026-01-13 16:23:05 -08:00
Sam Lantinga
015d0fc2e4 Added support for the Razer Raiju V5 Pro 2026-01-13 15:48:12 -08:00
Anonymous Maarten
6f19fecba3 cmake: compile SDL_uclibc separately for shared and static SDL3, ensuring fPIC for shared SDL3 2026-01-13 23:27:49 +01:00
Sergei Petunin
460b8a0db1 Fix MAC_PRESS_AND_HOLD hint documentation 2026-01-13 09:00:35 -08:00
Frank Praznik
2212c4f085 wayland: Send exposure events when deferring resize events
Clients that defer repainting may hang in SDL_WaitEvent() while interactively resizing if they only redraw when an appropriate event is received, as resizing defers the new state until a frame callback is received, and if too much time elapsed since the last redraw, the last frame callback may have already occurred. Send an exposure event when deferring resizes so the client will make forward progress and trigger a frame callback to ack the pending configure state.
2026-01-12 19:22:38 -05:00
Edgar San Martin, Jr.
7c9ae67706 Add write buffering to Windows SDL_IOStream (#12424) (#14794) 2026-01-12 11:39:06 -08:00
Qiu Qiang
dd52dd8995 Fix duplicate event dispatch in Cocoa event pump
Prevent mouse and keyboard events from being processed twice by
skipping [super sendEvent:] for events SDL has already handled via
Cocoa_DispatchEvent. Other event types still go through AppKit's
normal handling.
2026-01-12 11:29:45 -08:00
Frank Praznik
ca537d651b wayland: Dispatch pointer leave when destroying the pointer or a surface
No pointer frame event will occur when synthesizing a leave event, so dispatch immediately.
2026-01-11 11:37:03 -05:00
Frank Praznik
55acc0b829 joystick/win32: Fix function return type mismatch
Fixes #14804
2026-01-11 10:56:06 -05:00
SDL Wiki Bot
90aaa23977 Sync SDL3 wiki -> header
[ci skip]
2026-01-10 16:47:13 +00:00
Ethan Lee
5b009640fe events: Buildfix for targets with C++ build units 2026-01-09 14:50:56 -05:00
Frank Praznik
d102022c95 wayland: Handle all mouse state in a frame
The hybrid handling can still result in cases where a final event is dropped when the pointer leaves a surface. The spec says that all pointer events should be handled within a frame, so, do so.
2026-01-09 13:42:15 -05:00
Katharine Chui
2bb463921f haptic hidapi: maintain effects array for external checking 2026-01-08 14:05:01 -08:00
Ozkan Sezer
ab900a389f stb_image.h (stbi__start_mem): initialize io.skip and io.eof to NULL
Patch authored by @NBickford-NV: https://github.com/miniupnp/stb/pull/1
c.f.: https://github.com/nothings/stb/pull/1751
2026-01-08 23:21:56 +03:00
Sam Lantinga
f369e804e2 Fixed crash when the broken EZFRD64.DLL is present
Fixes https://github.com/ppy/osu/issues/13634
2026-01-07 17:11:57 -08:00
Jipok
7931321cff X11: Handle WM_STATE transitions to detect Withdrawn/Iconic states (#14770)
When running SDL3 applications on tiling window managers like i3, moving a window to an invisible workspace does not trigger SDL_WINDOW_MINIMIZED or SDL_WINDOW_HIDDEN. Consequently, the application continues rendering at full speed (VSync dependent), consuming unnecessary GPU/CPU resources even when not visible.

When a workspace is hidden, i3(and possible other tiling WMs) unmaps the container and sets the client window state to WithdrawnState (via the WM_STATE atom). Previously, the SDL3 X11 backend ignored changes to WM_STATE during PropertyNotify events, failing to detect this transition.
2026-01-07 11:46:41 -08:00
Ryan C. Gordon
07ecddb925 haiku: Minor code convention cleanups.
Reference PR #14778.
2026-01-07 14:05:38 -05:00
erysdren
dc6775ae0b haiku: update modelist logic 2026-01-07 14:03:55 -05:00
erysdren
8b47487547 haiku: fix modelist double-free 2026-01-07 14:03:55 -05:00
limb-soup
f805bb53cf pthread: add call to pthread_mutexattr_destroy (#14786) 2026-01-07 10:56:03 -08:00
Sam Lantinga
a66988621a Added temporary workaround hint "SDL_WINDOWS_DETECT_DEVICE_HOTPLUG"
Some devices with broken drivers hang when their name is queried, so added a workaround for applications that don't need input device details. The long term fix is to move the hotplug detection into a separate thread.
2026-01-07 10:30:53 -08:00
DarkContact
044aed1f27 Add support for GPU ARGB1555 (B5G5R5A1_UNORM) textures with DX11 2026-01-07 10:08:59 -08:00
bubbleguuum
7690e00f42 x11: fix compilation failure on older XInput2
Older versions of XInput2 do not declare struct XIGesturePinchEvent
in XInput2.h, causing compilation failure in SDL_x11xinput2.c

Check for XIGesturePinchEvent in the test for enabling
SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE
2026-01-06 06:49:38 -08:00
Sam Lantinga
bc68c1c920 Fixed conflict when linking both SDL and hidapi statically
Closes https://github.com/libsdl-org/SDL/pull/14772
2026-01-06 06:10:39 -08:00
Anonymous Maarten
cd31381185 cmake: rpi videocore needs brcmegl as well 2026-01-05 23:45:32 +01:00
Anonymous Maarten
d73e74f9bf cmake: add SDL_FULL_VERSION target property containing full SDL version 2026-01-05 23:34:46 +01:00
Mathieu Eyraud
c9baf208bd Fix Mouse button index 2026-01-05 16:07:21 -05:00
Frank Praznik
fab42a1432 wayland: Check focus when dispatching relative motion
In rare cases, a leave event can be grouped with relative motion in a frame. Ensure a valid focus window when dispatching relative motion.
2026-01-05 13:43:35 -05:00
Frank Praznik
8a2fbef5b2 wayland: Define the magic values for stylus buttons
Use the Linux defines if available, and if not, define the buttons with the rest of the values, as is done for mouse buttons.
2026-01-05 11:57:00 -05:00
Katharine Chui
6c2f9bc41e hidapi: Disable hidapi LG4FF on windows (#14762)
hid.dll simply cannot send 7 bytes reports unlike other platforms

It enforces full length repots of 17 from the device's descriptor,
which does not work on the device.

This breaks ffb and led control, so we disable this by default on
windows.
2026-01-05 08:14:26 -08:00
Sam Lantinga
c742038aa9 Don't call SDL_Gtk_Quit() on private platforms 2026-01-05 08:08:33 -08:00
Sam Lantinga
ce6a6d1b39 Fixed handling status changes in the FlyDigi controller driver 2026-01-05 08:00:03 -08:00
Ethan Lee
b12a88af76 render: Add support for private-platform shaders in GPU backend 2026-01-05 09:48:34 -05:00
Lucas Murray
cced3ce8b9 GPU: Add error message to Vulkan buffer creation error path 2026-01-04 15:17:53 -08:00
SDL Wiki Bot
6a449ae1f3 Sync SDL3 wiki -> header
[ci skip]
2026-01-04 22:26:46 +00:00
Sam Lantinga
726a94efa9 Use full names of SDL functions to fix wiki links 2026-01-04 14:24:32 -08:00
Sam Lantinga
504041a1ba Fixed building with Xcode 15.4
Fixes https://github.com/libsdl-org/SDL/issues/14740
2026-01-03 08:03:44 -08:00
Frank Praznik
24156f5471 pipewire: Check for the audio service when determining driver preference
Wireplumber now exposes a list of session services, so check the "session.services" property for an "audio" entry to determine whether Pipewire is configured for audio playback/capture.
2026-01-02 22:00:27 -05:00
Qiu Qiang
3ee8d1406c Cache CGDisplayPixelsHigh result on macOS to reduce IPC overhead
CGDisplayPixelsHigh(kCGDirectMainDisplay) involves an IPC call to the
Window Server on each invocation. Cache the main display height in
SDL_CocoaVideoData and update it only when display configuration changes,
reducing overhead during high-frequency mouse event processing.
2026-01-02 12:29:02 -08:00
Ethan Lee
91f22b15cd ci: Add steamrt4 workflows 2026-01-02 12:18:43 -05:00
Sam Lantinga
7edcc413e8 Update the iOS Xcode build requirements 2026-01-02 08:53:04 -08:00
Sam Lantinga
a0307589bd iOS: if the file doesn't exist in the pref path, use the current directory
Fixes https://github.com/libsdl-org/SDL/issues/14743
2026-01-02 08:19:28 -08:00
Joshua Vandaële
4a29b6a651 Fix dynamic library handling for LibUSB
`target_get_dynamic_library` should not be called if `SDL_HIDAPI_LIBUSB_SHARED` is set to OFF, it otherwise causes a warning at best, or a build failure if libusb is provided by a parent project and not installed on the system
2026-01-02 07:39:30 -08:00
Ethan Lee
f472f93db8 gpu: D3D12 uploads should also factor in block size for height, not just width.
It turns out the reason this function was having so many overread issues was because our row copies were wrong - for compressed images we also need to reduce the row count based on the block size, similar to what we already do for pitch calculation - these copies are byte copies, not pixel copies!
2026-01-02 07:37:30 -08:00
Kadir
cbcc565ca9 Add ProGuard rule for joystickSetLED method in SDLControllerManager 2026-01-02 07:30:36 -08:00
Zack Middleton
6247568a1b Improve hint documentation 2026-01-02 02:51:41 -05:00