Commit Graph

19469 Commits

Author SHA1 Message Date
Ryan C. Gordon
e6a7121904 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.

(cherry picked from commit f2ae6503c0)
2025-07-15 06:44:12 -04:00
Sam Lantinga
a6ed8ab59d Updated to version 3.2.19 for development 2025-07-14 11:44:22 -07:00
Sam Lantinga
bd40d0ded1 Removed the Mayflash GameCube adapter from the PS3 controller list
(cherry picked from commit 277f91c317)
2025-07-14 11:30:46 -07:00
Andon M. Coleman
68bfcb6c54 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.

(cherry picked from commit a07cf3ecdc)
release-3.2.18
2025-07-14 10:02:46 -07:00
Josh Dowell
0d01efca52 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)
(cherry picked from commit 0a50b798bf)
2025-07-13 20:10:26 -07:00
Kyle Sylvestre
0e65e04ce1 remove spoofed SDL_HelperWindow when SDL_VIDEO is off
(cherry picked from commit 0f061ff154)
2025-07-12 07:48:56 -07:00
Kyle Sylvestre
58d351fe98 check SDL_PLATFORM_WINDOWS instead of SDL_VIDEO_DRIVER_WINDOWS when using SDL_HelperWindow
(cherry picked from commit d42217ba26)
2025-07-12 07:48:56 -07:00
Kyle Sylvestre
9b71f18141 move SDL_HelperWindow outside of video
move to SDL_window.c to prevent relying on SDL_VIDEO

(cherry picked from commit a190e3b514)
2025-07-12 07:48:56 -07:00
Anonymous Maarten
554f08bac3 ci: build MSVC release binary on windows-2025 2025-07-12 01:25:08 +02:00
Sam Lantinga
913813a933 Updated to version 3.2.18 for release 2025-07-11 15:56:55 -07:00
Ryan C. Gordon
4e34c771e4 Revert "windows: Use wglSwapLayerBuffers if available."
This reverts commit b8ee44ca6a.

This is reverting a cherry-pick. It's probably too risky for a 3.2.x release,
but we'll let it marinate on main, for 3.4.0.
2025-07-11 18:25:14 -04:00
Ryan C. Gordon
9995174e68 gpu: Fixed uninitialized variable in SDL_AcquireGPUCommandBuffer().
Fixes #13191.

(cherry picked from commit 190afc0f4f)
2025-07-11 18:23:15 -04:00
Ryan C. Gordon
5a0197d430 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.

(cherry picked from commit a81cf566f4)
2025-07-11 18:23:01 -04:00
Sam Lantinga
4a55143e15 Fixed build
(cherry picked from commit 92e8224d32)
2025-07-11 14:12:27 -07:00
Sam Lantinga
87c9bc1b1f Fixed long delay when enumerating the Razer Huntsman keyboard
Fixes https://github.com/libsdl-org/SDL/issues/13236

(cherry picked from commit 0b2e389ee3)
2025-07-11 14:12:27 -07:00
Sam Lantinga
16a57b70f7 Set hwndTarget to NULL when unregistering raw input
Fixes https://github.com/libsdl-org/SDL/issues/13335

(cherry picked from commit 937e8d55a4)
2025-07-11 12:14:50 -07:00
Aleksey Sakovets
69564cd0b1 README-macos.md: replace old API calls
(cherry picked from commit 6386781351)
2025-07-11 12:08:58 -07:00
Ryan C. Gordon
da648b00e7 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.

(cherry picked from commit 9af93abd4f)
2025-07-11 15:06:10 -04:00
Sam Lantinga
5886d90308 Fixed long delay when enumerating the Razer Huntsman keyboard
Fixes https://github.com/libsdl-org/SDL/issues/13236

(cherry picked from commit f199aafaeb)
2025-07-11 11:56:06 -07:00
Ryan C. Gordon
e84df0cad1 x11: Avoid duplicate mouse events when using a pen device.
Fixes #12968.

(cherry picked from commit 72f4dd17be)
2025-07-11 14:31:07 -04:00
Frank Praznik
e482904111 Add support for non-constrained and non-grabbing popups
By default, popups are automatically constrained to be completely within display bounds, so as not to cut off information and result in an unusable menu, or unreadable tooltip. In some cases, however, this is not wanted, so a property to toggle this behavior is added.

There are also cases where the client may not want a popup menu to implicitly grab the keyboard focus, as is the default behavior, so popup menus now respect the focusable flag/property, as well as being able to toggle focus grabbing via SDL_SetWindowFocusable().

(cherry picked from commit b871ac0d97)
2025-07-11 14:26:51 -04:00
Ryan C. Gordon
b8ee44ca6a 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.

(cherry picked from commit f286558bae)
2025-07-11 13:25:18 -04:00
Anonymous Maarten
4a4abe4240 cmake: remove /RTC1 from CXX flags when building with SDL_LIBC=OFF
(cherry picked from commit cfb8e591cb)
2025-07-11 10:00:22 -07:00
Wouter Wijsman
fe47f5cc30 PSP: Truncate thread name when passing to sceKernelCreateThread
(cherry picked from commit c64518f300)
2025-07-11 10:00:07 -07:00
Ryan C. Gordon
5b64be0810 docs: Documentation for SDL_Swap64 was reporting the wrong return type.
Fixes #13309.

(cherry picked from commit 530639aa4a)
2025-07-11 09:59:13 -07:00
Ryan C. Gordon
17656d051b cocoa: Don't use trick of briefly focusing the Dock on newer macOS releases.
On newer systems, the trick isn't necessary, and if you do it, if the user is
moving the mouse when launching the app, it'll show a hidden Dock.

Fixes #10340.

(cherry picked from commit 279dabfc96)
2025-07-10 15:54:25 -04:00
Ozkan Sezer
233fce456a 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)
(cherry picked from commit fb0e03f262)
2025-07-09 01:32:00 +03:00
Frank Praznik
5290bb036c 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.

(cherry picked from commit ecdc6f2adb)
2025-07-05 12:10:28 -04:00
WillyJL
2bff72b4f6 SDL3 GPU: Fix -Wbool-conversion warnings
(cherry picked from commit 4eff36ef53)
2025-06-29 13:33:56 -04:00
Anonymous Maarten
08ebeaee5c cmake: Android always needs a native HIDAPI implementation
(cherry picked from commit 89eef1bd34)
2025-06-26 15:43:29 -07:00
Caleb Heuer
12b56f5447 Allow overriding SDL_FORK_MESSAGEBOX in build environment
(cherry picked from commit cd98b66114)
2025-06-26 10:49:48 -07:00
Frank Praznik
165b86e7b7 x11: Always update the borders on frame extent events
Always update the border sizes on frame extent events, or they can incorrectly still be zero if followed by a PropertyNotify event when leaving fullscreen.

Fixes sending the correct restored window size when leaving fullscreen in fvwm.

(cherry picked from commit 0ac1241b7a)
2025-06-26 11:53:32 -04:00
Sam Lantinga
608101a185 Update the viewport when logical presentation changes
Fixes https://github.com/libsdl-org/SDL/issues/13256

(cherry picked from commit 727b4924c8)
2025-06-25 09:59:13 -07:00
Paul Vick
554bee6aae Fix #13276: Crash in SDL_GetAudioDeviceChannelMap
(cherry picked from commit de6a23028a)
2025-06-25 09:59:07 -07:00
Rémi Verschelde
3e0ce51067 joystick: Fix MSVC errors C2099 with /fp:strict
(cherry picked from commit db3a35e9bc)
2025-06-24 07:32:26 -07:00
Ozkan Sezer
7261c43342 alsa: change an SDL_LogError into SDL_LogDebug.
it is informational only and seeing ERROR on the terminal was confusing

(cherry picked from commit af8bee2dd1)
2025-06-22 21:05:10 -07:00
Marcin Serwin
ad57c6ea37 test: Fix resource paths in testtray
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit bbc674b9e7)
2025-06-22 21:03:55 -07:00
mitchellcairns
caecff650d Resolve bug for calibration Nintendo Switch Pro Controller (#13260)
Resolves a bug which prevents the stored calibration data from loading, only allowing loading of factory-installed calibration data

(cherry picked from commit 796961acec)
2025-06-22 21:00:01 -07:00
Mitch Cairns
f6300be4b2 Fixed Nintendo Switch thumbstick calibration
(cherry picked from commit 3a6f9e01f8)
2025-06-22 15:27:30 -07:00
Sam Lantinga
bde5687a3c Fixed Nintendo Switch Pro thumbstick calibration
Fixes https://github.com/libsdl-org/SDL/issues/13246

(cherry picked from commit 038a3806eb)
2025-06-21 19:57:04 -07:00
Sam Lantinga
0f3504f78d Updated testffmpeg for ffmpeg 7.1
(cherry picked from commit e6c2649afc)
2025-06-21 08:49:43 -07:00
Sam Lantinga
0aaa0321cc Fixed warning C5286: implicit conversion from enum type 'VkFilter' to enum type 'SDL_ScaleMode' 2025-06-21 07:41:20 -07:00
Josh Dowell
caaaf52583 win32: Invalidate window message mouse button flags when reading buttons from raw input or GameInput
SDL2 would set a high bit in the mouse button flags to indicate when raw input had been read from, without this, if you hold down a mouse button and left raw input mode (leaving relative mode) the button would remain partially stuck, and would require two clicks to start producing mouse down events again.
SDL3's raw input code was refactored to not use the mouse button flags, but forgot to invalidate the flags, causing this bug to manifest.

(cherry picked from commit 6aedc488d3)
2025-06-21 07:29:05 -07:00
Ozkan Sezer
56449f167d hidapi/libusb: disable C5287 warning in MSVC builds
A quick search implies that it is a bogus warning:
https://www.google.com/search?q=visual+studio+C5287

(cherry picked from commit 81e3066303)
2025-06-21 07:16:36 -07:00
Ryan C. Gordon
c7325228dc audio: Enumerating audio devices will skip zombie devices still in the hash.
(cherry picked from commit eb04219efe)
2025-06-20 14:49:32 -07:00
Sam Lantinga
079967afa5 Clarify that SDL_GetAudioStreamDevice() returns the logical device.
(cherry picked from commit c19ad189dc)
2025-06-20 14:01:32 -07:00
Lilian Gimenez
2ed55b614c Fix support for F21 to F24 scancodes on Linux
(cherry picked from commit e4e29b8601)
2025-06-20 09:07:27 -07:00
Frank Praznik
28721e3cd2 test: Fix a window parenting bug in testmodal
(cherry picked from commit 390fe65323)
2025-06-18 09:27:03 -04:00
Frank Praznik
9d9845d063 video: Explicitly disallow setting the parent of a window to itself
Doing so causes a cycle in the window hierarchy tree graph, which leads to infinite recursion when destroying the windows.

(cherry picked from commit ca9b7c8ea3)
2025-06-18 09:27:03 -04:00
ceski
a96dc76831 Read Switch controller gyro/accel sensitivity coeffs (SDL3)
These vary by controller, so using the stored values should improve the accuracy of the sensor data.

(cherry picked from commit 558a89fdb6)
2025-06-13 12:18:43 -07:00