Commit Graph

20231 Commits

Author SHA1 Message Date
Sam Lantinga
970234d62d Fixed documentation for aligned structure members 2025-07-25 13:33:49 -07:00
Frank Praznik
c8e2d13173 wayland: Fix the key level request layout parameter
Use the layout loop index instead of the current layout, which could be invalid if no layout event was received before the keymap event.

Fixes #13418
2025-07-25 10:09:55 -04:00
Ryan C. Gordon
c80d6954cb Revert "audio: Added SDL_SetAudioIterationCallbacks()."
This reverts commit 608f706a95.

Didn't end up using this in SDL3_mixer, and it's a super-awkward API if we
don't need it.

I _might_ bite the bullet and let people lock a physical audio device, though,
as I could see that being useful but less awkward for the same reasons I
originally wanted it.
2025-07-25 01:38:21 -04:00
Sam Lantinga
e5d57d8ad6 Fixed building with GameInput v1.0 2025-07-24 10:52:09 -07:00
Sam Lantinga
0ee0fe1572 Fixed building with GameInput v1.0 2025-07-24 10:42:28 -07:00
Sam Lantinga
66dad9c21f Added Steam Virtual Gamepad support to the GameInput driver 2025-07-24 10:36:09 -07:00
Sam Lantinga
6babade758 Fixed double SDL_EVENT_GAMEPAD_ADDED for controllers with automatic gamepad mappings 2025-07-24 10:36:09 -07:00
Sam Lantinga
3fdd15adaa Fixed double-release of GameInput at shutdown 2025-07-24 10:36:09 -07:00
SDL Wiki Bot
6b9dfcc2fd Sync SDL3 wiki -> header
[ci skip]
2025-07-24 15:52:42 +00:00
Ryan C. Gordon
39e9ac6d1f ci: Patched to compile on Android. 2025-07-23 23:53:46 -04:00
Ryan C. Gordon
f5a0222a8e aaudio: Try to select a more-useful microphone for recording.
Fixes #13402.
2025-07-23 22:38:28 -04:00
Frank Praznik
acb3b0b4be win32: Implement keymap caching
Keymap construction is an expensive process, so keymaps are cached to facilitate fast switching, as they are static after initial construction, and do not need to be rebuilt every time.
2025-07-23 11:48:27 -04:00
Aubrey Hesselgren
34616d1b00 A little more tidying. Better notes around how the absolute maximum threshold was arrived at. 2025-07-22 12:59:47 -07:00
Aubrey Hesselgren
8863e5ee67 Made the maximum noise during accelerometer noise profiling a define, in terms of "G"
Also removed a // comment which was causing the build to error.
2025-07-22 12:59:47 -07:00
Aubrey Hesselgren
6bfc54508c Accelerometer Tolerance is now calibrated before Gyro Drift. 2025-07-22 12:59:47 -07:00
Ryan C. Gordon
07ef532681 hints: Renamed SDL_HINT_LOG_BACKENDS to SDL_DEBUG_LOGGING.
This still logs backend choices, but we might use it for other things. For
example, what Android device is being used, or all the devices we enumerated,
etc.

Ideally this eventually logs all the stuff we often have to ask followup
questions about.
2025-07-22 13:19:30 -04:00
Ryan C. Gordon
af1c05fd58 filesystem: Check SDL_GetPrefPath parameters at the higher level.
...so the backends don't have to do it.

Also added a stern warning about `org` being omitted, but leaving it as
allowed so as not to break existing apps (more than they are already broken,
at least).

Fixes #13322.
2025-07-22 12:28:01 -04:00
Frank Praznik
279a50cc26 wayland: Fall-back to the compositor for fullscreen-desktop window placement
Only use the specified output if an exclusive mode is being used, or a position was explicitly requested before entering fullscreen desktop. Otherwise, let the compositor handle placement, as it has more information about where the window is and where it should go, especially if fullscreen was requested before the window was fully mapped, or the window spans multiple outputs.
2025-07-22 10:56:43 -04:00
L zard
ea995b1694 build_config_windows: define HAVE_STDARG/STDDEF_H outside of
condition.
They are defined in both `#if HAVE_LIBC` and its `#else` anyway.
[sdl-ci-filter msvc-*]
2025-07-21 14:44:23 -07:00
L zard
a977a11fa6 build_config_windows: fix HAVE_VSSCANF defined regardless of MSVC version.
[sdl-ci-filter msvc-*]
2025-07-21 14:44:23 -07:00
Ryan C. Gordon
27caa57695 dialog: Make sure we don't underflow a string in Cocoa backend.
Fixes #13014.
2025-07-21 16:02:42 -04:00
Anon Ymous
b2d152e51f dialog: fix default file name on Cocoa 2025-07-21 15:51:35 -04:00
Sam Lantinga
fc19ae343c Updated SDL_IsJoystickSInputController() to match style in file 2025-07-21 11:38:54 -07:00
Thomas Stehle
0eaf28ed4d Added test and test image for clamped texture address mode to render testautomation 2025-07-21 10:21:31 -07:00
Thomas Stehle
64b19fc504 Added missing handling of texture address mode to SDL render Vulkan backend 2025-07-21 10:21:31 -07:00
Sam Lantinga
86200d1203 Fixed clamp texture address mode in software renderer 2025-07-21 10:20:16 -07:00
SDL Wiki Bot
55e14a2ced Sync SDL3 wiki -> header
[ci skip]
2025-07-21 17:16:40 +00:00
Maia
08fd165dd2 Add POINTER suffix to SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC 2025-07-21 10:15:46 -07:00
mitchellcairns
4a30ee58ca Implement SInput Device Namings (#13391) 2025-07-21 10:08:27 -07:00
SDL Wiki Bot
b0b12b3b09 Sync SDL3 wiki -> header
[ci skip]
2025-07-21 16:55:47 +00:00
Semphris
47d8bdd1c3 Add SDL_IsTraySupported 2025-07-21 12:54:51 -04:00
Frank Praznik
735f0cc300 wayland: Handle text input per-seat
When changing the text input mode on a window, only update the seats that currently hold keyboard focus on that window, otherwise, text input might be inadvertently enabled or disabled on a seat focused on another window.
2025-07-19 10:08:56 -04:00
Acclution
8bd29f7ca3 GPU: Fix Vulkan compute uniform descriptor not being marked as set (#13389) 2025-07-18 15:27:31 -07:00
Frank Praznik
ce9c6e40fd wayland: Refactor keyboard layout handling
Build all the available keyboard layouts at once; this adds a negligible bit of overhead when initially handling the keymap (which was already significantly lowered by previous commits), but reduces the later cost of changing layouts to just swapping a pointer.

Additionally, handling of unknown keysyms, particularly when dealing with virtual keyboards, is improved, as keys generating valid Unicode values with no corresponding scancode will be dynamically added to the keymap with reserved scancodes, allowing for proper round-trip lookup behavior.
2025-07-18 12:22:03 -04:00
Frank Praznik
9c9bb9cec7 wayland: Only create/destroy the compose table when necessary
Initializing the compose table is a very expensive operation, and only necessary if the locale envvar changed, which is often not the case when just changing the keymap, so don't destroy and recreate it whenever the keymap changes. The state only needs to be reset in this case.
2025-07-18 12:22:03 -04:00
Frank Praznik
9b00f3a728 wayland: Optimize keymap creation
Iterate over the list of keys only once while assembling all related state for key levels and modifiers.
2025-07-18 12:22:03 -04:00
mitchellcairns
34d9db3657 SInput Serial MAC Fix (#13388)
* Resolve MAC address Order
2025-07-18 08:08:24 -07:00
Mitch Cairns
46ea7aa80e SInput Serial from MAC 2025-07-17 21:30:39 -07:00
Sam Lantinga
ad52ebf985 Fixed build 2025-07-17 20:56:41 -07:00
Sam Lantinga
e70ecb37c1 Implement the D-pad as a hat for SInput controllers
This lets games that use the joystick API handle the D-pad the same way as other controllers
2025-07-17 20:51:29 -07:00
Mitch Cairns
45674d0024 GC Ultimate Misc
Re-implement digital button press for GC Ultimate
(misc3:b12,misc4:b13)
2025-07-17 20:04:05 -07:00
Sam Lantinga
8f79a6185a Fixed the mapping for the GC Ultimate controller 2025-07-17 19:32:46 -07:00
Sam Lantinga
de20b731f2 Removed unnecessary cast 2025-07-17 19:32:29 -07:00
Sam Lantinga
ada44eaa10 testcontroller: reverted GameInput test code 2025-07-17 18:41:43 -07:00
Sam Lantinga
3b9db3dd62 Added support for Windows GameInput 2.0 2025-07-17 15:38:39 -07:00
SDL Wiki Bot
631aa697e6 Sync SDL3 wiki -> header
[ci skip]
2025-07-17 16:00:47 +00:00
Marcin Serwin
8451ce86c1 iostream: Add optional free_func pointer property to memory streams
Fixes https://github.com/libsdl-org/SDL/issues/13368

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-07-17 08:59:42 -07:00
BurntRanch
ee6d8f78f4 Clarify SDL_GPUVertexBufferDescription.pitch comment (#13381) 2025-07-17 08:53:35 -07:00
Sam Lantinga
855d28e97a Fixed crash if a clipboard event was sent with video uninitialized
This can happen if you're using SDL on Android without using the video subsystem.
2025-07-17 08:47:32 -07:00
Evan Hemsley
bc5c9a686c GPU: Clean up properties in SDL_ReleaseGPUTexture (#13378) 2025-07-17 00:21:34 -07:00