Commit Graph

20222 Commits

Author SHA1 Message Date
Sam Lantinga
1b65f25465 testcontroller: use the correct label for face buttons 2025-07-15 15:52:40 -07:00
Sam Lantinga
08e3758e3f Added paddle bindings for the 8BitDo Pro 3 controller 2025-07-15 10:15:52 -07:00
Sam Lantinga
d53fcab609 Reordered the 8BitDo Pro 3 controller 2025-07-15 10:09:06 -07:00
Ryan C. Gordon
f2ae6503c0 audio: Binding an SDL_AudioStream will set missing formats.
It _must_ have the format set for the opposite side from the device (so
playback needs the src format set, and recording needs the dst format set),
since the stream gets mangled by the device thread if not. So if it has never
been set (stream created with NULL audiospec), just set it to match the device.
If the stream is just meant to buffer and not convert, this is desired
behavior, even if it didn't also fix a bug.

Binding the audio stream will always set the device side's format, as usual;
this does not need to be set by the caller at all.

Fixes #13363.
2025-07-15 06:40:09 -04:00
8BitDo
3c04c88c6e Add support for Pro3
Add support for Pro3
2025-07-15 03:26:08 -07:00
SDL Wiki Bot
d5efb11f97 Sync SDL3 wiki -> header
[ci skip]
2025-07-14 23:50:35 +00:00
Ryan C. Gordon
10004ab0ea hints: Added SDL_HINT_LOG_BACKENDS.
Fixes #13354.
2025-07-14 19:49:38 -04:00
Sam Lantinga
277f91c317 Removed the Mayflash GameCube adapter from the PS3 controller list 2025-07-14 11:30:15 -07:00
Andon M. Coleman
a07cf3ecdc Allow 1 kHz sample rate for DualSense Edge over USB
DualSense Edge natively reports at 1 kHz for all connection types, but gyro sample rate was limited to 250 Hz for USB.
2025-07-14 10:02:19 -07:00
Josh Dowell
0a50b798bf windows: Fix crash when using a system that reports itself as Windows 17763 or newer, but is missing many of the newer dark mode window functions (Linux Mint Cinnamon w/ Proton 7.0.6) 2025-07-13 20:08:47 -07:00
Ryan C. Gordon
2d8fd6bee1 Revert "windows: Use wglSwapLayerBuffers if available."
This reverts commit f286558bae.
2025-07-13 21:40:42 -04:00
Ryan C. Gordon
536126fdcf emscripten: Move over to using Pointer Events for all mouse, pen, and touch.
This allows us to avoid browser mouse emulation for touches, since we provide
our own anyhow.

The other option is to "prevent default" in the legacy touch event handlers we
historically used, to tell the browser not to supply emulation, but we can't
currently tell Emscripten to mark those handlers as not "passive," so as it
stands they are unable to prevent default. Using Pointer Events bypasses this
problem entirely.

Fixes #13161.
2025-07-13 16:06:03 -04:00
Kyle Sylvestre
0f061ff154 remove spoofed SDL_HelperWindow when SDL_VIDEO is off 2025-07-12 07:47:13 -07:00
Kyle Sylvestre
d42217ba26 check SDL_PLATFORM_WINDOWS instead of SDL_VIDEO_DRIVER_WINDOWS when using SDL_HelperWindow 2025-07-12 07:47:13 -07:00
Kyle Sylvestre
a190e3b514 move SDL_HelperWindow outside of video
move to SDL_window.c to prevent relying on SDL_VIDEO
2025-07-12 07:47:13 -07:00
Anonymous Maarten
5e787555e8 ci: build MSVC release binary on windows-2025
(cherry picked from commit 554f08bac3)
2025-07-12 01:54:05 +02:00
Ryan C. Gordon
190afc0f4f gpu: Fixed uninitialized variable in SDL_AcquireGPUCommandBuffer().
Fixes #13191.
2025-07-11 18:18:47 -04:00
Ryan C. Gordon
a81cf566f4 wasapi: Force enumerated audio devices to report themselves as float32 format.
This is what they'll end up being when used through WASAPI in shared mode,
regardless of what the hardware actually expects.

Reference Issue #12914.
2025-07-11 16:10:47 -04:00
Sam Lantinga
92e8224d32 Fixed build 2025-07-11 13:05:37 -07:00
Sam Lantinga
0b2e389ee3 Fixed long delay when enumerating the Razer Huntsman keyboard
Fixes https://github.com/libsdl-org/SDL/issues/13236
2025-07-11 12:34:14 -07:00
Sam Lantinga
937e8d55a4 Set hwndTarget to NULL when unregistering raw input
Fixes https://github.com/libsdl-org/SDL/issues/13335
2025-07-11 12:14:36 -07:00
Ryan C. Gordon
9af93abd4f cocoa: Don't minimize fullscreen windows for a modal file dialog.
macOS sends a focus loss event when the dialog is created, which causes SDL
to try to minimize the window, which confuses the entire system. So in this
special case, don't do the minimization.

Fixes #13168.
2025-07-11 15:05:45 -04:00
Sam Lantinga
f199aafaeb Fixed long delay when enumerating the Razer Huntsman keyboard
Fixes https://github.com/libsdl-org/SDL/issues/13236
2025-07-11 11:55:46 -07:00
Ryan C. Gordon
72f4dd17be x11: Avoid duplicate mouse events when using a pen device.
Fixes #12968.
2025-07-11 14:27:12 -04:00
Ryan C. Gordon
a2dcdfcb2d stdinc: Docs said "macro" but meant "datatype." 2025-07-11 14:24:12 -04:00
SDL Wiki Bot
45cc80f02c Sync SDL3 wiki -> header
[ci skip]
2025-07-11 18:20:01 +00:00
Ryan C. Gordon
515433aa8a android: If various POSIX fsops functions fail, try using AAssetManager.
This specifically affects SDL_EnumerateDirectory and SDL_GetPathInfo. Android
assets are read-only, so no need to do this for things like
SDL_CreateDirectory, etc, and the POSIX SDL_CopyFile() uses SDL_IOStream
behind the scenes, which already supports Android assets.

Fixes #13050.
2025-07-11 14:16:18 -04:00
Ryan C. Gordon
f286558bae windows: Use wglSwapLayerBuffers if available.
It apparently works better (or can work better?) on multimonitor setups
than SwapBuffers.

This should be available back to Windows 95, but just in case, it falls
back to standard SwapBuffers if not available.

Fixes #13269.
2025-07-11 12:29:12 -04:00
Anonymous Maarten
cfb8e591cb cmake: remove /RTC1 from CXX flags when building with SDL_LIBC=OFF 2025-07-11 03:25:58 +02:00
Frank Praznik
11ec0c7a8f hashtable: Fix documentation typos 2025-07-09 12:38:16 -04:00
Wouter Wijsman
c64518f300 PSP: Truncate thread name when passing to sceKernelCreateThread 2025-07-09 17:11:26 +02:00
Ozkan Sezer
fb0e03f262 fix ARM64 linkage with Visual Studio >= 17.14 when SDL_LIBC is disabled
Reference issue:  https://github.com/libsdl-org/SDL/issues/13254

(cherry picked from commit 2fb6abb9ad)
2025-07-09 01:30:55 +03:00
Aleksey Sakovets
6386781351 README-macos.md: replace old API calls 2025-07-07 18:37:19 -04:00
Frank Praznik
ef4b7489ff wayland: Use wl_shm_release when available 2025-07-06 11:28:04 -04:00
Frank Praznik
03fcbb4e46 wayland/events: Names will always be sent before devices and capabilities
Wayland previously didn't specify that the seat name preceded the capabilities, but it is now specified that the name event must always come first. Remove the 'SDL_Set<device>Name()' functions that were only added to accommodate the case of compositors sending the name after the seat capabilities, as this clarification means that they are no longer needed.
2025-07-06 11:28:04 -04:00
Frank Praznik
45fa9dba16 wayland: Use wl_fixes for registry destruction 2025-07-06 11:28:04 -04:00
Frank Praznik
b9ab8cf03d wayland: Add support for the key repeat event (seat v10)
The internal key repeat mechanism already disables itself if the key repeat interval is 0, and SDL tracks and handles the flagging of repeated keys itself, so just map the 'repeated' event to 'pressed'.
2025-07-06 11:28:04 -04:00
Ryan C. Gordon
343ad3eddd ngage: SDL_GetPrefPath allows a NULL org parameter.
Reference Issue #13322.
2025-07-05 12:21:13 -04:00
Frank Praznik
ecdc6f2adb wayland: Ensure that the xdg_surface is always configured after creation
The spec states that xdg_surface must have seen an initial configure event before attaching a buffer, however, this was only being done when initially showing the window, and not after show->hide->show cycle.

Always wait for the initial configure event when (re)creating an xdg_surface as part of the show window sequence.
2025-07-05 12:09:17 -04:00
Michael Fitzmayer
7c11a8cb9f Fix typo: remove redundant character 2025-07-03 13:20:47 +02:00
Anonymous Maarten
f3bf387caf testhotplug+testmouse: exit when pressing ESC key 2025-07-03 02:21:51 +02:00
Michael Fitzmayer
03489e249a [Nokia N-Gage] Re-enable FPS counter, fix link in README.
- Re-enable FPS counter, which is hidden by default anyway - but essential while working on an actual project.
- Fix link in the platform's README.
- Re-order list of supported platforms (alphabetical order to maintain consistency).
2025-07-02 21:27:24 +02:00
Ryan C. Gordon
530639aa4a docs: Documentation for SDL_Swap64 was reporting the wrong return type.
Fixes #13309.
2025-07-02 09:29:40 -04:00
SDL Wiki Bot
2606b08036 Sync SDL3 wiki -> header
[ci skip]
2025-07-01 21:25:27 +00:00
nightmareci
380b6a43a3 Change callback_rate_increment type to Uint64 2025-07-01 13:31:39 -04:00
nightmareci
9e6a6c01e4 Add support for floating point main callback rates 2025-07-01 13:31:39 -04:00
Frank Praznik
06cfea6a03 wayland: Improve pointer confinement reliability
If the pointer should be confined, keep trying until a confine/lock signal is received. This considerably improves locking/confinement reliability on compositors where confining can be a racy operation, or may not take effect until the pointer is actually in the confinement region.

A pointer lock is used to special-case 1x1 confinement regions, as otherwise, the pointer can still exhibit jitter at the subpixel level, particularly on scaled desktops.
2025-07-01 13:01:09 -04:00
Frank Praznik
9ff0438863 wayland: Send motion events in a frame
Pointer events in seat version 5 and higher should be grouped and sent together when a pointer frame event occurs. Store pending pointer motion events and dispatch them together when a frame event is received.

This helps avoid spurious pointer motion events that some compositors generate with no associated frame (e.g. from some tablet events).
2025-07-01 13:01:09 -04:00
Piotr Usewicz
e9535fa026 Update SDL_GpuDevice to SDL_GPUDevice 2025-06-30 10:10:39 -04:00
WillyJL
4eff36ef53 SDL3 GPU: Fix -Wbool-conversion warnings 2025-06-29 13:32:21 -04:00