Commit Graph

19063 Commits

Author SHA1 Message Date
SDL Wiki Bot f40ef62a2a Sync SDL3 wiki -> header
[ci skip]
2025-02-02 23:14:17 +00:00
SDL Wiki Bot 614ae843a9 Sync SDL3 wiki -> header
[ci skip]
2025-02-02 22:14:15 +00:00
Sam Lantinga 8848f86560 Corrected the version where SDL_SoftStretch() was added 2025-02-02 14:13:13 -08:00
Sam Lantinga a98a4b8a68 Re-added SDL_SoftStretch() to the API
This is needed for sdl2-compat, since a blit is not quite equivalent.
2025-02-02 13:41:36 -08:00
SDL Wiki Bot 842f85da05 Sync SDL3 wiki -> header
[ci skip]
2025-02-02 21:17:22 +00:00
Sam Lantinga c06172dc1c Track mouse button state by real mouse ID
We'll switch to the global mouse ID just once we are ready to deliver events.

This makes sure that any button events that come in for a specific mouse ID maintain that state if we switch to relative mode and start using that mouse ID for events.

Fixes https://github.com/libsdl-org/sdl2-compat/issues/263
2025-02-02 12:58:45 -08:00
Ozkan Sezer 73a8143581 timer, windows: allow building high resolution code with old SDKs. 2025-02-02 21:23:50 +03:00
Sam Lantinga be991239d9 Updated to version 3.2.3 for development 2025-02-01 17:43:38 -08:00
Sam Lantinga 2fa1e7258a Updated to version 3.2.2 for release 2025-02-01 17:01:45 -08:00
Em c922762791 proposed fix: set curr_src.h is to bottom_height before drawing bottom edges / corners in SDL_RenderTexture9Grid, to avoid issue where inadvertently using top height if the npatch existed on a larger texture than the drawn edge would cause too many pixels to be included in the bottom part of the render. 2025-02-01 16:09:08 -08:00
Sam Lantinga 235022fe2f Fixed error C2059: syntax error: '}'
Fixes https://github.com/libsdl-org/SDL/issues/12155
2025-02-01 15:32:58 -08:00
John Kvalevog dc13a6ae95 SDL_SaveBMP_IO: Write bitmap header v5 values
bV4CSType was changed to LCS_sRGB to work with Preview on macOS.

Fixes: #11903
2025-02-01 11:10:24 -08:00
SDL Wiki Bot fe6bd8e9bf Sync SDL3 wiki -> header
[ci skip]
2025-02-01 10:40:21 +00:00
Sam Lantinga bc3264130d Fixed mouse motion events while the mouse is grabbed
When the mouse is grabbed, the X server sends mouse events only to the grabbing client, and XInput2 events for the master device are not delivered.

We should consider using the window mouse rect confinement instead of a true X server grab for SDL mouse grab functionality.
2025-01-31 23:45:09 -08:00
Sam Lantinga 69d361dee1 Ignore SDL_HINT_RENDER_DRIVER set to software when creating a window surface
We handled the case where software was in a list of render drivers, but not when the hint was set to exactly "software".

Fixes https://github.com/libsdl-org/sdl2-compat/issues/266
2025-01-31 15:49:58 -08:00
Evan Hemsley 70a239210e
GPU: Describe "readonly storage" images as sampled images on Vulkan backend (#12149) 2025-01-31 15:07:33 -08:00
Sam Lantinga 4c6d949e6d wayland: make sure the desktop mode is in the fullscreen mode list
Fixes https://github.com/libsdl-org/SDL/issues/12079
2025-01-31 14:53:40 -08:00
Sam Lantinga ab5cb707a6 Fixed enabling call logging 2025-01-31 14:22:29 -08:00
Sam Lantinga 16f8122a0d Keep the simplest mapping of scancode + modifer for a given keycode
Fixes https://github.com/libsdl-org/sdl2-compat/issues/259
2025-01-31 12:07:08 -08:00
Timothee Besset 6beda34215 do not build camera drivers if camera support is disabled 2025-01-31 10:24:54 -08:00
Frank Praznik 0825d07a43 wayland: Don't send size events while the window is hidden
Some clients don't expect this, and it can cause issues, particularly if events are emitted while creating a hidden window.
2025-01-31 12:40:07 -05:00
Evan Hemsley 8e766c9252
GPU: Resource binding state shadowing (#12138)
---------

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2025-01-31 08:34:10 -08:00
SDL Wiki Bot 43924ec873 Sync SDL3 wiki -> header
[ci skip]
2025-01-31 01:04:48 +00:00
SDL Wiki Bot 8c2682a219 Sync SDL3 wiki -> header
[ci skip]
2025-01-31 00:56:29 +00:00
Ozkan Sezer e4fcc7b6e7 gpu/vulkan/SDL_gpu_vulkan.c: fix type redefinition error
src/gpu/vulkan/SDL_gpu_vulkan.c:763: error: redefinition of typedef 'VulkanUniformBuffer'
src/gpu/vulkan/SDL_gpu_vulkan.c:482: note: previous declaration of 'VulkanUniformBuffer' was here
2025-01-31 02:50:00 +03:00
John Alanbrook 14edb21aec check for backslashes as well as the forward slash 2025-01-30 12:41:48 -08:00
SDL Wiki Bot 50b8c6cdfb Sync SDL3 wiki -> header
[ci skip]
2025-01-30 19:31:13 +00:00
Ryan C. Gordon 943c4abcb4
pipewire: Report correct device default formats instead of hardcoding Float32.
The comment in the source wasn't true; PipeWire doesn't _have_ to work in
float format. It presumably does if it has to mix, but if a game is the only
thing making noise on the system--a common scenario--then it might be able to
pass, say, Sint16 data straight through to the hardware without conversion.

Fixes #12129.
2025-01-30 02:46:56 -05:00
Aki 943579a545 Fix inverted pen Y tilt on macOS and add tilt display to example
- Negate tilt.y in Cocoa pen handling to correct inverted Y tilt axis
- Update drawing example to display X/Y tilt values for visualization
- see 0f128fd7c5/src/plugins/platforms/cocoa/qnsview_tablet.mm (L63)
- see https://source.chromium.org/chromium/chromium/src/+/main:components/input/web_input_event_builders_mac.mm;drc=0af5ffa1e4cc4cc4f818725f8fee93ec57855e4b;l=421
2025-01-29 22:09:02 -08:00
Petar Popovic 31364477f2 Rename parameter of type SDL_CameraID from devid to instance_id 2025-01-29 17:49:53 -08:00
Petar Popovic 36758d70c9 Rename parameters of type SDL_AudioDeviceID from dev to devid 2025-01-29 14:44:08 -08:00
Seth Anderson 2abc7735a4 Free XIDeviceInfo in X11_MaybeAddPenByDeviceID 2025-01-29 10:55:49 -08:00
Sam Lantinga 8298d60e4a Dynamically load CreateWaitableTimerExW and SetWaitableTimerEx
These functions are not available on Windows XP
2025-01-29 05:40:49 -08:00
Sam Lantinga 409f3ade88 Removed SDF test program
There's a much better example of SDF support in testgputext in SDL_ttf
2025-01-29 04:15:27 -08:00
Sam Lantinga 4176e188bf Enable testgles2 on all platforms
We use SDL's headers so we're not dependent on system OpenGL header availability.
2025-01-29 04:03:31 -08:00
Timothee Besset cf249b0cb2 fix -Wformat problem in 32 bit builds 2025-01-28 16:57:25 -08:00
SDL Wiki Bot 11dbff246f Sync SDL3 wiki -> header
[ci skip]
2025-01-28 19:01:16 +00:00
Ryan C. Gordon ccd5fcef12
audio: Fix potential NULL dereference in AudioStream gain adjustment.
You can end up with a NULL scratch buffer, which is otherwise not needed on
this path, then ConvertAudio will end up needing that scratch space to move
to float32 to apply gain.

Fixes #12091.
(I assume.)
2025-01-28 13:14:25 -05:00
Frank Praznik 48f5550651
wayland: Don't send keyboard and mouse added events during initialization
Only send them when a device is added post-initialization, as is done on other platforms.
2025-01-28 13:02:29 -05:00
Sam Lantinga 2a946e91bc android: updated release build SDK to match documented requirements 2025-01-28 06:03:37 -08:00
Sam Lantinga 44edbf7137 Use templates for the package support files
This makes them more easy to reuse in other projects.
2025-01-28 06:03:37 -08:00
Adam Kewley 1c008d8ed0 Change DBUS introspection timer from INFINITE -> DEFAULT when introspecting available dialog services 2025-01-28 05:13:35 -08:00
Carl Åstholm c21bc48a70 Fix undefined behavior in SDL_windowsmouse.c
This fix prevents C undefined behavior from being invoked on Windows
if the user's configured cursor speed is below 6.
2025-01-28 05:12:16 -08:00
Sam Lantinga 1c7cc60286 Skip IsRegularFileOrPipe() check on Emscripten
The sandbox guarantees that this will be true.

Fixes https://github.com/libsdl-org/SDL/issues/12108
2025-01-27 22:25:12 -08:00
Ryan C. Gordon 8f958953f1
audio: Fix audio stream gain going wrong in certain scenarios.
Fixes #12091.
2025-01-27 20:20:17 -05:00
Ryan C. Gordon 3b3af7105b
audio: Fix a minor code style thing. 2025-01-27 20:20:17 -05:00
mausimus 725ee7665c Documentation: fixed typos around floats precision 2025-01-27 14:12:24 -05:00
Petar Popovic 6f098a920e Avoid a crash when a tray without a menu is clicked on Windows. 2025-01-26 23:27:28 -08:00
Ryan C. Gordon 09f900f66e
audio: Remove resampling limits.
Audio streams used to accept audio with a src or dest frequency between
4000Hz and 384000Hz. It was arbitrary (or perhaps a relic of older
resampler revisions), and testing shows unnecessary, so remove it.

Fixes #12098.
2025-01-27 01:13:54 -05:00
Sam Lantinga 5f8e0ebf58 Fixed memory leak at shutdown 2025-01-26 19:30:29 -08:00