Commit Graph

20222 Commits

Author SHA1 Message Date
Ryan C. Gordon
507593f485 wikiheaders: Allow symbols to be filtered from manpage generation by regex.
This is specifically to prevent generating a manpage for "Uint32" and friends.

Fixes #11898.
2025-01-09 14:13:00 -05:00
Ethan Lee
7acf78ba92 storage: Trim the title storage root from enumerated paths 2025-01-09 13:50:52 -05:00
Frank Praznik
037cd25a22 win32: Use the pending size during NCCALCSIZE
Non-resizable windows still need to apply the pending size, as they can be resized programmatically.

Fixes programmatically resizing windows without the WS_THICKFRAME style.
2025-01-09 12:27:05 -05:00
Cameron Cawley
e8916b2608 pipewire: Use byte order pixel format aliases 2025-01-09 09:52:30 -05:00
SDL Wiki Bot
d2090d1c80 Sync SDL3 wiki -> header
[ci skip]
2025-01-09 06:38:16 +00:00
Ryan C. Gordon
3f7f632e14 audio: Added SDL_AudioDeviceStreamPaused.
We had the other two wrapper functions to pause and resume, and forgot query.
2025-01-09 01:36:57 -05:00
Ryan C. Gordon
f61860fa93 testautomation: fixed incorrect test.
The test was doing this:

- The output size is 80x60
- The logical size is 40x30
- The viewport is { 10, 7, 40, 30 }
- Draw to fill this whole viewport.

This would offset the filled rectangle a little, as before, but then the
viewport was the size of the entire logical space, so it wasn't a rectangle
centered in the middle of the output, as was expected.

This used to produce the expected output before the fix in
fa7a529912. But it appears the test was
incorrect, so this tweaks the viewport to produce the expected result.
2025-01-08 23:33:39 -05:00
Ryan C. Gordon
4bb3c2a1c7 render: Some cleanups.
Mostly setting NULL pointers to a local struct instead of copying non-NULL
pointers' contents into the local struct.
2025-01-08 14:59:28 -05:00
Ryan C. Gordon
61bdbacdae render: SDL_RenderTextureTiled shouldn't try to drop draw calls, either. 2025-01-08 14:59:28 -05:00
Ryan C. Gordon
f044a3d6ca Revert "render: GetRenderViewportSize shouldn't use scale, just logical presentation."
This reverts commit ef758d05c1.

Turns out the bug in #11076 was that we were dropping texture draws
incorrectly, not that scale shouldn't be applied here. The dropped draw calls
were fixed in bf85320947, and this revert is
making the renderer consistent again.
2025-01-08 14:59:27 -05:00
Ryan C. Gordon
fa7a529912 render: GetRenderViewportSize shouldn't scale viewport dimensions.
These are already scaled for the logical presentation (unless using the pixel
dimensions instead; we still scale those here).

Fixes #11704.
2025-01-08 14:59:27 -05:00
SDL Wiki Bot
1636009511 Sync SDL3 wiki -> header
[ci skip]
2025-01-08 19:57:05 +00:00
Ryan C. Gordon
bf85320947 render: Don't try to drop draws outside of the viewport.
It didn't take scale into account, and the backends would need to do clipping
anyhow, so let the system figure that out for us at the lower level.

Fixes #11318.
2025-01-08 11:55:10 -05:00
Frank Praznik
f2f04e825d tests: Fix get/set window size test being skipped
A return check conversion was missed when the SDL_* functions were converted to return boolean values instead of int, which caused this test to be skipped.
2025-01-08 11:02:45 -05:00
SDL Wiki Bot
cbdbd66e18 Sync SDL3 wiki -> header
[ci skip]
2025-01-08 15:33:53 +00:00
Simon McVittie
ef1fdf11bd tray: Create tray icons for libappindicator securely
If we write directly to filenames in /tmp, we're subject to
time-of-check/time-of-use symlink attacks on most systems (although
recent Linux kernels mitigate these by default). We can avoid these
attacks by securely creating a directory owned by our own uid,
and doing all our file I/O in that directory. Other uids cannot create
symbolic links in that directory, so we are protected from symlink
attacks.

This does not protect us from an attacker that is running with the same
uid, but if such an attacker exists, then we have already lost.

Resolves: https://github.com/libsdl-org/SDL/issues/11887
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-01-08 07:26:02 -08:00
Sam Lantinga
e6bb50a710 Updated to version 3.1.9 for development 2025-01-07 17:51:00 -08:00
SDL Wiki Bot
6b34c9fe7f Sync SDL3 wiki -> header
[ci skip]
2025-01-08 01:50:36 +00:00
Sam Lantinga
22422f7748 Fixed ABI compatibility with 3.1.6 preview-3.1.8 2025-01-07 17:32:59 -08:00
Sam Lantinga
d7b10d05b1 Updated to version 3.1.8 for the preview release 2025-01-07 17:04:05 -08:00
Simon McVittie
4290fc8bda tray: Load GTK and libappindicator by versioned names, except on OpenBSD
We are expecting a specific ABI (we can see that from the declarations
listed in this file) and the whole point of SONAME versioning is to
say that the library conforms to a specific ABI. If the SONAME is not
the one we expect, then calling its functions is likely to crash.

As usual, an exception to this is that OpenBSD does not use SONAME
versioning.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-01-07 14:02:01 -08:00
Simon McVittie
6b38d250aa tray: Don't try to use GTK 2 versions of libappindicator
We use GTK 3 functions in this file, so we cannot load a libappindicator
whose SONAME indicates that it is using GTK 2.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-01-07 14:02:01 -08:00
Simon McVittie
bba066c44c tray: Don't call g_object_unref(NULL)
g_object_unref() only accepts valid object instances.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-01-07 14:01:08 -08:00
ritalat
0bc370dfba Android doc cleanup 2025-01-07 16:56:29 -05:00
Ryan C. Gordon
6934c910b3 opengl: use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_INT_8_8_8_8_REV.
This seems to be significantly more efficient on some modern platforms, but if
this turns out to be a widespread disaster, we can revert it.
2025-01-07 16:08:56 -05:00
Sam Lantinga
0176a19aee Fixed platform define condition for Windows phone
Fixes https://github.com/libsdl-org/SDL/issues/11876
2025-01-07 08:47:54 -08:00
Ryan C. Gordon
0180ca541e windows: Catch WM_POINTERCAPTURECHANGED events.
Fixes #11844.
2025-01-07 10:22:15 -05:00
Ozkan Sezer
8ec576ddab tray, windows: fix logic error from commit 1167cf54e1 2025-01-07 10:15:40 +03:00
Sam Lantinga
748f0b3201 Improved Steam Controller detection on iOS 2025-01-06 17:16:23 -08:00
Frank Praznik
ba1a980535 wayland: Only apply the toplevel bounds when initially mapping the window
The size shouldn't be clamped to the bounds after the window is mapped, or an explicitly requested user size may be overwritten.
2025-01-06 17:07:16 -05:00
Frank Praznik
28389f1c38 wayland: Apply toplevel bounds to windows
Apply the supplied xdg-toplevel bounds to resizable windows during initial mapping. Libdecor functionality will have to be added separately, as the functionality needs to be added to the library first.
2025-01-06 16:06:03 -05:00
Sam Lantinga
ef52a4d4df Fixed warning C4389: '==': signed/unsigned mismatch 2025-01-06 12:03:45 -08:00
Sam Lantinga
8d8649b33f Fixed error: returning 'SDL_TrayEntry **' from a function with incompatible return type 'const SDL_TrayEntry **' 2025-01-06 11:35:54 -08:00
Sam Lantinga
f8b13dadd7 Enabled warning level 4 on Visual Studio
This catches uninitialized variables, etc. and matches Steam's warning level
2025-01-06 11:30:36 -08:00
Sam Lantinga
1167cf54e1 Fixed warning C4706: assignment within conditional expression 2025-01-06 11:30:28 -08:00
Sam Lantinga
8a9b7ae8d1 Switched nEntries to int, to avoid signed/unsigned comparison warnings
Also standardized memory allocation calls to match SDL style
2025-01-06 11:29:28 -08:00
Sam Lantinga
fb4ec07119 Fixed warning C4701: potentially uninitialized local variable 'previous_context' used 2025-01-06 11:18:45 -08:00
Ryan C. Gordon
b674b715f5 fix integer overflow ub in testautomation_sdltest
(cherry-picked from commit f804293a27)
2025-01-06 13:18:03 -05:00
Ryan C. Gordon
1e1442ed4a README-migration.md: Note the GL/EGL library environment variable removals. 2025-01-06 13:12:31 -05:00
Ryan C. Gordon
d8c7006a42 README-migration.md: Removed obsolete documentation.
Fixes #11434.
2025-01-06 13:07:21 -05:00
Ryan C. Gordon
6473de59b7 SDL_keyboard.h: Note that SDL_GetKeyName() returns uppercase letters.
Reference Issue #11434.
2025-01-06 12:47:44 -05:00
SDL Wiki Bot
c7584df999 Sync SDL3 wiki -> header
[ci skip]
2025-01-06 16:17:26 +00:00
Ryan C. Gordon
1f54b228ff video: Convert some EGL environment variables to SDL hints.
Fixes #10479.
2025-01-06 11:15:26 -05:00
Sam Lantinga
7c9f6c6313 Remove debug logging 2025-01-05 20:06:50 -08:00
SDL Wiki Bot
19ddb29d2d Sync SDL3 wiki -> header
[ci skip]
2025-01-06 02:54:14 +00:00
Ryan C. Gordon
d16f76e3d4 wasapi: Don't crash/hang if transitioning to/from a Remote Desktop Connection.
Fixes #9673.
2025-01-05 21:53:35 -05:00
Ryan C. Gordon
742f2a2fad SDL_render.h: Improve SDL_ConvertEventToRenderCoordinates documentation.
Fixes #9424.
2025-01-05 20:55:42 -05:00
Frank Praznik
2b375d9704 wayland: Don't enable the text-input protocol when using Fcitx
Otherwise, key repeat will be broken. Enabling it under Wayland isn't recommended anyway.
2025-01-05 17:53:58 -05:00
Semphris
dcc645e413 Fix HTML examples template tabs
Tab labels now follow their drawer again. Also, to avoid tabs covering
up code or debugging logs, the tab label that's on top (and therefore
not automatically hidden behind the other drawer when that drawer
opens) will now automatically hide itself when the other drawer is
opened.
2025-01-05 11:39:20 -08:00
SDL Wiki Bot
ece6a6ed8f Sync SDL3 wiki -> header
[ci skip]
2025-01-05 19:12:20 +00:00