Commit Graph

20262 Commits

Author SHA1 Message Date
Ryan C. Gordon
bab4bb3817 examples: Fixed HTML output with multi-paragraph READMEs. 2025-09-07 11:48:53 -04:00
Frank Praznik
8c4e048a68 x11: Fail gracefully on keymap creation failure 2025-09-07 11:37:56 -04:00
Ryan C. Gordon
2a0e751ff5 gamepad: Fixed Emscripten guide button, after recent changes.
(buttons above 12 all shifted down by four, since the dpad buttons now look
like a hat...the only one above the dpad buttons on a standard layout is the
guide button, index 16. This change moves it to 12.)
2025-09-07 10:25:12 -04:00
Ryan C. Gordon
82a800e266 emscripten: Let joystick dpad-to-hat conversion allow impossible combinations.
This matches what other backends do.
2025-09-07 10:02:20 -04:00
Ryan C. Gordon
b58d0f8e4e gamepad: Fixed Emscripten d-pad, after recent changes. 2025-09-07 10:00:41 -04:00
Ryan C. Gordon
79b881fc2e examples: Minor tweak to joystick examples' comments. 2025-09-06 23:03:46 -04:00
Ryan C. Gordon
cf92ef7994 examples: Added input/03-gamepad-polling 2025-09-06 23:03:04 -04:00
Sam Lantinga
25d9096d41 Fixed rumble strength on DualSense Edge and Bluetooth connected controllers
Fixes https://github.com/libsdl-org/SDL/issues/13771
2025-09-06 11:53:32 -07:00
SDL Wiki Bot
cbcb1d42c4 Sync SDL3 wiki -> header
[ci skip]
2025-09-06 18:23:12 +00:00
Sam Lantinga
fb2daa2f5f Updated the documentation for SDL_GetRenderLogicalPresentation()
Fixes https://github.com/libsdl-org/SDL/issues/13791
2025-09-06 11:21:36 -07:00
Sam Lantinga
d03f3e11f6 Change the default YUV colorspace to SDL_COLORSPACE_BT601_LIMITED
This was the default for SDL2 and what people expect, migrating code.

Fixes https://github.com/libsdl-org/SDL/issues/13796
2025-09-06 11:04:25 -07:00
Adrian
01e6aceffc Set preferredFrameRateRange in main callbacks CADisplayLink 2025-09-06 10:13:27 -07:00
Sam Lantinga
02fc571cfd Fixed build 2025-09-06 10:12:01 -07:00
Sam Lantinga
5605f85d84 Check the return value of SDL_SW_CopyYUVToRGB() 2025-09-06 10:07:09 -07:00
Sam Lantinga
d21da8644b Revert "Make sure fast path RGB <-> YUV conversions are using the same color primaries"
This reverts commit ee87132385.

The supported conversions assume correct primaries for YUV converted to SRGB
2025-09-06 10:03:41 -07:00
Sam Lantinga
61e41c61dc Select the shader based on the inputs, not colorspace
Fixes https://github.com/libsdl-org/SDL/issues/13880
2025-09-06 08:58:17 -07:00
Ozkan Sezer
baf965c1ca Revert "video/openvr: define OPENVR_API_NODLL"
This reverts commit 976ba1e750.
2025-09-06 04:15:55 +03:00
Ozkan Sezer
976ba1e750 video/openvr: define OPENVR_API_NODLL
.. so that S_API doesn't expand to __declspec(dllimport)
2025-09-06 03:05:50 +03:00
Sam Lantinga
c573326f11 Fixed double-free in the OpenVR video backend 2025-09-05 14:47:20 -07:00
Ryan C. Gordon
a6dc61ab32 joystick: Emscripten can often fake a hat from the d-pad buttons.
Fixes #13817.
2025-09-05 14:46:59 -04:00
Ryan C. Gordon
937bf4d789 alsa: Restart PCM devices after recovery from an overrun/underrun.
snd_pcm_recover() puts the device back in SND_PCM_STATE_PREPARED state; you
have to explicitly restart the device afterwards with snd_pcm_start().

Fixes #13761.
2025-09-05 13:50:06 -04:00
SDL Wiki Bot
197bfab0b5 Sync SDL3 wiki -> header
[ci skip]
2025-09-05 16:44:33 +00:00
Ryan C. Gordon
b8197a2291 io: rework how we set SDL_IOStream status.
This now relies on the implementation to set these flags on short reads/writes
instead of the higher level checking if SDL_SetError() was called.

Additionally (and crucially), this now sets ERROR or EOF on all short reads,
across all backends, not just when we get a zero-byte return value.

Fixes #13720.
2025-09-05 12:43:13 -04:00
Aleksey Melekh
129c97f610 xbox: fix build 2025-09-05 09:19:54 -07:00
Sam Lantinga
3572be3998 Improved detection of FlyDigi controllers 2025-09-04 18:21:17 -07:00
Simon McVittie
99da009308 wikiheaders: Escape backslash in man pages
Otherwise, groff will interpret it as a macro, causing the man page
for SDL_GetPrefPath() to be mis-rendered. Escape unescaped backslashes
as `\(rs` ("reverse solidus") before escaping other characters with
macros that, themselves, contain backslashes.

Resolves: https://github.com/libsdl-org/SDL/issues/13039
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-09-04 19:59:15 -04:00
SDL Wiki Bot
5505cb2bb9 Sync SDL3 wiki -> header
[ci skip]
2025-09-04 23:54:17 +00:00
Ryan C. Gordon
3597877277 SDL_main.h: Cleanups in SDL_RegisterApp documentation.
There is an escaped pipe character, because this ends up in a Markdown table
on the wiki, and the wiki software (incorrectly, I think) sees the pipe inside
a code-block and thinks it's the end of the table cell if not escaped.

But this escape char looks wrong everywhere else.

Keeping the parameter table terse is always a good idea, so I moved the
detail out to the Remarks section, which doesn't have a problem with this
character appearing in the text.
2025-09-04 19:50:04 -04:00
Sam Lantinga
a9b5a1e785 Simplified the transparent software renderer test 2025-09-04 10:31:22 -07:00
Sam Lantinga
f48c20f481 Added testsoftwaretransparent to the CMake build system 2025-09-04 09:25:05 -07:00
Sam Lantinga
9e3d5969e6 Fixed testsoftwaretransparent on platforms using a renderer for window surfaces 2025-09-04 09:24:22 -07:00
Qiang
f2d2cd8152 fix: Blending rendering anomaly when using the software renderer with SDL_WINDOW_TRANSPARENT on Windows. (#13866) 2025-09-04 07:41:45 -07:00
Sam Lantinga
ea1a769322 Fixed the perspective matrix calculation (thanks @KonkolyTamas!)
Fixes https://github.com/libsdl-org/SDL/issues/13867
2025-09-04 06:04:01 -07:00
Sam Lantinga
637a9b34ab Added a comment explaining the initialization delay 2025-09-03 15:47:21 -07:00
Cameron Cawley
41452ef4bf Remove unused OpenGL references in the examples CMakeLists 2025-09-03 15:43:59 -07:00
Cameron Cawley
54745c5cf4 Only bundle the required resources with examples on the 3DS 2025-09-03 15:43:59 -07:00
Cameron Cawley
20c00babbc Create an application bundle for examples on Mac OS X 2025-09-03 15:43:59 -07:00
Sam Lantinga
b6a55c2856 Wait a bit for initialization to complete before requesting calibration data
Fixes https://github.com/libsdl-org/SDL/issues/13856
2025-09-03 15:36:58 -07:00
Cameron Cawley
42f571ea4b Remove unused PSP source files 2025-09-03 15:19:24 -07:00
Sam Lantinga
9abeeebad5 Fixed warning: no previous prototype for function 2025-09-03 11:23:55 -07:00
Simon McVittie
4441d8b0ad x11: Don't include XDestroyImage in the table of exported functions
When linking directly to libX11 as a hard dependency, we assign the
addresses of functions like XDestroyImage to function pointers like
X11_XDestroyImage. However, by default Xutils.h doesn't declare
XDestroyImage as a function: it only provides a macro which looks into
the XImage struct and calls a function pointer directly, similar to
a virtual method.

SDL_x11framebuffer.c was already relying on being able to call the macro
without explicitly linking to libX11, so do the same here.

Fixes: d14cbd7b "Introduce X11 toolkit and make message dialogs use it"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-09-03 09:22:38 -07:00
eafton
51052245d1 X11TK: Fix locale bug for non-dialog windows 2025-09-03 07:00:59 -07:00
Sylvain
b084999d40 testautomation_events: initialize variable to prevent undefined read 2025-09-03 10:15:01 +02:00
Sam Lantinga
437d78499c Don't set SDL_SURFACE_LOCK_NEEDED until a surface is RLE encoded
Reference https://github.com/libsdl-org/sdl2-compat/issues/476
2025-09-02 21:31:51 -07:00
Sam Lantinga
fbbc29159a Leave letterbox borders set to the frame clear color
Fixes https://github.com/libsdl-org/sdl2-compat/issues/483
2025-09-02 20:14:34 -07:00
Ozkan Sezer
cc9937201e x11: fix a typo after PR/13855 and kill lots of trailing whitespace 2025-09-03 04:37:56 +03:00
Sam Lantinga
ef19c72015 Set the texture scale and address mode when creating a texture
Fixes https://github.com/libsdl-org/sdl2-compat/issues/506
2025-09-02 18:05:31 -07:00
eafton
d14cbd7b50 Introduce X11 toolkit and make message dialogs use it (#13855) 2025-09-02 13:22:48 -07:00
Ryan C. Gordon
af74b1fe84 wikiheaders: Generate a current list of supported environment variables.
Fixes #13827.
2025-09-02 15:49:52 -04:00
Ozkan Sezer
83bb0f9105 cmake: simd detection clean-up for Apple multi-arch configs. 2025-09-02 22:34:10 +03:00