Commit Graph

21248 Commits

Author SHA1 Message Date
Anonymous Maarten
c34b67250c cmake: use readelf to extract soname from shared elf library 2026-01-19 22:18:24 +01:00
Anonymous Maarten
8a62d6d406 cmake: don't set <PackageName>_FOUND to FALSE before pkg_search_modules 2026-01-19 22:18:24 +01:00
Cameron Cawley
fa68a73788 Fix compiler warning in MSVC ARM64 builds 2026-01-19 10:16:35 -08:00
Cameron Cawley
20adb97305 Support building for ARM64 with the MSVC project 2026-01-19 10:16:35 -08:00
Cameron Cawley
3ee909f01e Add missing files for the examples to the MSVC project 2026-01-19 10:16:35 -08:00
Cameron Cawley
18ba444352 Update the filters for the MSVC project 2026-01-19 10:16:35 -08:00
Cameron Cawley
a04ddb394f Add missing examples to the MSVC project 2026-01-19 10:16:35 -08:00
Cameron Cawley
3681a94c66 Automatically select the default platform toolset for examples in MSVC builds 2026-01-19 10:16:35 -08:00
Cameron Cawley
4dcf886322 Remove duplicate MSVC projects 2026-01-19 10:16:35 -08:00
Wolf3s
0d845e8689 Fix the video size matching the renderer. 2026-01-19 10:10:33 -08:00
Cameron Cawley
07be29b625 Support 16-bit packed texture formats with the Vulkan renderer 2026-01-19 08:29:01 -08:00
Brad Smith
d4d66e77cc cmake: Replace sys/types.h usage with stdint.h with CheckUSBHID
Some checks failed
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-18 16:18:26 -08:00
Cameron Cawley
cd72f6b02e Fix B4G4R4A4_UNORM swizzle with the Metal GPU driver 2026-01-18 12:48:24 -08:00
Cameron Cawley
ab7d275113 Support 16-bit packed texture formats with the GPU renderer 2026-01-18 12:48:24 -08:00
Cameron Cawley
25583798a0 Fix mapping between surface and GPU pixel formats 2026-01-18 12:48:24 -08:00
Brad Smith
410a35fbee cmake: Fix header detection with CheckUSBHID
Make use of check_include_files to be able to also include
stdint.h when checking for the headers. Fixes detection of
usbhid.h on OpenBSD.

/usr/include/usbhid.h:40:2: error: unknown type name 'uint32_t'
   40 |         uint32_t _usage_page;
      |         ^
2026-01-18 10:29:51 -08:00
Cameron Cawley
01d8e37a16 Support 16-bit packed texture formats with the Direct3D 12 renderer
Some checks failed
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-18 10:08:59 -08:00
Cameron Cawley
285147c627 Support 16-bit packed texture formats with the Direct3D 11 renderer 2026-01-18 10:08:59 -08:00
Sam Lantinga
3f0e0975d8 SDL_CreateGPURenderState() doesn't modify the createinfo parameter 2026-01-17 20:48:30 -08:00
ROllerozxa
064096bf61 Fix SDL_SetWindowIcon on singlethreaded Emscripten builds (#14850) 2026-01-17 20:38:36 -08:00
Frank Praznik
34b620c3f8 event: Only consider topmost windows when generating SDL_QUIT
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Otherwise, the quit event can be sent prematurely. The topmost status must be queried and cached before sending the close request event, as the window may be destroyed in an event handler.
2026-01-17 15:52:04 -05:00
Frank Praznik
56e121f6e3 wayland: Dedup pointer entry handling code
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Small cleanup, and needed for future work.
2026-01-17 10:40:14 -05:00
Ryan C. Gordon
1f4906e61e examples/misc/03-locale: Fixed thumbnail to have right locale count.
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
I had forced the example to a hardcoded locale list for screenshot purposes
and forgot to update the count of items at the top of the list.
2026-01-17 00:05:16 -05:00
Ryan C. Gordon
022e2747b9 examples/misc/03-locale: Added thumbnail.png for examples.libsdl.org. 2026-01-16 23:59:59 -05:00
Cameron Cawley
4af4c97e44 Support 16-bit packed texture formats with the Metal renderer 2026-01-16 17:29:39 -08:00
Void Star Caster
b1aaa41921 gpu renderer: always pass tex_coord to fragment shader
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
As suggested in #14843, pass vertex tex_coord to vertex shader and to fragment shader even when no texture is bounded so they can be used by custom fragment shaders.
2026-01-16 16:22:06 -08:00
Cameron Cawley
15ceaffcb5 examples: Added misc/03-locale 2026-01-16 12:55:57 -08:00
Cameron Cawley
1077486872 Support more texture formats with the Direct3D 9 renderer 2026-01-16 11:01:14 -08:00
Frank Praznik
202fdb2795 wayland: Only destroy tool frame callbacks if the cursor is the one being destroyed 2026-01-16 12:31:10 -05:00
ocelote_ml
008aa18810 updated png texture example
the example was updated to use png's but they didn't update the error message nor the comments
2026-01-16 12:21:30 -05:00
Frank Praznik
35a80bdf1f wayland: Also check tools for cursor usage during cursor destruction 2026-01-16 11:39:35 -05:00
Frank Praznik
5e2977709b wayland: Don't clear the cursor on leave events
Stop the frame callback and flag the cursor for a refresh when the pointer re-enters the surface, but don't set a null cursor, as it may have already been set after entering a surface that is part of the window decorations, resulting in an unwanted invisible cursor.
2026-01-16 11:39:35 -05:00
Frank Praznik
55ba268e66 wayland: Don't process null leave events in the pointer frame handler
This can cause the cursor to become invisible when passing over libdecor surfaces.
2026-01-16 11:39:35 -05:00
William Horvath
f9395a766f thread: Use a flexible array member for "array" in SDL_TLSData.
Avoids UBSan warning (among other similar ones in SDL_thread.c):
src/thread/SDL_thread.c:109:13: runtime error: index 1 out of bounds for type 'struct (unnamed struct at src/thread/SDL_thread_c.h:70:5)[1]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/thread/SDL_thread.c:109:13
2026-01-16 08:32:06 -08:00
Frank Praznik
e62d6a95b9 events: Raise keyboard keys before sending the focus lost message
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Otherwise, the key raises may end up being ignored.
2026-01-15 15:02:43 -05:00
Cameron Cawley
02c9f2045b Fix touch screen display IDs on the 3DS
Some checks failed
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-14 15:06:57 -08:00
Sam Lantinga
77290f9788 You can't change the size of a window while in macOS fullscreen space 2026-01-14 15:05:14 -08:00
Frank Praznik
32747ceb84 tests: Don't try to load unsupported image types in testclipboard
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Requesting certain MIME types (e.g. EPS formats offered by KDE) can be *very* slow, on the order of multiple seconds, due to requiring significant processing. Only try to load image MIME types that SDL is known to support (BMP and PNG).
2026-01-14 11:00:50 -05:00
Frank Praznik
2a0d04613c wayland: Increase the read timeout when reading from SDL_GetClipboardData()
The default timeout value of 14ms is ideal when querying clipboard data while polling events, to prevent excessive lag if the source takes a long time to respond, however, when reading from SDL_GetClipboardData(), the timeout can be too short if a large amount of data must be processed or transferred. SDL_GetClipboardData() is not called while polling events, so using a longer read timeout to greatly increase the chance of success is acceptable.

Use a 5 second timeout when reading from SDL_GetClipboardData() and GetPrimarySelectionText() to greatly increase the chances of a successful read, even if the requested format requires heavy processing.
2026-01-14 11:00:50 -05:00
Sam Lantinga
206989a22d Revert "Fix duplicate event dispatch in Cocoa event pump"
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This reverts commit dd52dd8995.

After that commit mouse input is not received and the window cannot be closed or resized.

Fixes https://github.com/libsdl-org/SDL/issues/14818
2026-01-13 16:23:41 -08:00
Sam Lantinga
54fdeb9e79 Added support for the Razer Raiju V5 Pro in wireless mode 2026-01-13 16:23:05 -08:00
Sam Lantinga
015d0fc2e4 Added support for the Razer Raiju V5 Pro 2026-01-13 15:48:12 -08:00
Anonymous Maarten
6f19fecba3 cmake: compile SDL_uclibc separately for shared and static SDL3, ensuring fPIC for shared SDL3 2026-01-13 23:27:49 +01:00
Sergei Petunin
460b8a0db1 Fix MAC_PRESS_AND_HOLD hint documentation 2026-01-13 09:00:35 -08:00
Frank Praznik
2212c4f085 wayland: Send exposure events when deferring resize events
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Clients that defer repainting may hang in SDL_WaitEvent() while interactively resizing if they only redraw when an appropriate event is received, as resizing defers the new state until a frame callback is received, and if too much time elapsed since the last redraw, the last frame callback may have already occurred. Send an exposure event when deferring resizes so the client will make forward progress and trigger a frame callback to ack the pending configure state.
2026-01-12 19:22:38 -05:00
Edgar San Martin, Jr.
7c9ae67706 Add write buffering to Windows SDL_IOStream (#12424) (#14794) 2026-01-12 11:39:06 -08:00
Qiu Qiang
dd52dd8995 Fix duplicate event dispatch in Cocoa event pump
Prevent mouse and keyboard events from being processed twice by
skipping [super sendEvent:] for events SDL has already handled via
Cocoa_DispatchEvent. Other event types still go through AppKit's
normal handling.
2026-01-12 11:29:45 -08:00
Frank Praznik
ca537d651b wayland: Dispatch pointer leave when destroying the pointer or a surface
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
No pointer frame event will occur when synthesizing a leave event, so dispatch immediately.
2026-01-11 11:37:03 -05:00
Frank Praznik
55acc0b829 joystick/win32: Fix function return type mismatch
Fixes #14804
2026-01-11 10:56:06 -05:00
SDL Wiki Bot
90aaa23977 Sync SDL3 wiki -> header
[ci skip]
2026-01-10 16:47:13 +00:00