Commit Graph

20206 Commits

Author SHA1 Message Date
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
Susko3
923813b399 Disable SDL_DYNAMIC_API when using ReSharper 2025-06-29 12:37:56 -04:00
Ryan C. Gordon
4217d62fa2 Some small fixes and corrections: comment typos, a wrong return value.
Just a few things I stumbled upon this week.
2025-06-29 03:07:51 -04:00
SDL Wiki Bot
34928341d0 Sync SDL3 wiki -> header
[ci skip]
2025-06-28 12:31:32 +00:00
Aubrey Hesselgren
e960bf6904 Gyro instrumentation for test controller (#13287)
This adds several minor changes to the gyro instruments.

* The HID Sensor Time display is now throttled to 10hz.
* Calibration for the gyro is now time based, not sample count based. Different polling rates will have drift calibrated over the same space of time.
* Pitch/Yaw/Roll readout: Yaw is prioritized, and then pitch, and then roll. This gives a more human-readable pitch/yaw/roll display, closely matching game engines.
* Pitch/Yaw/Roll text is colorized to match the axes in the 3D gizmo.
* Added set of axes to the 3D gizmo to show the "Left Hand Space" positive axis directions.
2025-06-26 19:56:06 -07:00
Anonymous Maarten
89eef1bd34 cmake: Android always needs a native HIDAPI implementation 2025-06-26 22:34:30 +00:00
Ryan C. Gordon
279dabfc96 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.
2025-06-26 14:24:53 -04:00
Sam Lantinga
afa27243df Ignore sensor delta values that look like they're out of range 2025-06-26 11:10:21 -07:00
Caleb Heuer
cd98b66114 Allow overriding SDL_FORK_MESSAGEBOX in build environment 2025-06-26 10:49:31 -07:00
Sam Lantinga
8d5bf053f7 Fixed detecting 8BitDo sensor timestamp on older firmware
Also updated the reported sensor rate over USB for new firmware
2025-06-26 10:47:35 -07:00
Frank Praznik
0ac1241b7a 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.
2025-06-26 11:52:43 -04:00
Sam Lantinga
f40bf44928 Removed unnecessary include 2025-06-25 18:50:28 -07:00
8BitDo
6d3e8b749e add 8BitDo Controller sensor_timestamp (#13278) 2025-06-25 18:49:43 -07:00
Sam Lantinga
727b4924c8 Update the viewport when logical presentation changes
Fixes https://github.com/libsdl-org/SDL/issues/13256
2025-06-25 09:58:30 -07:00
Paul Vick
de6a23028a Fix #13276: Crash in SDL_GetAudioDeviceChannelMap 2025-06-25 07:47:55 -04:00
Vicki Pfau
8442d4f0f7 joystick: Add support Xbox Adaptive Controller
The Xbox Adaptive Controller reports the pressed guide button state as 2
instead of 1. This is contrary to the spec, but it's needed for the guide
button to work.

This also adds a bit more documentation on observed-but-not-known GUIDs.
2025-06-24 16:51:18 -07:00
Petar Popovic
3cd979b353 SDL_render.h: enum SDL_TextureAddressMode: Removed trailing comma 2025-06-24 21:56:20 +03:00