Commit Graph

5116 Commits

Author SHA1 Message Date
Vittorio Romeo
35098e927c emscripten: don't dispatch user input to hidden windows 2026-05-19 21:15:22 -07:00
Sam Lantinga
f9380e15de visionOS: fixed mousewheel values
Here are the observed values using a Bluetooth mouse on visionOS 26.5

Slow scroll up:
Mouse scroll: 0,-0.017334
Mouse scroll: 0,0
Mouse scroll: 0,-0.017334
Mouse scroll: 0,0

Slow scroll down:
Mouse scroll: 0,0.017334
Mouse scroll: 0,0
Mouse scroll: 0,0.017334
Mouse scroll: 0,0

Fast scroll up:
Mouse scroll: 0,-0.017334
Mouse scroll: 0,-9.36021
Mouse scroll: 0,-100.08
Mouse scroll: 0,-75.2287
Mouse scroll: 0,-82.2284
Mouse scroll: 0,-92.0137
Mouse scroll: 0,-95.1917
Mouse scroll: 0,-101.846
Mouse scroll: 0,-203.266
Mouse scroll: 0,0

Fast scroll down:
Mouse scroll: 0,0.017334
Mouse scroll: 0,11.424
Mouse scroll: 0,59.3571
Mouse scroll: 0,68.7859
Mouse scroll: 0,267.834
Mouse scroll: 0,95.0823
Mouse scroll: 0,201.809
Mouse scroll: 0,0
2026-05-19 15:41:04 -07:00
Sam Lantinga
cfed9b3aca Allow setting NULL palette on any surface
Fixes https://github.com/libsdl-org/SDL/issues/15654
2026-05-19 14:22:32 -07:00
Sam Lantinga
0e480bee30 visionOS: re-enable dimming mode 2026-05-18 16:59:01 -07:00
Sam Lantinga
7f7c1628cb visionOS: use black instead of white for the mouse overlay
White is easier to see and people notice the overlay showing up when mouse input is enabled
2026-05-18 13:43:09 -07:00
Sam Lantinga
b4ebf70e0c visionOS: dimming doesn't seem to be reliable, so disable it for now 2026-05-18 13:43:09 -07:00
Frank Praznik
f31ca02723 video: Windows keep any position set when in fullscreen after leaving fullscreen
Adds an automated test for the behavior as well.
2026-05-18 09:09:49 -07:00
Susko3
b608108593 Properly fix cursor position in Korean IME 2026-05-18 09:01:01 -07:00
Gabriel Wang
508450e9c0 adds Blit565to565SurfaceAlphaSVE2 2026-05-18 07:10:05 -07:00
Gabriel Wang
e07cfdff2c adds sdl_sve_chn_blend_with_mask_fast for RGB565 alpha-blending 2026-05-18 07:10:05 -07:00
Gabriel Wang
8d9d6b1b2b apply simplified sve2 macro protection 2026-05-18 07:10:05 -07:00
7aGiven
296231e999 WM_IME_SETCONTEXT not set 0 2026-05-18 07:05:09 -07:00
7aGiven
8e6fed2cbf fix Korean caret position 2026-05-18 07:00:42 -07:00
Sam Lantinga
33e237eb67 visionos: persist all configurable window settings
Save the gaze indicator and dimmed mode setting as well as curvature
2026-05-17 11:35:30 -07:00
Sam Lantinga
ae25abeb0d Don't log game controller buttons in the keyboard handler on Android 2026-05-17 09:11:39 -07:00
Frank Praznik
9aae258aeb wayland: Adjust DnD coordinates when dragging over a mask subsurface 2026-05-17 11:52:10 -04:00
Frank Praznik
336d07c2b7 wayland: Implement Wayland_AcceptDragAndDrop()
This simply toggles a flag that rejects DnD offers if false. Events were previously dropped silently, but rejecting the offer makes some desktops display a proper icon when the drop will not work.
2026-05-17 11:52:10 -04:00
Ozkan Sezer
4aeac49311 update openxr headers from khronos. 2026-05-17 16:29:03 +03:00
Ozkan Sezer
322dfd3ada update vulkan headers from khronos. 2026-05-17 16:29:03 +03:00
Ozkan Sezer
968b0c6910 update gl/egl headers from khronos. 2026-05-17 16:29:03 +03:00
Ozkan Sezer
75c94e9b31 SDL_opengl_glext.h, src/video/directx/d3d12.h: revert unintended changes from commit d70578b9aa 2026-05-17 16:28:29 +03:00
Ozkan Sezer
b24feafaa2 cygwin: patch vulkan headers for VKAPI_CALL and enable vulkan in cmake 2026-05-17 09:55:31 +03:00
Ozkan Sezer
2cd5cd2a42 cygwin: patch egl/opengles headers for EGLAPIENTRY 2026-05-17 09:55:31 +03:00
Anonymous Maarten
2038005657 video: don't use NEON blitters when SDL_HasNEON returns false 2026-05-17 04:41:56 +02:00
Cameron Gutman
060b74a664 mouse: Restrict GCMouse to macOS Sonoma and later 2026-05-16 15:43:33 -07:00
stahta01
6586bebfec Fix Cygwin building and add CI (#15566)
Co-authored-by: TrueCat17 <truecat17@gmail.com>
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
2026-05-15 08:48:24 -07:00
Anonymous Maarten
d5af35e3fb surface: cannot set a palette to a non-indexed surface
This fixes a UBSAN warning later in this function where it calculates
(1 << SDL_BITSPERPIXEL(surface->format)). The bpp might be >= 32 and
out of range for a bit shift.
2026-05-14 20:53:45 -07:00
Cameron Cawley
a3376acc2e Replace custom NEON cast macros with vreinterpret_*_* 2026-05-14 09:16:25 -07:00
Gabriel Wang
0f175891a6 Add SVE2 SIMD Alpha-Blending Blitter (#15504)
SVE/SVE2 is a new SIMD extension for AArch64. Compared to NEON, SVE/SVE2 brings the following benefits that are good for SDL projects:

- Lane prediction: we don't have to treat the tail part of a stride separately when the width is n times the hardware vector size
- Although the performance is almost no difference from NEON when the hardware vector size is 128bits, when the hardware provides a longer vector size, e.g. 256, 512, ... 2048, we can enjoy the large performance gain without modifying the source code or recompiling a library.

The functional correctness is validated in a dedicated [qemu project](https://github.com/GorgonMeducer/aarch64_qemu_mac_template/tree/SDL-SVE2-Acceleration-Validation).

The performance is tested on [Radxa Orion 6 N](https://radxa.com/products/orion/o6n/), which provides 4x A720 and 4x A520 processors. Since the vector size is 128 bits, which is the same as NEON, the performance is almost the same (or no worse than) the NEON acceleration.
2026-05-13 23:37:46 -07:00
Sam Lantinga
0e5e772ba9 Fixed windows getting the wrong size when setting size and aspect ratio back to back 2026-05-13 20:39:38 -07:00
Cameron Cawley
e50faf4e6a Support the full set of standard CSS cursors 2026-05-13 20:24:44 -07:00
Cameron Cawley
c6b232f5d4 Support loading JPEG images through SDL_LoadSurface() 2026-05-13 16:11:53 -07:00
Eddy Jansson
4eb221881a DOS: Replace SDL_memset() with SDL_zero*() 2026-05-13 11:28:54 -07:00
Cameron Cawley
b1f390255a 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.
2026-05-13 08:52:30 -07:00
Ozkan Sezer
36e1efccb4 revert parts of CodeSpell commit d870911202 from 3rd party sources 2026-05-13 18:00:02 +03:00
Cameron Cawley
7071efb6a3 Fix switching modes on RISC OS 2026-05-12 20:18:02 -07:00
Sam Lantinga
5cf16e4522 Added curved window mode on visionOS 26 (#15298) 2026-05-12 16:48:06 -07:00
Frank Praznik
f48525aa70 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.
2026-05-10 14:16:49 -04:00
Frank Praznik
04d8a654d8 wayland: Ensure the viewport size is always non-zero
A viewport size of zero is a protocol error, so guard against it when adjusting the aspect ratio.
2026-05-07 13:16:50 -04:00
Frank Praznik
ba3577f584 wayland: Ensure window dimensions are greater than zero after adjusting for aspect
Resizing to zero can cause a bad viewport size error.
2026-05-07 13:16:50 -04:00
Frank Praznik
e3393e6304 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.
2026-05-06 12:27:41 -04:00
Sam Lantinga
702f9d94cd Use SDL_HasWindows() 2026-05-06 09:12:10 -07:00
Frank Praznik
1ac0ae9224 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.
2026-05-05 18:32:15 -04:00
Frank Praznik
b8545fce54 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.
2026-05-05 13:46:21 -04:00
Sam Lantinga
f6f4664ed1 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.
2026-05-05 08:55:28 -07:00
Frank Praznik
3ee0439ae5 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.
2026-05-03 17:41:08 -04:00
Igor
e70f1bfc29 X11TK: fix late null-check causing segfault
The code is using `controls.window` before checking if it isn't null.

I found this bug by accident when I tried to run `SDL_ShowSimpleMessageBox`. 

It first tried using Wayland with `zenity`, but since I don't have `zenity`, it fallbacked to `X11_ShowMessageBoxImpl`.

For some reason it couldn't create a window, maybe something related to XWayland, so `controls.window` was `NULL`.
2026-05-01 19:12:44 -04:00
Sam Lantinga
b7726026f8 Fixed double-backspace with hardware keyboard on iOS 2026-04-27 10:54:03 -07:00
Sam Lantinga
dcf05165d3 Use SDL_SendScreenKeyboardShown() and SDL_SendScreenKeyboardHidden() on iOS
We now have events for on-screen keyboard visibility, so we should use these instead of starting and stopping text input.

Fixes https://github.com/libsdl-org/SDL/issues/15437
Confirmed not to regress the fix in https://github.com/libsdl-org/SDL/pull/11845
2026-04-27 10:54:03 -07:00
Ryan C. Gordon
0bf2fa8978 internal: Replace SDL_PUSH_ERROR with SDL_PushError.
Reference Issue #15458.
2026-04-27 09:33:46 -04:00