Commit Graph
12074 Commits
Author SHA1 Message Date
Sam Lantinga 7c8df4ea52 Fixed warnings building with Visual Studio 2025-08-30 10:15:58 -07:00
Sam Lantinga 3cf2350f21 Fixed build 2025-08-30 10:15:32 -07:00
Jordan Saunders 265236d952 Fix two uninitialized variables
Found when running in valgrind looking at another issue.

- RenderPass' depth_stencil_target
    Tripped in SDL_BindGPUFragmentSamplers when not binding a DS target

- VulkanCommandBuffer's swapchainRequested
    Tripped in VULKAN_Submit for the end transition barrier when
    creating an image. The field is only reset when reused, not on first
    use
2025-08-30 06:05:22 -07:00
Frank Praznik fdfde42db1 fs: Fix OpenBSD path retrieval
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Set the path start pointer to point to a valid string.
2025-08-29 19:03:44 -04:00
Frank Praznik 1049426a76 wayland: Add a sigtimedwait() implementation for OpenBSD
sigtimedwait() is an optional part of POSIX.1-2001, and OpenBSD doesn't implement it. Add a replacement implementation based on https://comp.unix.programmer.narkive.com/rEDH0sPT/sigtimedwait-implementation
2025-08-29 18:32:29 -04:00
Vicki Pfau 184f6fa231 switch2: Read calibration data 2025-08-29 05:46:19 -07:00
William Horvath d15e531bad dialog: Fix compilation with pre-Vista headers.
Closes #13823
2025-08-29 05:26:01 -07:00
Sam Lantinga fa52949529 Added a note that we dynamically load libusb 2025-08-28 09:13:01 -07:00
Sam Lantinga 1a653f7f89 Exported SDL_hid_get_properties() 2025-08-28 09:13:01 -07:00
Sam Lantinga ac5ccbe386 Moved Nintendo Switch 2 Controller initialization from hid.c to SDL_hidapi_switch2.c 2025-08-28 09:10:47 -07:00
Sam Lantinga 65c1fc1b42 Added SDL_hid_get_properties() 2025-08-28 09:10:47 -07:00
Sam Lantinga 09ca7e8f64 Move libusb support into a shared location 2025-08-28 09:10:47 -07:00
Sam Lantinga cdae0d10d1 Fixed button mapping for the Nintendo Switch 2 Pro Controller 2025-08-28 09:10:47 -07:00
Sam Lantinga fb9fcfa37b Fixed controller name when hotplugging the Nintendo Switch 2 Pro Controller 2025-08-28 09:10:47 -07:00
Sam Lantinga 2bb51e1340 Claim the interface before doing bulk transfers 2025-08-28 09:10:47 -07:00
Ethan Lee a798da2ec7 hidapi: Add support for NSO GameCube controller via libusb.
Thanks to Nohzockt for the initial libusb init and hidapi polling work!
2025-08-28 09:10:47 -07:00
Ethan Lee efea62ed61 hidapi: Add a stub driver for Switch 2.
Thanks to kiddkaffeine for the Xcode updates!
2025-08-28 09:10:47 -07:00
Frank Praznik 5972b5295d video: Don't attempt to reconfigure external windows 2025-08-28 12:08:49 -04:00
Frank Praznik 78bea90b18 wayland: Remove an unnecessary surface commit
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-08-28 10:01:53 -04:00
wankey 6176235a90 fix wrong index in HandleStatePacket with flydigi controller (#13819) 2025-08-28 04:08:54 -07:00
Anonymous Maarten 625a8335b5 Don't compile helper function when building without audio/video/joystick support 2025-08-27 23:19:50 +02:00
Anonymous Maarten c50e4b22ab dlopennot: ngage's g++ compiler does not support variadic macros 2025-08-27 18:53:35 +02:00
Frank Praznik a904af1b43 tray: Save icons on *nix platforms to PNG instead of BMP
PNG has better compatibility with certain desktops.

This requires the stb_image_write header for PNG writing functionality.
2025-08-27 09:20:42 -07:00
Sam Lantinga 285df94623 Renamed SDL_GPURenderStateDesc to SDL_GPURenderStateCreateInfo for consistency with GPU API conventions
Fixes https://github.com/libsdl-org/SDL/issues/12817
2025-08-27 09:14:19 -07:00
Anonymous Maarten 0a6b80717c Record dynamic dependencies in .note.dlopen elf section 2025-08-27 16:11:39 +00:00
Frank Praznik 152ba829a1 video: Try to reconfigure the window for OpenGL without destroying it
When attaching a renderer (GL based specifically) to a window that was not created with the appropriate flags, the window would be destroyed and recreated to configure it for the desired rendering backend. While most of the issues with this have been mitigated over time, there can still be some undesirable side effects from doing so on certain platforms.

If the window was just created and was never configured for any graphics context, it is possible that the reconfiguration can be done without destroying the window first.

The Wayland implementation fixes an issue when creating a window with the fullscreen flag on wlroots based Wayland compositors, and can likely be extended to other platforms to avoid unnecessarily destroying/recreating a window in the very common case where a window is created, followed immediately by attaching a renderer.
2025-08-27 12:10:48 -04:00
Sam Lantinga da6e9bbf7c Allow building the tray subsystem without the video subsystem
Fixes https://github.com/libsdl-org/SDL/issues/13235
2025-08-27 08:15:24 -07:00
Sam Lantinga 42f634ff7a Added SDL_AddAtomicU32()
Fixes https://github.com/libsdl-org/SDL/issues/13496
2025-08-27 06:44:51 -07:00
Jaan Soulier 0bbdd86b86 Fix device suitability checks in Vulkan GPU backend to always adhere to priority arrays 2025-08-27 05:15:24 -07:00
Sam Lantinga 5291e9bbbd Minor cleanup
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-08-26 19:28:59 -07:00
Frank Praznik 5a06ef5c8f keyboard: Don't clear the keymap when it is set to auto release
Don't unset the keymap when it is set to auto release, or it will infinitely recurse.
2025-08-26 22:16:21 -04:00
takase1121 95c44dcdc3 process(windows): fallback to GenerateConsoleCtrlEvent and TerminateProcess if necessary 2025-08-26 17:01:37 -07:00
takase1121 c709b8ed98 process(windows): try sending WM_CLOSE for graceful process termination 2025-08-26 17:01:37 -07:00
Semphris 355c001a54 Implement IFileDialog for Windows 2025-08-26 16:48:08 -07:00
Frank Praznik 6516f7a9e8 keyboard: Release bound keymaps during the destruction process
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
If a bound keymap is being destroyed, unbind it to ensure that the keyboard state won't be left pointing to an invalid keymap. Backends now no longer need to manually do this when destroying keymaps during keyboard removal and shutdown.
2025-08-26 12:56:29 -04:00
Frank Praznik f53f054fd6 x11: Enable the relative mouse system scale hint.
Use the scaled motion values if the relative system scale hint is set, and a custom transformation function is not set.
2025-08-26 11:55:02 -04:00
Sam Lantinga 065fdca953 Disable rumble for the Ultimate 2 Wireless Controller in dongle mode
The dongle appears to stop sending input reports with some combination of rumble patterns, easily reproduced with Forza Horizon 5. We'll disable rumble temporarily until @8BitDo can investigate.
2025-08-26 08:39:00 -07:00
Sam Lantinga 66ab91a314 Added SDL_FLIP_HORIZONTAL_AND_VERTICAL
Closes https://github.com/libsdl-org/SDL/pull/13788
2025-08-26 05:50:51 -07:00
Nintorch 1fbed16cb0 Add Emscripten joystick rumble support
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Adds support for Emscripten (Web) joystick rumble support via EM_ASM_INT macros and HTML5's Gamepad API.
2025-08-25 12:58:59 -07:00
Sam Lantinga b13416d74f Fixed relative motion having desktop mouse scale on Wayland
Fixes https://github.com/libsdl-org/SDL/issues/13753
2025-08-25 11:47:56 -07:00
Merlyn Morgan-Graham 385715c0dd Introduce enum for SDL_GetCameraPermissionState result 2025-08-25 14:43:31 -04:00
Colin Kinloch 5be08481e1 dialog: Print DBus errors where available 2025-08-25 11:35:47 -07:00
Colin Kinloch c79a18d0fa dialog: Fix save file chooser with xdg portal
This correctly sets the xdg portal fields for targeting a specific
new filename or existing file.

"current_name" sets the dialogs placeholder name.
"current_file" targets an existing file.
"current_folder" for when the target is a folder.
2025-08-25 11:35:47 -07:00
Nintorch 1af7dfb0a7 Allow Android to ignore unnecessary joysticks
Previously, SDL_ShouldIgnoreJoystick wasn't being called for Android, and fingerprint sensors were recognized as joysticks.
2025-08-25 11:23:14 -07:00
Ryan C. Gordon 8f04e4af00 audio: Clean out all the bitshifting.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Hide the implementation details in something human-readable.
2025-08-25 13:10:51 -04:00
Ryan C. Gordon 01d94ca9de audio: Renamed device_hash_lock to subsystem_rwlock.
It protects more than the device hashes!
2025-08-25 13:10:51 -04:00
Ryan C. Gordon 226fecff78 audio: Split current_audio.device_hash into two separate hashtables.
One for physical devices, one for logical devices.

Fixes #13032.
2025-08-25 13:10:51 -04:00
Sam Lantinga 7bbbbb3a1c Fixed build 2025-08-25 09:45:39 -07:00
Sam Lantinga aab95894a6 Fixed crash if mouse functions are used after video quit 2025-08-25 08:54:43 -07:00
ceski 270737584e Fix vsync-off support for direct3d11
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-08-24 21:33:02 +03:00