Commit Graph

20231 Commits

Author SHA1 Message Date
Sam Lantinga
c25a0b046a Make SDL_ObjectValid() inline for performance (thanks @mechakotik!) 2025-09-18 20:58:32 -07:00
Sam Lantinga
25b2d2c821 Use new parameter validation macro 2025-09-18 20:58:32 -07: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
1e2057f1fe Sync SDL3 wiki -> header
[ci skip]
2025-09-18 23:10:17 +00:00
Frank Praznik
f540de87b9 wayland: Always set the last incoming clipboard seat when setting clipboard data
Otherwise, the clipboard will report having no or old data until events are pumped.

Fixes the automated clipboard tests.
2025-09-18 17:44:58 -04:00
Sylvain
143f65c1f8 Android: silence false Lint warnings (the class are instantiated only at correct API level) 2025-09-18 13:54:21 -07:00
Sylvain
fb0a542b2a Android: Lint warning: LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is API Level 30 2025-09-18 13:54:21 -07:00
Sylvain
d631cf8409 Android: Lint warning: use some explicit Locale
Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
2025-09-18 13:54:21 -07:00
Sylvain
8da1021b51 Androind: Lint warning, use "apply()" instead of "commit()"
'Consider using apply() instead; commit writes its data to persistent storage immediately, whereas apply will handle it in the background'
2025-09-18 13:54:21 -07:00
Ethan Lee
4ee79e6493 filesystem: GetCurrentDirectory now falls back to GetBasePath when unsupported 2025-09-18 14:49:03 -04:00
Anonymous Maarten
b1b98b10d8 cmake: also install wasm debug map (optional) 2025-09-18 17:18:25 +02:00
Anonymous Maarten
447df411e6 cmake: install javascript and wasm of Emscripten tests 2025-09-18 05:28:22 +02:00
Anonymous Maarten
5dfa2cb88a Use SDL_abort when encountering a internal fatal SDL_assertion error 2025-09-17 22:54:23 +02:00
Anonymous Maarten
a7739ceccb Add SDL_internal macro for internal use 2025-09-17 22:54:23 +02:00
Anonymous Maarten
566e7c2379 ci: disable ccache on macOS 13 job 2025-09-17 21:50:26 +02:00
Kyle Sylvestre
3876ce3495 fix windows EOF check 2025-09-16 17:13:22 -07:00
Ryan C. Gordon
9ad04ff69e examples/misc/01-power/README.txt: fixed wording. 2025-09-16 14:37:51 -04:00
Ryan C. Gordon
1c9127ee4d examples: Preload onmouseover images, so it's more responsive to the user. 2025-09-16 14:22:39 -04:00
Ryan C. Gordon
efb5829124 examples/misc/01-power/README.txt: Note that this is Chrome-only for now. 2025-09-16 13:37:58 -04:00
Ryan C. Gordon
3ee29f2e7a render: Don't default to vsync=0 on Emscripten.
Fixes #12805.
2025-09-16 12:30:22 -04:00
Ryan C. Gordon
9dbf2c7c0f examples/misc/01-power: Forgot to remove my code for building onmouseover. 2025-09-16 12:21:48 -04:00
Sam Lantinga
aca9bd02bf Make sure DEBUG is defined for debug configurations 2025-09-16 09:12:33 -07:00
Ryan C. Gordon
f704661d22 examples: Added "misc" category for the web builds. 2025-09-16 12:08:04 -04:00
Ryan C. Gordon
e341cc44cc examples: Added misc/01-power 2025-09-16 12:06:12 -04:00
Ryan C. Gordon
85ea2bfbf0 examples: Much, much easier way to generate thumbnail and onmouseover files. 2025-09-16 12:06:12 -04:00
ManifoldFR
8bc4e029bd gpu/vulkan : fix clear value indexing 2025-09-16 08:45:35 -07:00
Frank Praznik
03e1523eb8 wayland: Add the libdecor toplevel bounds and constraints properties 2025-09-16 11:07:27 -04: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
Sora
964bedfdd9 fix: use productCategory instead of vendorName for joy name for apple driver 2025-09-15 11:51:06 -07:00
Andrei Alexeyev
287e786120 render/gpu: fix copypaste error in render initialization 2025-09-15 10:29:04 -07: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
Frank Praznik
cf646af707 Clean up old-style null check 2025-09-15 10:59:36 -04:00
Eddy Jansson
21c9f5304d wayland: Silence unused variable warning
'vd' and 'd' are only used if SDL_USE_LIBDBUS is set.
2025-09-15 10:26:23 -04:00
Sam Lantinga
dac6af4ba6 Only use a transparent cursor on Windows when connected via RDP
VMware relies on the cursor being set to NULL to optimize relative mouse motion for games.

We should also revisit whether current RDP works better with a NULL cursor or a transparent cursor.

Fixes https://github.com/libsdl-org/SDL/issues/13700
2025-09-14 17:24:40 -07:00
Sam Lantinga
cc3274b6f1 Remove Windows 32-bit ARM build from CI
This architecture is deprecated and is now failing with:
Windows SDK 10.0.22621.0 : 'C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um' not found or was incomplete

Fixes https://github.com/libsdl-org/SDL/issues/13949
2025-09-14 15:45:03 -07:00
Sam Lantinga
30e2fdc5a2 Sort the blacklist entry for the HP Deluxe Webcam KQ246AA 2025-09-14 15:38:47 -07:00
Nintorch
556ee00fe3 Fix HP Deluxe Webcam KQ246AA detected as joystick 2025-09-14 15:27:03 -07:00
Sam Lantinga
937b7e6aea Fixed testprocess on 32-bit Windows
Previously the test would kill the child process while it was in the process of initializing (loading DLLs, etc) and this would cause the test to fail.
2025-09-14 15:09:07 -07:00
Sam Lantinga
f8bace9b9b Remove the behavior of warping the mouse on fullscreen transitions
This made sense when switching between a window and an exclusive fullscreen video mode of the same dimensions, but it causes user confusion when the window changes size, and doesn't work well with Wayland. I've gotten this feedback from several sources, so we'll just go ahead and remove this behavior for now.

Fixes https://github.com/libsdl-org/SDL/issues/11577
2025-09-14 13:18:30 -07:00
Sam Lantinga
a1d3fc1f50 Clarify why we ignore EINVAL when flushing a file descriptor 2025-09-14 12:11:05 -07:00
Sam Lantinga
e40d337a47 Ignore errors flushing output on POSIX pipes
Fixes https://github.com/libsdl-org/SDL/issues/13116
Fixes https://github.com/libsdl-org/SDL/issues/13412
2025-09-14 12:09:16 -07:00
Sam Lantinga
0f2cb0a3f8 Fixed to match window event order 2025-09-14 11:38:09 -07: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
1aba421bd3 Wait briefly after enabling effects on DualSense controller
The rumble motors apparently take a short time to power up after enabling enhanced mode.

Fixes https://github.com/libsdl-org/SDL/issues/13909
2025-09-14 09:59:01 -07:00
Sam Lantinga
f2bdf2a8cc Removed unnecessary Windows version check 2025-09-14 09:01:42 -07:00