Commit Graph

2695 Commits

Author SHA1 Message Date
Ryan C. Gordon
f7d5bb3c7a cpuinfo: Added SDL_GetSystemPageSize.
Fixes #14201.
2025-10-10 21:16:10 -04:00
Anonymous Maarten
45d65f6e1f Older Visual Studio does not provide a intptr_t typedef 2025-10-11 01:00:03 +02:00
Anonymous Maarten
121df30a8a Visual Studio 2003 (and older) do not support variadic macros 2025-10-11 01:00:03 +02:00
Anonymous Maarten
049eeee087 Visual Studio versions older then 6.0 do not support __forceinline 2025-10-11 01:00:03 +02:00
Sam Lantinga
6f8fbf5cea SDL_EVENT_CLIPBOARD_UPDATE isn't sent when the primary selection changes 2025-10-10 13:27:15 -07:00
SDL Wiki Bot
4f267fc782 Sync SDL3 wiki -> header
[ci skip]
2025-10-10 19:48:58 +00:00
Sam Lantinga
692c71a677 The dlopen note functionality is only used on UNIX platforms 2025-10-10 12:47:42 -07:00
Sam Lantinga
ee622c570a Made SDL_dlopennote.h a public header 2025-10-10 12:47:42 -07:00
Sam Lantinga
1871b998cd Added SDL_EVENT_SCREEN_KEYBOARD_SHOWN and SDL_EVENT_SCREEN_KEYBOARD_HIDDEN
Fixes https://github.com/libsdl-org/SDL/issues/13049
2025-10-10 10:14:07 -07:00
Sam Lantinga
6677fad1c8 Added SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED
Fixes https://github.com/libsdl-org/SDL/issues/12785
2025-10-09 19:15:45 -07:00
SDL Wiki Bot
bfc96c92fd Sync SDL3 wiki -> header
[ci skip]
2025-10-10 00:36:10 +00:00
SDL Wiki Bot
add18e52c8 Sync SDL3 wiki -> header
[ci skip]
2025-10-09 19:21:44 +00:00
Sam Lantinga
23e3cbec20 Only call clipboard callbacks with mime types they expect
Also clarified that returning NULL from a callback sends zero length data to the receiver, which should be able to handle that.

Fixes https://github.com/libsdl-org/SDL/issues/9586
2025-10-09 12:20:19 -07:00
unknown
84981ead73 docs: Note that Windows might block SDL_PollEvent() on window drag.
Reference Issue #13435.
2025-10-09 13:41:49 -04:00
SDL Wiki Bot
5832fd6fc5 Sync SDL3 wiki -> header
[ci skip]
2025-10-09 15:55:02 +00:00
Sam Lantinga
9a6455a526 Disable GameInput for mouse and keyboard by default
We're going to wait for this to get more testing before enabling it by default.

Fixes https://github.com/libsdl-org/SDL/issues/13846
2025-10-08 21:22:22 -07:00
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