Commit Graph
1605 Commits
Author SHA1 Message Date
Cameron Gutman d07d39b0da atomic: Fix infinite recursion in SDL_CompilerBarrier() fallback
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
On some platforms, SDL_MemoryBarrierRelease() is defined to
SDL_CompilerBarrier(). If SDL_CompilerBarrier() is also defined to
the fallback spinlock acquire/release, then we will infinitely
recurse in SDL_UnlockSpinlock(). Avoid this by not unlocking the
temporary spinlock we create.
2026-04-27 19:53:10 -05:00
Cameron Gutman dd1e04eedf atomic: Use __atomic_signal_fence() for SDL_CompilerBarrier()
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This is the (slightly) more standard way to accomplish it.
2026-04-26 22:07:57 -05:00
Cameron Gutman 26616cd653 atomic: Fix memory barriers on MSVC ARM32/ARM64
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2026-04-24 20:22:25 -05:00
Cameron Gutman 7751494160 atomic: Use DMB ISHLD for aarch64 acquire barrier
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This is a little more efficient than a DMB ISH and matches what
GCC, Clang, and MSVC generate for a C++11 acquire fence.
2026-04-23 21:18:05 -05:00
Cameron Gutman c3b0e62850 atomic: Use __atomic_thread_fence() when available
This avoids requiring inline assembly for each architecture.

It also fixes some weakly ordered architectures which lacked
said inline assembly (RISC-V, MIPS, LoongArch, etc) and were
thus disasterously broken.
2026-04-23 18:59:40 -05:00
Ozkan Sezer e0307aa05e apply issue/#13952 fix to SDL_cpuinfo.h, too.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2026-03-17 17:01:10 +03:00
Kushagra Shukla 650aceb609 Backport 8BitDo HIDAPI Driver to SDL2 (#15207) 2026-03-14 15:20:29 -07:00
Sam Lantinga f432937f9c Updated copyright for 2026
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2026-01-01 09:51:07 -08:00
SDL Wiki Bot 1edb3283b0 Sync SDL2 wiki -> header
[ci skip]
2025-10-24 17:35:46 +00:00
danprice142 3e1cebed3c Add protocol activation URI support for WinRT (#14309) 2025-10-24 10:34:44 -07:00
SDL Wiki Bot 66d87bf0e1 Sync SDL2 wiki -> header
[ci skip]
2025-10-13 06:06:49 +00:00
AL2009man 8ef0a07a52 Disable SDL_HINT_JOYSTICK_RAWINPUT by default
backported from SDL3 commit aa870d5

 Fixes #13047
2025-10-08 11:34:55 -07:00
Fierelier 7b28fb29bd [SDL3] [PS2] Framebuffer resolution + 240p/480p + PAL support (#13993)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc

(cherry picked from commit 3fd0b46215)
2025-09-26 07:46:13 -07:00
krnl32 9859c05178 Added a default case to the switch statement in the HEADER FILE to prevent compiler warnings about missing defaults. This change helps avoid compilation breaks when warnings are treated as errors. 2025-09-16 17:16:50 -07:00
Ozkan Sezer 07c3b3fb7c fix build. 2025-09-15 20:29:50 +03:00
Ozkan Sezer 9343246616 SDL_endian.h: don't add _m_prefetch hack for clang-cl if available as a builtin
Fixes: https://github.com/libsdl-org/SDL/issues/13952 .

(backport from SDL3 commit 81f2f44843)
2025-09-15 20:10:50 +03:00
Wes Lord 2eb5bff91a Add missing parameters and return types to SDL2 header docs (#13162)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-13 07:37:33 -07:00
Frank Praznik d31d98d436 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

(backported from commit 1049426a76)
2025-08-30 14:23:04 +03:00
Ryan C. Gordon 272b073323 SDL_enabled_assert(): Use NULL istead of 0 to explicity initialize the pointer members of SDL_AssertData
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
(cherry picked from commit faf3bd9991)
2025-08-03 13:40:12 -04:00
SDL Wiki Bot d310b5679f Sync SDL2 wiki -> header
[ci skip]
2025-07-30 03:15:25 +00:00
Ryan C. Gordon 2a6baf50e9 include: Added some basic documentation so SDL_KeyCode shows up on the wiki.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes #11525.
2025-07-14 00:33:32 -04:00
Ryan C. Gordon cd0cf8b855 SDL_audio.h: tweak SDL_OpenAudioDevice() docs to fix a weird wordwrap issue.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/sdlwiki/pull/816.

("Fixes.")
2025-07-01 13:38:16 -04:00
evgenydrainov 2bc3ec44b1 keyboard: Add reference to SDL_Keymod in the comments
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-06-24 07:36:22 -07:00
SDL Wiki Bot 027d46f03a Sync SDL2 wiki -> header
[ci skip]
2025-06-13 17:09:05 +00:00
Ozkan Sezer 157f894d5d don't prototype strdup() for __clang_analyzer__ case in windows builds.
Fixes:  https://github.com/libsdl-org/SDL/issues/12948.
(cherry picked from commit 17bba029ba)
2025-05-04 20:47:28 +03:00
SDL Wiki Bot 916ddb1ef8 Sync SDL2 wiki -> header
[ci skip]
2025-04-22 21:18:56 +00:00
Sam Lantinga 1c75cb4f8a Revert "Sync SDL2 wiki -> header"
This reverts commit 26e946ef08.

Stop it Skynet!
2025-04-22 14:17:22 -07:00
SDL Wiki Bot 26e946ef08 Sync SDL2 wiki -> header
[ci skip]
2025-04-22 17:22:42 +00:00
Petar Popovic 035518d065 SDL_BlitSurface() comment: only dstrect is modified in function 2025-04-22 10:22:27 -07:00
Ozkan Sezer bfab0a968f SDL_cpuinfo.h: only include immintrin.h for x86 targets.
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
Reference issue: https://github.com/libsdl-org/SDL_image/issues/537
Reference issue: https://github.com/libsdl-org/SDL_mixer/issues/648
2025-04-03 18:55:04 +03:00
SDL Wiki Bot fc536dcb7e Sync SDL2 wiki -> header
[ci skip]
2025-03-12 19:23:45 +00:00
SDL Wiki Bot 22a87a22ca Sync SDL2 wiki -> header
[ci skip]
2025-03-07 17:02:06 +00:00
SDL Wiki Bot 52ac07d327 Sync SDL2 wiki -> header
[ci skip]
2025-02-25 15:55:15 +00:00
Tomasz Pakuła 0809be4ec5 [SDL2] Add SDL_HINT_JOYSTICK_HAPTIC_AXES
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of 0xFFFF/0xFFFF
2025-02-25 07:54:59 -08:00
Cameron Gutman 92cadaf917 keyboard: Fix comment regarding implicit calls to SDL_StartTextInput()
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
It was always done inside SDL_VideoInit().
2025-02-23 19:00:32 -06:00
Sam Lantinga 5330041ea9 Updated to version 2.33.0 for development 2025-02-08 09:15:11 -08:00
Sam Lantinga 7a44b1ab00 Updated to version 2.32.0 for release 2025-02-08 09:10:22 -08:00
Sam Lantinga 3e97d41da4 Updated to version 2.31.1 for RC build 2025-02-08 08:56:53 -08:00
Tomasz Pakuła 529ed102fc Translate conditional effect direction instead of hardcoding it to 0
Provious code wrongly assumed that direction is not an important part
of conditional effect. Moreover, if there's need to hardcode polar
direction, the default should be 0x4000 (north).

For one axis affects, a direction of 0 means complete lack of force, if
a FFB-enabled device takes direction into force calculation. A sine function
graph can be used to represent the resulting forces where X is the input
direction and Y is the force multiplier (360 degrees equals to 1).

This fixes conditional effect playback on Moza Racing devices, which do
not ignore direction field.
2025-01-20 16:52:11 -08:00
SDL Wiki Bot 220a23dad2 Sync SDL2 wiki -> header
[ci skip]
2025-01-15 15:27:42 +00:00
SDL Wiki Bot aa9b4ec894 Sync SDL2 wiki -> header
[ci skip]
2025-01-11 16:25:41 +00:00
SDL Wiki Bot 9dc8c82082 Sync SDL2 wiki -> header
[ci skip]
2025-01-03 13:15:22 +00:00
Sam Lantinga 2b5b8fdbd5 Updated copyright for 2025 2025-01-01 07:47:53 -08:00
Ozkan Sezer 51570d9257 build system: disable 3dNow! support by default
Closes: https://github.com/libsdl-org/SDL/issues/11472.
2024-11-17 17:55:32 +03:00
Sam Lantinga f1a3a18c1e Removed SDL_HINT_ENABLE_STEAM_CONTROLLERS
This was only respected on Steam Link hardware, which now uses SDL3 where it has been replaced by SDL_HINT_JOYSTICK_HIDAPI_STEAM.
2024-11-08 15:23:31 -08:00
Zack Middleton 761ea32b74 Fix SDL_PRIs64 to use standard PRId64
PRIs64 doesn't exist in C standards.

(cherry picked from commit 8a2cac7aaa)
2024-11-08 12:40:50 +03:00
Ryan C. Gordon 67b537cef4 .wikiheader-options: Treat SDL int types (Uint64, etc) as API prefixes.
This makes any reference to them in the docs link to their wiki pages.

Also fixup the integer type documentation, so the SDL2 wiki _has_ actual
pages for them.  :)
2024-11-01 23:52:03 -04:00
SDL Wiki Bot 15bc3f25ee Sync SDL2 wiki -> header
[ci skip]
2024-11-01 19:42:53 +00:00
dv-senna 478dff3585 SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHABLE_HANDLE
Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes:  https://github.com/libsdl-org/SDL/issues/11328 .

(cherry picked from commit 149ecffd6f)
2024-10-29 20:35:10 +03:00
SDL Wiki Bot 96e7306a7a Sync SDL2 wiki -> header
[ci skip]
2024-10-27 21:41:54 +00:00