Commit Graph

20222 Commits

Author SHA1 Message Date
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 2025-08-24 21:33:02 +03:00
Ethan Lee
0fcaf47658 gpu: D3D12 only requires feature level 11_0 with Resource Binding Tier 2.
We previously thought this wasn't possible because constant buffer offsets and
partial updates were unavailable, but we were reading the wrong table - this is
only the case for D3D11...

https://learn.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro

... while 12 doesn't list this feature at all:

https://learn.microsoft.com/en-us/windows/win32/direct3d12/hardware-feature-levels

We double checked and Jesse Natalie confirmed that this feature is required for
D3D12 even for 11_0 drivers. (Thanks Jesse!)

Additionally, D3D12 requires that UAVs are accessible from all shader stages,
meaning Tier 2 is enough to support the number of UAVs we need. Tier 1 could be
a property to lower the requirements, but that can be done later.
2025-08-22 15:46:05 -04:00
Merlyn Morgan-Graham
dee2414ee7 Fix typo in SDL_power doc comment 2025-08-21 08:40:57 +03:00
arnau.nau
ee5e249008 Docs fix for SDL_stdinc.h: floor,floorf,ceil,ceilf 2025-08-20 18:01:46 -04:00
SDL Wiki Bot
0b082b25b2 Sync SDL3 wiki -> header
[ci skip]
2025-08-19 20:39:22 +00:00
Wilson Jallet
03b14f5211 GPU: Fix Vulkan indexing error for resolve attachment refs (#13768) 2025-08-19 12:10:55 -07:00
SDL Wiki Bot
e3db7f83c2 Sync SDL3 wiki -> header
[ci skip]
2025-08-19 04:41:07 +00:00
suleyth
bad7075de8 Only add VRAM to deviceRank if asking for a high performance device, and if the device already meets all the requirements. 2025-08-17 23:17:37 -04:00
suleyth
618f85fafe Make deviceRank an Uint64 to avoid potential overflow issues in case of future GPUs with huge VRAM 2025-08-17 23:17:37 -04:00
suleyth
c5b79e5f1b Pick dedicated GPU with highest VRAM 2025-08-17 23:17:37 -04:00
Sam Lantinga
5f77da3a50 x11: use raw values for relative mouse motion
Fixes https://github.com/libsdl-org/SDL/issues/13743
2025-08-14 19:30:54 -07:00
Sam Lantinga
fe16c620d8 Fix crash when enumerating Steam Controllers
Closes https://github.com/libsdl-org/SDL/pull/13746
2025-08-14 14:49:04 -07:00
Sam Lantinga
2d855e12d2 Fixed style 2025-08-14 14:48:58 -07:00
Sam Lantinga
20df88a85b Fixed spacing 2025-08-14 14:44:56 -07:00
Sam Lantinga
e11110400a Fixed crash when reinitializing video on X11
The keyboard keymap was left pointing at a freed keymap after X11_QuitKeyboard()
2025-08-14 13:41:40 -07:00
Joshua T. Fisher
f053be22be Improve CMake for IDE Projects (Visual Studio) (#13704) 2025-08-14 08:19:14 -07:00
Sam Lantinga
f934b3e066 x11: fixed creating a window when all displays are disconnected
The X server maintains the desktop, but XRandR sends disconnect notifications for all displays. In this case fall back to the generic X11 desktop as a display.
2025-08-13 19:44:13 -07:00
Sam Lantinga
eeae48464e Fixed crash if X11 initialization fails 2025-08-13 19:44:13 -07:00
Petar Popovic
45feacf608 emscripten tests: fix warning: uninitialized variable 2025-08-13 17:00:45 -07:00
ChaseKnowlden
a743fb578c Use PulseAudio fragsize buffer correctly
Fixes broken microphone input in Sober
2025-08-13 17:36:44 -04:00
Ryan C. Gordon
ec0e4e21c7 docs: Mark most of SDL_filesystem.h as thread-safe.
Fixes #13738.
2025-08-13 16:32:55 -04:00
Salman Alshamrani
29cff6e264 Work around password integrations hiding software keyboard and preventing autofill 2025-08-13 08:05:58 -07:00
Salman Alshamrani
bd7d4708e3 Fix text field resetting text when replaced with a short string
Triggered by auto-filling a password with less than 16 characters from a
password manager.
2025-08-13 08:05:58 -07:00
ChaseKnowlden
10478c59db Keep MSVC Flags Consistent across CMake runs 2025-08-12 19:39:02 -07:00
Mitch Cairns
62b9ac3a09 SEWN Button Convention 2025-08-12 15:19:01 -07:00
Mitch Cairns
87543ba18c SInput: Mapping updates for GCUltimate/ProGCC
- In previous firmwares for my gamepads, the buttons were sent in a static order for ABXY.
- To better be 'transparent' to the driver and save myself from future fragmentation, I am updating the mappings to be consistent, where the HID report should always expect to receive the button inputs based on cardinal button directions rather than button labels.
- This better aligns with the existing 'fallback' behavior of a generic device.
- Coincides with firmware library update: https://github.com/HandHeldLegend/HOJA-LIB-RP2040/pull/30
2025-08-12 15:19:01 -07:00
SDL Wiki Bot
7487880e4c Sync SDL3 wiki -> header
[ci skip]
2025-08-12 17:05:23 +00:00
Sam Lantinga
4725213eef Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
Fixes https://github.com/libsdl-org/SDL/issues/13732
2025-08-12 09:54:20 -07:00
SDL Wiki Bot
4b2a87a5d3 Sync SDL3 wiki -> header
[ci skip]
2025-08-12 16:53:08 +00:00
Sylvain
970c0bfe96 Fixed bug #13493: Assertion failure at SDL_AddTouch with Android API 28
Java touch id should be -1 because it's reserved for internal SDL
synthetic events.
It should also not be 0, because this is SDL invalid value.
2025-08-12 18:34:42 +02:00
Chase Knowlden
6e422e5ff2 Update NDK version to 28 (#13729)
* Update NDK version to 28 and add 16kb page size linker flags to x86_64

* Remove Android Linker Options

16kb page size is now the default since NDK r28c

* Update Android CI to use NDK 28
2025-08-12 07:45:57 -07:00
Beyley Cardellio
e699f3dca1 GPU: Hold submit lock before waiting for device idle 2025-08-10 07:21:55 -07:00
SDL Wiki Bot
f2df279adc Sync SDL3 wiki -> header
[ci skip]
2025-08-10 05:08:26 +00:00
Sam Lantinga
40ec9592f1 Restored text missing during wiki sync (thanks @sezero!) 2025-08-09 22:07:14 -07:00
SDL Wiki Bot
3970acd1c2 Sync SDL3 wiki -> header
[ci skip]
2025-08-10 02:21:43 +00:00
SDL Wiki Bot
44ce826b57 Sync SDL3 wiki -> header
[ci skip]
2025-08-09 18:34:27 +00:00
Petar Popovic
43f3991398 linux/SDL_syshaptic.c:SDL_SYS_HapticStopAll(): Fix return on error 2025-08-09 09:27:35 -07:00
Petar Popovic
d4819db5e6 SDL_waylandvideo.c:display_remove_global(): Check pointer when removing mouse 2025-08-09 07:37:40 -07:00
Anonymous Maarten
7017fbaa8e release: build aarch64 libraries with 16kiB page size
[ci skip]
2025-08-09 04:51:35 +02:00
Mohamed Shazan
f4c124e4bf SDL_TriggerBreakpoint() will default to __debugbreak() on MinGW toolchain on windows 2025-08-08 16:20:59 -07:00
Frank Praznik
aff1a48bd9 wayland: Cleanup and return if keymap allocation fails 2025-08-08 18:44:41 -04:00
Petar Popovic
d9c20cfd0a SDL_SendJoystickVirtualSensorDataInner(): Fix max_sensor_events increment 2025-08-08 12:48:06 -07:00
Anonymous Maarten
de742e9f9a cmake: detect RISCOS platform before GNU/Hurd 2025-08-08 12:47:09 -07:00
Pino Toscano
171885010d Add GNU/Hurd as platform
SDL has been building on GNU/Hurd for a long time, using either drivers
based on external libraries (e.g. X11, pulseaudio, sndio, etc) or dummy
drivers. This commit introduces it explicitly as platform, so it can be
recognized, and tweaked as needed. In particular:
- introduce the SDL_PLATFORM_HURD define
- tighten/improve the platform detection in cmake, and use "Hurd" as
  identifier
- return the platform name in SDL_GetPlatform()
- tweak the CFLAGS/LDFLAGS so pthreads can be used properly
- implement SDL_GetExeName(), using /proc/self/exe as provided by the
  basic Linux-like procfs
- enable GLES 2 in tests (mostly for consistency with Linux)
2025-08-08 12:47:09 -07:00
Petar Popovic
b63c32e790 SDL_SetRenderDrawBlendMode(): Remove redundant param check 2025-08-08 14:05:33 -04:00
Frank Praznik
7252633345 video: Check the display origin when a fullscreen window is moved
In certain cases when moving fullscreen windows in scaled desktop configurations, the window origin might overlap two displays at once. Check if the window is at the origin of a specific display before falling back to the generic window rectangle check.

Fixes rare fullscreen window misplacement when moving fullscreen windows via a desktop shortcut while using the Wayland scale-to-display mode.
2025-08-08 11:14:09 -04:00
Pino Toscano
248bcf6b29 ime: fcitx: use SDL_GetExeName() in GetAppName()
Use the existing SDL_GetExeName(), available for all the UNIX
platforms, in the internal GetAppName(); this has few advantanges:
- SDL_GetExeName() (and SDL_GetAppID() that builds on top of it) are
  used in various places already; since it caches the executable name,
  this may remove one extra read of the application name
- SDL_GetExeName() has a non-dummy implementation in more OSes than
  GetAppName(), thus providing a small improvement for this IME

As drive-by change: since SDL_GetExeName() provides a constant string,
there is no more need to allocate a new string in GetAppName(), which
is used as constant string anyway. Hence, return a constant string in
GetAppName() too.
2025-08-07 13:58:09 -07:00
Simon McVittie
d83503f80e Fix some typos detected by Debian's lintian QA tool
I assume the demoninator is a typo, rather than an indication that
someone has been playing too much Doom :-)

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-08-07 13:55:15 -07:00