Commit Graph

2629 Commits

Author SHA1 Message Date
Ryan C. Gordon
9a7cd95ac3 properties: Added SDL_PROP_NAME_STRING.
Fixes #14155.
2025-10-08 21:50:18 -04:00
Ozkan Sezer
aab9423796 fix wiki breakage for commit e4f24ff7ae (PR/#14053) 2025-10-08 22:10:50 +03:00
SDL Wiki Bot
1e832c3900 Sync SDL3 wiki -> header
[ci skip]
2025-10-08 17:53:53 +00:00
Dima Volynets
e4f24ff7ae MacOS: Added hint to control update of the metal layer's drawable size (#14053) 2025-10-08 10:52:01 -07:00
SDL Wiki Bot
26a7346ead Sync SDL3 wiki -> header
[ci skip]
2025-10-06 23:47:11 +00:00
Sam Lantinga
73334b6bb4 Added support for loading and saving PNG images using stb_image 2025-10-06 16:45:53 -07:00
SDL Wiki Bot
8d81ee3f5d Sync SDL3 wiki -> header
[ci skip]
2025-10-06 20:25:05 +00:00
nmlgc
8df057fafc iostream: Properly support the "x" mode for SDL_IOFromFile()
The "x" mode for `fopen()` (open file only if it doesn't exist) used to
be a glibc-exclusive extension, but was later standardized in C11, and
is now also implemented as part of every other widely-used libc:

	* musl: https://git.musl-libc.org/cgit/musl/tree/src/stdio/__fmodeflags.c?id=0ccaf0572e9cccda2cced0f7ee659af4c1c6679a
	* Android Bionic / OpenBSD: 731631f300/libc/upstream-openbsd/lib/libc/stdio/flags.c (86)
	* Apple / FreeBSD: 63976b830a/stdio/FreeBSD/flags.c (L91-L92)

As a result, "x" has already been working on all our automatically
tested platforms that implement `SDL_IOFromFile()` via `fopen()`. So
all we'd be missing for proper support is a Windows implementation
using `CREATE_NEW`, and the documentation that this mode exists and is
intended to work.
2025-10-06 13:23:42 -07:00
SDL Wiki Bot
f90c179c5d Sync SDL3 wiki -> header
[ci skip]
2025-10-06 14:32:26 +00:00
Sam Lantinga
941b0a8ea4 Added support for external GPU textures to the GPU renderer 2025-10-06 07:31:00 -07:00
Sam Lantinga
134b47730b Added support for linear and pixel art scaling for palettized textures 2025-10-04 15:12:08 -07:00
Sam Lantinga
d832ac5d6f SDL_RenderDebugText() is no longer blurry when scaled 2025-10-04 12:04:07 -07:00
Sam Lantinga
32668c4ddd Palettized textures will always use SDL_SCALEMODE_NEAREST.
Our algorithm for pixel art doesn't work on 8-bit images, needs further investigation.

Fixes https://github.com/libsdl-org/SDL/issues/14129
2025-10-03 14:29:47 -07:00
SDL Wiki Bot
ed6b6bb7fc Sync SDL3 wiki -> header
[ci skip]
2025-10-02 17:02:50 +00:00
Ryan C. Gordon
24b47814f8 emscripten: Another attempt at optionally having the canvas use whole window.
Fixes #11949.
2025-10-02 13:01:35 -04:00
SDL Wiki Bot
352246cbb0 Sync SDL3 wiki -> header
[ci skip]
2025-10-02 16:25:57 +00:00
Anonymous Maarten
e66f7efa2f SDL_WINDOWPOS_* macros are to be used with SDL_[GS]etWindowPosition 2025-10-02 18:24:31 +02:00
Sam Lantinga
a864dcac25 Added support for using the GPU renderer as an offscreen renderer
SDL_CreateGPURenderer() now allows passing in an existing GPU device and passing in a NULL window to create an offscreen renderer.

Also renamed SDL_SetRenderGPUState() to SDL_SetGPURenderState().
2025-10-01 23:32:18 -07:00
Sam Lantinga
f66e4d0a43 Enable full object validation by default
Full object validation was always done before this hint and there are a number of shipping products that relied on this, so don't change it by default.
2025-10-01 12:46:33 -07:00
Sam Lantinga
9735c45db6 Added an advanced shader for the GPU renderer
This allows us to support YUV colorspaces and HDR in the GPU renderer.

Fixes https://github.com/libsdl-org/SDL/issues/11281
Fixes https://github.com/libsdl-org/SDL/issues/11282
2025-10-01 07:17:55 -07:00
Anonymous Maarten
30c2cda25e Don't use assert(0) for SDL_TriggerBreak
The assert macro is disabled when building with -DNDEBUG.
On Android, the debugger stopped in the wrong frame.
2025-09-30 15:45:26 +02:00
SDL Wiki Bot
da6fa5e65f Sync SDL3 wiki -> header
[ci skip]
2025-09-29 19:44:11 +00:00
Sam Lantinga
f61e271e11 Generalize and validate optional GPU feature properties
Fixes https://github.com/libsdl-org/SDL/issues/13139
Fixes https://github.com/libsdl-org/SDL/issues/13138
2025-09-29 12:42:47 -07:00
SDL Wiki Bot
1d7e70833b Sync SDL3 wiki -> header
[ci skip]
2025-09-29 05:11:33 +00:00
Sam Lantinga
0b4b254a53 Added support for textures with palettes
Closes https://github.com/libsdl-org/SDL/pull/6192
2025-09-28 22:10:06 -07:00
Ryan C. Gordon
a1672f2d2f docs: Fix param call on SDL_SetEventFilter.
https://wiki.libsdl.org/SDL3/README-documentation-rules#dont-repeat-type-names-in-param-and-returns-sections
2025-09-27 13:55:31 -04:00
SDL Wiki Bot
d8124a0cea Sync SDL3 wiki -> header
[ci skip]
2025-09-22 15:34:13 +00:00
Sam Lantinga
86203d8312 Document that the joystick and gamepad functions are thread-safe 2025-09-22 08:32:39 -07:00
Brenton Bostick
7622c4c427 fix typos 2025-09-22 07:23:49 -07:00
zuiki_inn
fc648e5546 Support ZUIKI MasconPro (#13770)
* Add ZUIKI controller

Support version:
MasconPro

Enable rumble
Disable sensors
2025-09-21 23:38:28 -07:00
Fierelier
3fd0b46215 [SDL3] [PS2] Framebuffer resolution + 240p/480p + PAL support (#13993)
* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc
2025-09-21 07:50:14 -07:00
SDL Wiki Bot
628d157676 Sync SDL3 wiki -> header
[ci skip]
2025-09-20 22:39:37 +00:00
SDL Wiki Bot
4376e10ed4 Sync SDL3 wiki -> header
[ci skip]
2025-09-19 03:59:55 +00:00
Sam Lantinga
ee1c90a358 Improved handling of function parameter validation
SDL supports the following use cases:
 * Normal operation with fast parameter checks (default):
    SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "1");
 * Object parameters are checked for use-after-free issues:
    SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "2");
 * Enable full validation, plus assert on invalid parameters:
    #define SDL_ASSERT_INVALID_PARAMS
 * Disable all parameter validation:
    #define SDL_DISABLE_INVALID_PARAMS
2025-09-18 20:58:32 -07:00
Sam Lantinga
49e15904ae Document that SDL_SCALEMODE_PIXELART is available in 3.4.0
Fixes https://github.com/libsdl-org/sdlwiki/issues/856
2025-09-18 20:22:15 -07:00
SDL Wiki Bot
08d84ea516 Sync SDL3 wiki -> header
[ci skip]
2025-09-15 20:55:52 +00:00
Merlyn Morgan-Graham
9905309c56 Update docs to describe enum result for SDL_GetCameraPermissionState 2025-09-15 16:54:33 -04:00
Ozkan Sezer
81f2f44843 SDL_endian.h: don't add _m_prefetch hack for clang-cl if available as a builtin
Fixes: https://github.com/libsdl-org/SDL/issues/13952 .
2025-09-15 20:04:29 +03:00
Sam Lantinga
402fa9434d Updated documentation to reflect that SDL_GetHint() is thread-safe
This was fixed at some point, so this updates the documentation to match.

Fixes https://github.com/libsdl-org/SDL/issues/13932
2025-09-14 11:28:45 -07:00
SDL Wiki Bot
5a2faaee29 Sync SDL3 wiki -> header
[ci skip]
2025-09-14 17:21:15 +00:00
SDL Wiki Bot
204246c2b7 Sync SDL3 wiki -> header
[ci skip]
2025-09-14 17:19:42 +00:00
Sam Lantinga
29e6e07396 Note it is safe to do drawing in response to SDL_EVENT_WINDOW_EXPOSED 2025-09-14 10:19:14 -07:00
Sam Lantinga
78a29d1670 Disable Windows.Gaming.Input by default
The functionality is already covered by XInput and DirectInput, and Microsoft is recommending GameInput going forward.

Fixes https://github.com/libsdl-org/SDL/issues/13000
2025-09-14 08:47:52 -07:00
cosmonaut
9603360b7e GPU: Allow rendering into depth texture layers and levels 2025-09-13 07:11:43 -07:00
Ryan C. Gordon
411e47ba00 docs: Remove a redundant comment.
(The wiki will link to this symbol, we don't have to explicitly mention it.)
2025-09-12 20:11:44 -04:00
Sam Lantinga
e7784b7bf7 Set GPU properties for maximum hardware compatibility
Resolves https://github.com/libsdl-org/SDL/issues/13928
2025-09-11 21:30:58 -07:00
SDL Wiki Bot
e035f3a480 Sync SDL3 wiki -> header
[ci skip]
2025-09-10 19:09:24 +00:00
Sam Lantinga
035eed351c Added SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat()
Fixes https://github.com/libsdl-org/SDL/issues/13899
2025-09-10 12:08:04 -07:00
SDL Wiki Bot
7840c9d879 Sync SDL3 wiki -> header
[ci skip]
2025-09-10 00:35:57 +00:00
Sam Lantinga
a4b180f515 Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER 2025-09-09 17:34:34 -07:00