Commit Graph

21588 Commits

Author SHA1 Message Date
Sam Lantinga
f37f4f06d5 Fixed windows getting the wrong size when setting size and aspect ratio back to back
(cherry picked from commit 0e5e772ba9)
2026-05-13 20:40:09 -07:00
Sam Lantinga
c02d2b8c73 Added SDL_SendGamepadEffect() support for the new Steam Controller
(cherry picked from commit 4884dbbe56)
2026-05-13 20:15:43 -07:00
Joel Auterson
a8442d38be Add libusb-1.0-0-dev to Linux deps doc
libusb-1.0-0 is needed to enable SDL_HIDAPI_LIBUSB. It does not work with the `libusb-dev` package on Ubuntu, which is for the older version.

(cherry picked from commit c247f06f01)
2026-05-13 18:36:16 -07:00
RaceTheMaSe
3e3d045cf1 hidapi, windows: Fix -Wjump-misses-init warning (#14990)
Clang: jump from this goto statement to its label is incompatible with C++ [-Wjump-misses-init]

(cherry picked from commit ba3274e3a1)
2026-05-13 19:32:50 +03:00
Max Seidenstücker
088a0fc91c Static at beginning
GCC: 'static' is not at beginning of declaration [-Wold-style-declaration]

(cherry picked from commit 0c7d4d5a89)
2026-05-13 19:32:50 +03:00
RaceTheMaSe
9363ecc764 Fix warning: strict prototypes (#14992)
clang: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]

(cherry picked from commit 4f183506f6)
2026-05-13 19:32:50 +03:00
RaceTheMaSe
a7e5870b88 Fix -Wnewline-eof warnings (#14989)
(cherry picked from commit 9fda8f2669)
2026-05-13 19:32:50 +03:00
RaceTheMaSe
5400cdd307 PS2, VITA: Fix void pointer arithmetic warnings (#14995)
(cherry picked from commit 863912aa03)
2026-05-13 19:32:50 +03:00
Sam Lantinga
9848c32d9a Return the touch device name for SDL_TOUCH_MOUSEID
(cherry picked from commit 3dbd3e43e2)
2026-05-13 09:07:51 -07:00
Cameron Cawley
17cf746550 Allow formats with alpha channels for window textures
Because the blend mode is explicitly set to SDL_BLENDMODE_NONE, it doesn't matter if there's a transparency channel in the texture format or not for opaque windows. This ensures that a 32-bit format is used with Metal instead of SDL_PIXELFORMAT_RGB565.

(cherry picked from commit b1f390255a)
2026-05-13 08:52:51 -07:00
Sam Lantinga
a7482a1acb Document that you may receive mouse events with SDL_PEN_MOUSEID
(cherry picked from commit 716c767b7e)
2026-05-13 08:12:42 -07:00
Sam Lantinga
a979d8d060 Use predefined names for constant keyboard and mouse IDs
Fixes https://github.com/libsdl-org/SDL/issues/15563

(cherry picked from commit fcaf5bbf8c)
2026-05-13 08:12:42 -07:00
Anonymous Maarten
2499e1a4c2 stb_image: use SDL_HasSSE2 and <SDL3/SDL_intrin.h> macro's for SSE2 detection
(cherry picked from commit 0457891d50)
2026-05-13 18:10:02 +03:00
Max Seidenstücker
1d8673a885 Void function return
Clang: void function should not return void expression [-Wpedantic]

(cherry picked from commit 144ab4ba99)
2026-05-13 18:10:02 +03:00
Sam Lantinga
ecc33ac29a Change controller sensor state on the main UI thread on Android
Fixes https://github.com/libsdl-org/SDL/issues/15565

(cherry picked from commit c362f1341f)
2026-05-13 08:02:45 -07:00
Sam Lantinga
dfc0e4bb4f Synchronize controller access on the Java side on Android
(cherry picked from commit 7222c04fbf)
2026-05-13 08:02:42 -07:00
Cameron Cawley
08c33bb861 Fix switching modes on RISC OS
(cherry picked from commit 7071efb6a3)
2026-05-12 20:18:26 -07:00
Sam Lantinga
90c68dce38 Removed Wooting 60HE (ARM) from the controller blacklist
Fixes https://github.com/libsdl-org/SDL/issues/15555

(cherry picked from commit f30ec9940a)
2026-05-11 22:11:01 -07:00
Al. Lopez
98ed044509 added additional examples of paddle/misc buttons for Steam Controller (#15544)
(cherry picked from commit 4940345a2e)
2026-05-11 21:45:39 -07:00
Sam Lantinga
ef3196bedd Fixed a crash if we get a HID device with no path
This can happen on Linux if udev_device_get_devnode() fails.

(cherry picked from commit bb4eedd67d)
2026-05-11 16:48:43 -07:00
Rachel Blackman
717bb2dcef Correctly support OG Steam Controller when connected via USB on Android (#15561)
(cherry picked from commit e4a327709d)
2026-05-11 15:23:50 -07:00
Rachel Blackman
7e101bdce9 Ensure Android gamepad mappings don't lose the first button.
(cherry picked from commit fd3cfb97c1)
2026-05-11 12:59:59 -07:00
Evan Hemsley
d348116157 GPU: Fix segfault when copying to Vulkan swapchain (#15543)
(cherry picked from commit 76f8705c12)
2026-05-11 11:42:55 -07:00
Rachel Blackman
2b7c3d8a6c *Only* preserve report byte for feature reports. Oops.
(cherry picked from commit 7ec70d39c4)
2026-05-11 11:33:20 -07:00
Nintorch
b52e6d10ce Ignore Keychron K10 Pro and Huion Tablet_GS1331
(cherry picked from commit 287e2573cd)
2026-05-11 11:11:24 -07:00
Cameron Gutman
a61f02cc88 atomic: Implement loads on MSVC without RMW operations
This fixes faults when loading from read-only memory and avoids
cache line bouncing across cores which reduces performance.

(cherry picked from commit 7439a94ed2)
2026-05-11 06:43:40 -07:00
Frank Praznik
321557f339 x11: Store the mouse button serial for emulated pointer events as well
Otherwise, filtered emulated button events, such as for mouse wheels, can slip through the core event handler.

(cherry picked from commit f48525aa70)
2026-05-10 14:18:06 -04:00
Evan Hemsley
7a827b145a GPU: Validate that 2D textures don't have layers (#15535)
(cherry picked from commit cbe3fbe9f3)
2026-05-07 19:21:10 -07:00
Evan Hemsley
a14da0d366 GPU: Allow depth texture arrays (#15534)
(cherry picked from commit d08ef12b12)
2026-05-07 16:41:09 -07:00
Frank Praznik
7cdf4fd7ee wayland: Ensure window dimensions are greater than zero after adjusting for aspect
Resizing to zero can cause a bad viewport size error.

(cherry picked from commit ba3577f584)
2026-05-07 13:17:29 -04:00
cosmonaut
1ebe9161c3 GPU: Clarify VK_KHR_maintenance9 comment
(cherry picked from commit c8feb29746)
2026-05-07 10:00:07 -07:00
Susko3
5902d6622c Enable text editing events in checkkeys
(cherry picked from commit 2949a0d6d5)
2026-05-07 09:57:22 -07:00
Sam Lantinga
a730905a2b Fixed build
(cherry picked from commit ab19d09939)
2026-05-06 19:42:51 -07:00
Torbjorn Laedre
1704eb5e2e Change 3D texture memory barrier sub-resource range to be maintenance9 compatible.
(cherry picked from commit 5d63a4cad2)
2026-05-06 18:21:31 -07:00
Sam Lantinga
ef9963df0d Don't report 10% battery for Xbox controllers using XInput
(cherry picked from commit 386f198622)
2026-05-06 18:12:29 -07:00
Rachel Blackman
e1513e2d3c Ensure Android hidapi does not drop the report byte (#15527)
(cherry picked from commit f8c364ae74)
2026-05-06 16:08:32 -07:00
Ryan C. Gordon
1ee51f2d88 opengles2: Rework render targets.
Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.

This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.

Fixes #15524.

(cherry picked from commit 56e0d052f1)
2026-05-06 13:28:03 -04:00
Frank Praznik
9257b7bc13 wayland: Queue the surface frame callback after the initial commit
Some compositors may dispatch this too early, during the initial empty commit, when subsurfaces are attached to a toplevel window, but a buffer has yet to be committed to the parent surface. Don't set the frame callback until the initial empty commit is done, so it will be called when the actual parent surface frame is committed.

(cherry picked from commit e3393e6304)
2026-05-06 12:29:11 -04:00
Frank Praznik
68082c7d15 wayland: Unconditionally send an exposure event on window shown status
Some compositors send the frame callback as part of the initial configuration sequence, so the window may already be past the "waiting for frame" state. Ensure that the exposure event is always sent.

(cherry picked from commit 1ac0ae9224)
2026-05-05 18:33:14 -04:00
Anonymous Maarten
d34a306ea9 cmake/sdlcpu: detect mips
PlayStation Portable uses MIPS32

(cherry picked from commit 8effeecb8d)
2026-05-06 00:34:14 +03:00
Evan Hemsley
6b28e6870e GPU: D3D12 stencil plane transition (#15519)
(cherry picked from commit fee8c94b5c)
2026-05-05 12:55:33 -07:00
Frank Praznik
85ebd16fb2 x11: Disable the X Synchronization Extension by default
Under the right conditions, this extension can result is smoother resizing when rendering with OpenGL, however, it is known to cause problems in certain cases, such as when handling presentation externally.

Gate it behind a hint, and disable it by default. Developers can selectively enable it when they verify that they meet the criteria for using it, and that it behaves correctly in their apps/games.

(cherry picked from commit b8545fce54)
2026-05-05 13:51:41 -04:00
Sam Lantinga
05d8af1a75 Fixed rare cursor corruption on Windows
If the cursor was created with a temporary surface that was pointing at external memory, then when the cursor is used it might be referencing memory that had already been freed.

(cherry picked from commit f6f4664ed1)
2026-05-05 08:55:45 -07:00
Ryan C. Gordon
6d35168a63 thread: Remove semaphore in thread creation.
This was added so that the new thread definitely has its threadid set, via
SDL_GetCurrentThreadID(), before SDL_CreatThread returns, but this broke
Emscripten, which can't wait on a newly-created thread, since the thread won't
start until a later mainloop iteration.

Now we have the creating thread set this id in SDL_SYS_CreateThread, where
platform-specific logic can figure out how to calculate the new thread's ID
from the parent thread, without using SDL_GetCurrentThreadID().

Fixes #15509.

(cherry picked from commit 922b872b4f)
2026-05-05 00:54:08 -04:00
Nintorch
3013f975ac Fix JoyCon mappings on Android
(cherry picked from commit 3c1636a958)
2026-05-04 11:49:45 -07:00
Nintorch
52b6bceedf Add support for joystick motion sensors on Android
(cherry picked from commit c699512adc)
2026-05-03 15:11:59 -07:00
Frank Praznik
5c107908ff wayland: Pass the inverted flag for horizontal scroll events
Natural scrolling affects both axes, and the compositor may not send the vertical axis orientation if the frame has no vertical scroll motion, so purely horizontal events need to be flagged as inverted as well.

(cherry picked from commit 3ee0439ae5)
2026-05-03 17:45:46 -04:00
Nintorch
c239edd6e0 Fix Xbox controller names in MFI joystick backend (#15499)
controller.vendorName returns a generic name for Xbox controllers ("Controller"), so we have to give them proper names.

(cherry picked from commit c805a4d632)
2026-05-03 09:26:38 -07:00
Sam Lantinga
796782fc89 Updated to version 3.4.9 for development 2026-05-01 19:49:54 -07:00
Sam Lantinga
d9d5536704 Updated to version 3.4.8 for release release-3.4.8 2026-05-01 17:02:55 -07:00