Commit Graph

20206 Commits

Author SHA1 Message Date
SDL Wiki Bot
39794ae9cd Sync SDL3 wiki -> header
[ci skip]
2025-07-30 03:13:02 +00:00
SDL Wiki Bot
d9b578312e Sync SDL3 wiki -> header
[ci skip]
2025-07-30 03:04:38 +00:00
Evan Hemsley
07af4b237b GPU: Fix incorrect block size when D3D12 uniform buffer is rotated (#13469) 2025-07-29 15:34:08 -07:00
Petar Popovic
f27dbb22f0 Fix two use-after-free warnings 2025-07-29 12:29:19 -07:00
Ryan C. Gordon
774c0b36ea android: Different approach to SDL_GetPathInfo() for assets.
Reference Issue #13050.
2025-07-29 12:15:25 -04:00
Petar Popovic
beea8d604e Replaced binary integer literals with hexadecimal integer literals 2025-07-29 06:34:38 -07:00
Vicki Pfau
5f4416bc42 joystick: Improve Xbox controller mapping with xpad quirks (#13305)
xpad has a series of questionable design choices when it comes to button
mapping. Notably, BTN_TRIGGER_HAPPY1-4 are used for the D-pad on dance mats
instead of the typical BTN_DPAD_*, and maps the paddles to
BTN_TRIGGER_HAPPY5-8. This commit plumbs through driver detection for a udev
device and adds special exceptions for xpad's quirks.

Newer kernels (6.17+) add the BTN_GRIP* mappings for paddles on controllers. We
should prefer that if available, as its meaning and mapping is unambiguous.
However, since it's only in new kernels, we need to maintain the older mappings
where we know they exist.

It also exposes KEY_RECORD as the share button regardless of vendor, which had
previously been gated behind being a Microsoft controller. All Xbox Series
controllers can include this button, and many third party ones do.
2025-07-28 20:03:51 -07:00
Sam Lantinga
25cf1a569c Map GameCube controller trigger clicks as misc3 and misc4
This is for consistency with the GC Ultimate controller and allows binding in Steam
2025-07-28 13:11:07 -07:00
SDL Wiki Bot
c8ebbb3e92 Sync SDL3 wiki -> header
[ci skip]
2025-07-28 18:58:19 +00:00
Xen
b3ba1c159e Update SDL_clipboard.h
Typo fixes and a small addition to SDL_SetClipboardData about mime_type list usage clarity.
2025-07-28 11:57:25 -07:00
Dan Andrus
30f0aeb26a Check NSWindow::isVisible before sending SDL_WINDOWEVENT_RESTORED during Cocoa_WindowListener::windowDidResize 2025-07-28 14:47:08 -04:00
Mitch Cairns
49b6bb50c9 Remove Unused Type 2025-07-28 11:05:44 -07:00
Mitch Cairns
2b0b794f86 SInput Generic Types
- Implements 'handheld' flag to indicate whether the SInput device is a gamepad or handheld (ROG Ally etc)
- Implements generic mapping fallback along with face style setting ability
2025-07-28 11:05:44 -07:00
eafton
d983a89241 Restyle message boxes and add icon support to them on X11. (#13267) 2025-07-28 09:23:38 -07:00
Petar Popovic
dc1bf60b15 SDL_waylanddatamanager.c:Wayland_data_offer_check_source(): Return when offer is NULL 2025-07-28 11:25:14 -04:00
Shootfast
507ee033cc Fixed typo in SDL_scancode.h
The backslash/vertical line key is between the left shift and "Z" key on ISO keyboards
2025-07-27 19:58:13 -07:00
Boris I. Bendovsky
d103e5531f Implement SDL_GL_GetAttribute for SDL_GL_FLOATBUFFERS 2025-07-27 19:55:30 -07:00
Ozkan Sezer
9c54d686aa arguably better wording.. 2025-07-27 20:00:02 +03:00
Brenton Bostick
ed4de7aeed Fix warning on Android arm-v7
Building SDL for armeabi-v7a gives this warning:
```
SDL/src/audio/SDL_audiotypecvt.c:541:14: warning: '#pragma FENV_ACCESS' is not supported on this target - ignored [-Wignored-pragmas]
  541 | #pragma STDC FENV_ACCESS ON
```
2025-07-27 08:15:44 -07:00
Brenton Bostick
f361034ac3 fix typos 2025-07-27 08:10:03 -07:00
SDL Wiki Bot
2ed1c35ca6 Sync SDL3 wiki -> header
[ci skip]
2025-07-26 21:11:11 +00:00
Petar Popovic
6a5af95364 SDL_gpu.c: Fixed deref-before-check warning 2025-07-26 12:08:23 -07:00
Petar Popovic
2c2c2c5a48 Fixed a few "-Wstrict-prototypes" warnings 2025-07-26 11:12:40 -07:00
Anonymous Maarten
e6d200e51c ci+n3ds: avoid apt-get package manager
- use Unix Makefiles (with parallelization) CMake generator
- use binutils strings binary from devkitpro
2025-07-26 15:38:08 +02:00
Sam Lantinga
72b7fd10b4 Fixed warning: 'break' will never be executed 2025-07-25 16:20:44 -07:00
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