Commit Graph

21712 Commits

Author SHA1 Message Date
Michael Fitzmayer 5bd1a65e6f [N-Gage] Add LUT color mod, cardinal rotation cache and loop unrolling
- Implement lookup tables for faster color modulation
- Cache 0°/90°/180°/270° rotations for speedup on common angles
- Add dirty rectangle tracking infrastructure
- Process 4 pixels at a time in all transform operations
2026-04-15 20:36:42 +02:00
Michael Fitzmayer e5c8523b36 [N-Gage] Preserve source textures and optimize rotation with DDA
- Add temporary render bitmap to avoid destroying source texture data
- Implement incremental DDA algorithm for rotation
- Replaces per-pixel FixMul operations with simple additions and preserves
  textures for reuse.
2026-04-15 20:36:41 +02:00
Michael Fitzmayer 4870f81d9c [N-Gage] Optimize rendering back-end
- Remove SDL_Surface member from NGAGE_TextureData structure and update all functions that currently use
  surface->pixels to instead access bitmap->DataAddress() directly. This eliminates the intermediate copy
  step (Mem::Copy from surface to bitmap) in rendering operations.

- Eliminate per-frame allocations in Copy/CopyEx methods. These buffers are now allocated once and resized
  only when needed.
2026-04-15 20:36:41 +02:00
Ryan C. Gordon a49a5e87a9 wikiheaders: Don't escape . chars in manpage's brief section.
Otherwise, the `apropos` command gets upset.

Fixes #15387.
2026-04-15 13:28:52 -04:00
Cameron Gutman 59267ed800 atomic: Use __atomic_load_n on Android 2026-04-14 17:38:08 -05:00
Cameron Gutman dba9aa147c atomic: Switch to SDL_HAS_BUILTIN to detect __atomic_load_n 2026-04-14 17:38:08 -05:00
rewine 59ee54d136 wayland: bind cursor-shape-v1 at protocol version 2
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
cursor-shape-v1 version 2 adds dnd_ask and all_resize, but SDL_SystemCursor does not expose matching cursor types yet. Bind the protocol at version 2 now so SDL negotiates the updated interface correctly while keeping the current cursor mapping unchanged.
2026-04-14 10:22:48 -04:00
Anonymous Maarten c00e9c991e test: use SDL_test for event handling
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-14 02:46:42 +02:00
Anonymous Maarten 745f9905c1 test: render name of current active cursor 2026-04-14 02:46:42 +02:00
David Vanderson 5e0f721fd4 xinput2: correct horizontal touchpad scrolling direction
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This fixes testmouse so when fingers move left the green line moves
left.
2026-04-13 19:43:59 -04:00
eafton e4f75bac45 Remove SDL_gtk
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-12 13:36:31 -07:00
Frank Praznik dd6d49afbd wayland: Enable text input even when the text input protocol is not available.
Even without the text input protocol, basic text can still be obtained from individual keys and the composition system.
2026-04-12 13:02:50 -04:00
MAJigsaw77 7f12b975bb Use singleTop launchMode for SDLActivity on Android
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-11 20:04:46 +02:00
Frank Praznik f40955cd00 test: Render a blank window in testtray
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Some platforms require drawing something to the window for it to be mapped, so create a renderer and redraw on exposure events.

Additionally, add the license to the testtray.c file and clang-format the source.
2026-04-11 10:11:43 -04:00
David Gow cf4edb73e7 tray:dbus: Re-instate the _parent fields in SDL_dbustray structs
The various SDL_Tray*DBus structs are supposed to be backend-specific
subclasses of the corresponding SDL_Tray* structs. This is done by making
the first member be a 'parent' of that type, so that, e.g., SDL_TrayDriverDBus
can be cast into an SDL_TrayDriver. However, these '_parent' members were
mistakenly removed in commit ce90105cf8 ("Clean up the tray D-Bus code"), as
they're never directly referenced.

Reinstate these variables, and instead of casting SDL_Tray*DBus to SDL_Tray* on
creation, reference the _parent member directly, so that any tooling will know
the variable is indeed used. In addition, rename _parent to class_parent, to
make its purpose more obvious.

Fixes: ce90105cf8 ("Clean up the tray D-Bus code")
2026-04-11 05:11:03 -07:00
Anonymous Maarten 4ab8ecf02d ci: run tests on Linux under gdb (if available)
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-11 04:12:15 +02:00
Anonymous Maarten 396eeff350 cmake: add SDLTEST_GDB option to run tests under gdb debugger printing stacktraces 2026-04-11 04:12:15 +02:00
Anonymous Maarten 9d97e663d9 ci: add option to set ctest arguments 2026-04-11 04:12:15 +02:00
Frank Praznik db1506123e Fix spacing in the D-Bus source 2026-04-10 20:47:17 -04:00
Frank Praznik ce90105cf8 Clean up the tray D-Bus code
Run clang-format to clean up whitespace issues, and remove some unused struct members.
2026-04-10 20:38:56 -04:00
eafton 8c024f4f3a SNI/DBus tray support (#15189)
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-10 14:11:38 -07:00
Nintorch 4aa0a6e2bf Fix Oklick W-2 support
This PR maps buttons 7 and 8 to paddles 2 (left) and 1 (right) respectively, and it also duplicates the mapping but for crc 0x2004, since the CRC of this controller changes if it was hotplugged.
2026-04-10 10:56:16 -07:00
Mathieu Eyraud dc16a35140 Don't call function pointer when it is NULL 2026-04-10 10:53:58 -07:00
Cameron Gutman 463b6be133 kmsdrm: Fix order of GBM and EGL teardown
All locked front buffers must be released prior to destroying
the EGL surface to avoid causing a UAF in libnvidia-egl-gbm.so.
2026-04-10 10:38:30 -07:00
Frank Praznik 0fc9db9b82 x11: Ignore slave button presses on non-focused windows
When a window has the pointer grabbed, the X server will grab all master device events, and XInput2 will continue to deliver slave events to the window immediately under the pointer, regardless of grab status. Only send slave pointer events to the focused window, and fall back to the core X events to catch button presses missed when the pointer is over another window.
2026-04-10 12:49:30 -04:00
Sylvain ccf688c921 Android: fix lint warning "unneed cast to Activity"
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-10 07:08:07 -07:00
Cameron Gutman c2d0b59f29 kmsdrm: Fix double-free of GBM surface buffer in atomic mode
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-10 00:05:31 -05:00
Sam Lantinga 57f3d2ea0a Don't send any commands to the GPU while hidden
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Previously we weren't doing drawing, but we were enqueuing viewport commands and so forth, which were causing GPU permission errors on iOS. We really don't want to be sending any work to the GPU when we're in the background.
2026-04-08 10:08:11 -07:00
Sam Lantinga 5c430f8715 Fixed SDL_GlobDirectory() on asset paths on Android
Make sure we pass the original path back to the directory enumeration callback.
2026-04-08 09:09:29 -07:00
Sam Lantinga 51aeebd889 testcolorspace: fixed color check when output is linear colorspace with 8-bit precision
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-07 14:05:51 -07:00
Sam Lantinga cf71571c96 testcolorspace: use the SDL main callbacks 2026-04-07 14:05:51 -07:00
Sam Lantinga 7f23f09ee8 Fixed crash if SDL_SYS_CreateThread() fails (thanks @capehill!)
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/SDL/issues/15340
2026-04-07 12:23:07 -07:00
Ozkan Sezer f61a22e10f SDL_hidapi_zuiki.c: silence bogus -Warray-bounds warnings from gcc-4.9
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-07 06:45:10 +03:00
Frank Praznik b8e8caf7c5 dbus: Better handle local URI paths
Decode file URIs before trying to open them, and properly handle non-URI local paths.
2026-04-06 19:43:45 -04:00
Anonymous Maarten 928cfef4b7 ci: bump workflows 2026-04-07 01:27:33 +02:00
Anonymous Maarten d1977bbf5e cmake: emscripten/clang does not support -Wformat* (anymore) 2026-04-07 00:53:56 +02:00
cosmonaut f8b7e22d7d GPU: Fix Vulkan backend segfault 2026-04-06 14:46:33 -07:00
cosmonaut aeb4309c0e GPU: Fix memory leak in Vulkan command buffer
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-06 10:39:46 -07:00
Frank Praznik 0a54fdb862 dbus: Use OpenFile for opening local 'file://' URIs
Per the spec, OpenURI can't open local paths, so OpenFile needs to be used instead.
2026-04-06 11:43:27 -04:00
Sascha Reuter c98b36ff03 GPU Vulkan: handle VK_ERROR_SURFACE_LOST_KHR in acquire path
On Android, backgrounding and foregrounding an app causes the Vulkan
surface to be destroyed. vkAcquireNextImageKHR returns
VK_ERROR_SURFACE_LOST_KHR, but the acquire while(true) loop only calls
RecreateSwapchain which doesn't recreate the surface, resulting in an
infinite retry loop and a black screen.

Handle VK_ERROR_SURFACE_LOST_KHR by setting both needsSurfaceRecreate
and needsSwapchainRecreate, then returning to let the existing
recreation path handle it on the next call.

Fixes #15322
2026-04-06 07:19:06 -07:00
Frank Praznik 682da4ee98 misc: Use the OpenURI D-Bus portal for opening URLs
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This works inside of containers, and supports passing an activation token with the request, which is needed on Wayland to transfer focus to the browser.
2026-04-05 16:31:50 -04:00
SDL Wiki Bot f8feccfa46 Sync SDL3 wiki -> header
[ci skip]
2026-04-05 18:33:22 +00:00
Jesse Chounard 6f7fb0a3dc Add text input properties for on-screen keyboard customization 2026-04-05 11:31:56 -07:00
Ryan C. Gordon 1442c5a4a0 emscripten: Added more variables to PreseedEmscriptenCache.cmake.
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-05 01:12:08 -04:00
Ryan C. Gordon 8b00b57468 filesystem: Rename a variable named "append" that is actually prepending.
(Strictly speaking, this was probably meant to be an "append" to the home/base
directory before the org/app name are appended to _that_, but it's definitely
added to the absolute start of the string on Emscripten, so might as well make
all of these match.

Reference PR #15262.
2026-04-05 01:08:07 -04:00
Sam Lantinga 19f70284ad Document that you can pass -1 to SDL_WaitEventTimeout() to wait indefinitely
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-04 11:36:44 -07:00
Nintorch c857861815 Add support for Oklick W-2 racing wheel controller
This PR adds the proper mapping for this racing wheel controller to comply with XInput documentation (mostly to treat the pedals as the trigger axes).
2026-04-04 10:30:57 -07:00
Peter Kokot 25aa1c643f CMake: Replace CMAKE_COMPILER_IS_GNUCC with CMAKE_C_COMPILER_ID
CMAKE_COMPILER_IS_GNUCC is obsolete variable and can be replaced with
CMAKE_C_COMPILER_ID (also available since early CMake versions).

In the past CMake versions also LCC and QCC compilers had this varible
set to boolean true but these aren't relevant here.
2026-04-04 10:28:43 -07:00
Sam Lantinga fc2f4fcc22 Send SDL_EVENT_SCREEN_KEYBOARD_HIDDEN when the keyboard is hidden on Android 2026-04-04 10:07:58 -07:00
Sam Lantinga 173adc1bf6 Enable npot texture wrapping if GL_OES_texture_npot is available 2026-04-04 08:12:51 -07:00