Commit Graph

19215 Commits

Author SHA1 Message Date
Ryan C. Gordon b00b08f832
touch: Keep state correct when removing virtual touch devices during quit.
This is probably not strictly necessary, since SDL_InitMouse will zero out
the whole struct to start if SDL is reinitialized, but just in case.
2025-03-27 12:02:08 -04:00
Frank Praznik 09fff161e9 cocoa: Clear pending state on fullscreen switch failures
The window failing to enter/exit fullscreen notifications don't necessarily imply anything about the actual state of the window. On failure, dump pending events, and don't presume anything about the current window state, as it will be handled by subsequent enter/leave notifications.
2025-03-27 11:57:47 -04:00
Frank Praznik 05d23cae73 cocoa: Re-add sync timeout
This should never happen, but it's a failsafe against future bugs or odd configurations
2025-03-27 11:49:02 -04:00
Sam Lantinga 2e61b41652 Don't send relative motion while in a modal loop
This fixes queuing up a bunch of relative motion events while moving or resizing a window.
2025-03-27 08:10:50 -07:00
Ryan C. Gordon 4c035a1fd8
audio: Allow PipeWire and PulseAudio streams to migrate to other sinks.
SDL still manages hotplug and default device management here, but if a user
wants to use an external tool, such as `pactl move-sink-input`, to put it
onto a different device, they probably know what they're doing and we
shouldn't stop them.

If this turns out to have some unexpected consequences, though, we can revisit
the change.

Fixes https://github.com/libsdl-org/sdl2-compat/issues/367
2025-03-27 11:00:51 -04:00
SDL Wiki Bot f3d4e6fe50 Sync SDL3 wiki -> header
[ci skip]
2025-03-26 17:13:19 +00:00
Frank Praznik 8e6eaf12a4 wayland: Expose wl_output objects on video displays
Some protocols take a wl_output object to function, so expose them via a property on the video displays.
2025-03-26 13:12:23 -04:00
SDL Wiki Bot 1f917d5231 Sync SDL3 wiki -> header
[ci skip]
2025-03-26 15:55:25 +00:00
Petar Popovic 00f316737b Progress bar comment changes 2025-03-26 08:54:30 -07:00
Sam Lantinga e28974124a Added mappings for the NSO N64/SEGA/SNES controllers
These are used on Linux when the HIDAPI driver isn't available.
2025-03-25 14:46:03 -07:00
Sam Lantinga b88200b797 Fixed face buttons for the NSO SNES controller under the HIDAPI driver 2025-03-25 14:46:03 -07:00
Sam Lantinga f355c7f217 Allow the progress API to be used on all platforms
It's visually only hooked up on Windows for now, but the API will be internally consistent on all platforms.
2025-03-25 11:24:22 -07:00
Frank Praznik b45ed98ae9
Fix spelling mistake in documentation 2025-03-25 12:39:34 -04:00
Frank Praznik 716e33f106 x11: Send the _XWAYLAND_MAY_GRAB_KEYBOARD message when grabbing the keyboard
GNOME requires this to allow keyboard grabs on XWayland. Otherwise, XGrabKeyboard will still report success, but shortcuts won't be inhibited.

See 5f132f3975
2025-03-25 12:35:34 -04:00
SDL Wiki Bot a5633ad0fb Sync SDL3 wiki -> header
[ci skip]
2025-03-25 15:04:30 +00:00
Rémy Tassoux 6cc00a31b6
WindowProgressState API getters and fixes (#12629) 2025-03-25 08:03:32 -07:00
Frank Praznik b520cde18f cocoa: Properly set the pending fullscreen spaces state when in a transition 2025-03-24 23:23:32 -04:00
Carl Åstholm dd9b9d4513 Check if GL_OES_EGL_image_external is supported before trying to use it 2025-03-24 19:52:13 -07:00
Carl Åstholm 7ec13a2ead Document SDL_malloc alignment guarantees 2025-03-24 19:10:31 -07:00
Ryan C. Gordon ae17b04c0d
alsa: Don't start the hardware until the device thread is ready to do work.
Otherwise, in the time it takes the thread to start and other init tasks to
complete, we tend to get an underrun on some systems, which ALSA logs to
stderr.

So this is moved to an InitThread implementation, which runs from the device
thread, right before it begins its main loop.

Reference PR #12632.
2025-03-24 19:41:26 -04:00
Ryan C. Gordon 41636959d2
audio: Feed output devices immediately, instead of waiting upfront.
This prevents the waste of an initial buffer of audio on many backends, and is
hopefully harmless on all of them.

Reference PR #12632.
2025-03-24 19:41:26 -04:00
Ryan C. Gordon 48d4104ecb
pulseaudio: Fixed typo in commented-out debug logging. 2025-03-24 19:41:26 -04:00
Frank Praznik 8cb303126f
wayland: Fix global mouse position retrieval 2025-03-24 19:06:05 -04:00
Sam Lantinga d6f137b2be Added a note to tag the wiki when doing feature releases
Fixes https://github.com/libsdl-org/SDL/issues/12618
2025-03-24 11:45:20 -07:00
Anonymous Maarten 7f927de1fc x11: remove 'args' and 'ret' from SDL_X11_SYM macro
X11 vararg functions don't extra handling anymore.
2025-03-24 14:32:28 -04:00
Sam Lantinga b6ca03611f Fixed mixed trigger and body rumble for Xbox controllers on Windows
Fixes https://github.com/libsdl-org/SDL/issues/12095
2025-03-24 11:06:37 -07:00
Cameron Gutman c3a3a11db4 keyboard: Don't check text input on a null window 2025-03-23 23:51:46 -05:00
Petar Popovic 035d9179a5 WIN_SetWindowProgressState(): Unsupported parameter error message 2025-03-23 10:32:19 -07:00
Petar Popovic c217663fba SDL_SetWindowProgressState(): Add parameter validation check for `state` 2025-03-23 10:00:27 -07:00
Sylvain 3fa1bd81fe Fixed previous commit renaming {add,remove}AudioDevice to native{Add,Remove}AudioDevice 2025-03-23 17:15:40 +01:00
SDL Wiki Bot b8381b3a2e Sync SDL3 wiki -> header
[ci skip]
2025-03-23 15:58:18 +00:00
Petar Popovic fa0a86409c Additions to progress bar comments 2025-03-23 08:57:22 -07:00
Petar Popovic 721476033c SDL_SetWindowProgressValue(): Move value clamp from `WIN_SetWindowProgressValue()` to `SDL_SetWindowProgressValue()` 2025-03-23 08:56:18 -07:00
Sam Lantinga 69ad66b017 Fixed error messages in GetTaskbarList() 2025-03-23 07:58:03 -07:00
Petar Popovic a3be7a137a WIN_SetWindowProgressValue(): Fix value clamp 2025-03-23 07:51:49 -07:00
Sylvain 0177838353 Native functions renamed: {add,remove}AudioDevice to native{Add,Remove}AudioDevice 2025-03-23 15:25:33 +01:00
Sylvain 6e875397f5 Proguard: remove onNativePen 2025-03-23 15:25:33 +01:00
Frank Praznik 027df89ed3
wayland: Scale accelerated relative pointer coordinates with emulated resolutions
The accelerated relative coordinates are always relative to the desktop resolution, and need to be scaled with emulated fullscreen resolutions for mouse movement to remain stable. Otherwise, pointer speeds will be too fast on emulated resolutions below the desktop resolution, and too slow on those above.
2025-03-22 14:35:39 -04:00
expikr f52f982b1e chore: rename integer mode field names 2025-03-22 09:32:49 -07:00
SDL Wiki Bot 8407a16255 Sync SDL3 wiki -> header
[ci skip]
2025-03-22 15:05:04 +00:00
Rémy Tassoux 7a10fcdccc
Add progress bar support for Windows (#12530) 2025-03-22 08:04:10 -07:00
Sam Lantinga 6b13d69105 Improve move/resize visual smoothness on Windows
Fixes https://github.com/libsdl-org/SDL/issues/12528
2025-03-21 16:46:25 -07:00
Marcin Serwin 4fcef9074b audio: hold floating point exceptions when using neon 2025-03-21 15:08:31 -07:00
Frank Praznik b493e29a81
x11: Fix backwards _NET_WM_SYNC_REQUEST init check 2025-03-21 15:32:54 -04:00
Sam Lantinga 2fbb583290 SDL_ClaimWindowForGPUDevice() should fail for transparent windows
The GPU API doesn't currently support transparent windows (transparent swapchain effects doesn't seem possible on D3D12) so we should explicitly fail so users don't expect transparency and then not get it.

Fixes https://github.com/libsdl-org/SDL/issues/12410
2025-03-21 12:14:20 -07:00
Frank Praznik bde49abdb7 GPU: Support swapchain buffer transparency in Vulkan
If the window is flagged with SDL_WINDOW_TRANSPARENT, create the associated swapchain with a composite alpha value that supports blending, if available.

Fixes transparent windows on the Vulkan backend, and prevents possible validation errors by ensuring that the composite alpha value is always a valid bit in VkSurfaceCapabilitiesKHR::supportedCompositeAlpha.
2025-03-21 11:53:32 -07:00
Frank Praznik 79081a178f
cocoa: Fix zoom check when leaving fullscreen
Non-resizable windows will always report as zoomed, so isZoomed is not a reliable check here.
2025-03-21 14:43:17 -04:00
Frank Praznik 03cdd297e0 video: Fix boolean logic for getting the pending window position 2025-03-21 13:47:38 -04:00
Sam Lantinga fbdb637978 Fixed build when virtual joysticks are disabled 2025-03-21 07:34:57 -07:00
Sam Lantinga 758eb256b9 Fixed DebugLogRenderCommands() output 2025-03-20 21:24:39 -07:00