Commit Graph

3747 Commits

Author SHA1 Message Date
Evan Hemsley 3ee39f6c3f
GPU: Revise swapchain acquisition (#11633)
---------

Co-authored-by: Lucas Murray <22484+lmurray@users.noreply.github.com>
2024-12-11 11:16:35 -08:00
Ryan C. Gordon f45ce45603 ngage: Remove Nokia N-Gage support.
This can be reverted if a toolchain arrives that can handle C99 features like
variables declared in the middle of a scope, but for now we literally can't
compile SDL3 for this platform.

Fixes #11243.
2024-12-11 13:29:43 -05:00
SDL Wiki Bot e6e468d0c4 Sync SDL3 wiki -> header
[ci skip]
2024-12-11 00:28:23 +00:00
Ryan C. Gordon be5fba963a
wikiheaders: optionally generate a Quick Reference page.
Plus some fixes to SDL's headers this brought up.
2024-12-10 11:25:15 -05:00
Anonymous Maarten 1d5d948ccf
Fix building SDL3 without dialog support 2024-12-08 14:31:19 +00:00
SDL Wiki Bot f64e9a52dc Sync SDL3 wiki -> header
[ci skip]
2024-12-07 04:33:05 +00:00
SDL Wiki Bot d25cdc0fef Sync SDL3 wiki -> header
[ci skip]
2024-12-07 00:20:38 +00:00
Sam Lantinga 08de6656fc Document the pixel layout of YUV format surfaces
Fixes https://github.com/libsdl-org/SDL/issues/10530
2024-12-06 16:14:05 -08:00
SDL Wiki Bot 2ac62d8c67 Sync SDL3 wiki -> header
[ci skip]
2024-12-06 22:17:01 +00:00
SDL Wiki Bot 7278399366 Sync SDL3 wiki -> header
[ci skip]
2024-12-06 22:15:20 +00:00
expikr d0f1910918 add SDL_RenderTextureAffine 2024-12-06 14:14:47 -08:00
SDL Wiki Bot 2c4fc2e549 Sync SDL3 wiki -> header
[ci skip]
2024-12-06 21:46:49 +00:00
Evan Hemsley fa5f84fb6e
GPU: Add SetGPUAllowedFramesInFlight (#11599) 2024-12-06 11:56:20 -08:00
SDL Wiki Bot c49f4ceeb2 Sync SDL3 wiki -> header
[ci skip]
2024-12-06 00:49:29 +00:00
Sam Lantinga 23828b62d4 Added SDL_IsMainThread() and SDL_RunOnMainThread() 2024-12-05 13:53:51 -08:00
Sam Lantinga bc4185c685 Document that video and input functions should be called on the main thread.
This is a hard requirement on Apple platforms and while most other platforms don't have a concept of main thread, all video and input functions should be called on the same thread.
2024-12-05 13:53:51 -08:00
SDL Wiki Bot 9f8157f42c Sync SDL3 wiki -> header
[ci skip]
2024-12-05 08:29:19 +00:00
Ryan C. Gordon 951ca96dc9
asyncio: Added more category documentation. 2024-12-04 23:08:36 -05:00
SDL Wiki Bot a74693c9a5 Sync SDL3 wiki -> header
[ci skip]
2024-12-04 23:10:49 +00:00
Semphris a4852f3a10 SDL_ShowFileDialogWithProperties with more options 2024-12-04 15:10:15 -08:00
numzero 123306b18c X11: support _NET_WM_SYNC_REQUEST 2024-12-04 11:59:46 -05:00
SDL Wiki Bot 2ad5836d02 Sync SDL3 wiki -> header
[ci skip]
2024-12-04 00:12:42 +00:00
SDL Wiki Bot 31d09909b6 Sync SDL3 wiki -> header
[ci skip]
2024-12-03 23:04:47 +00:00
Ryan C. Gordon 46f43c2e6e asyncio: Remove `SDL_AsyncIOTask` from the public API. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon 3ca629ceb5 asyncio: Allow file closes to request a flush/fsyncdata. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon 022a6a9f97 asyncio: Added Linux io_uring support. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon e79ce2a200 asyncio: Added async i/o APIs. 2024-12-03 17:32:20 -05:00
Eduard Gushchin 7293c18314 Fixed an inaccuracy in the return parameter information in the SDL_ConvertPixels function 2024-12-03 11:32:04 -08:00
Eduard Gushchin 401187eb6c Removed extra sa in SDL_ConvertSurfaceAndColorspace 2024-12-03 09:38:56 -08:00
Nicolas Allemand b7a31ead08 added "gpu" to the list of possible values of SDL_HINT_RENDER_DRIVER in SDL_hints.h 2024-12-03 09:06:40 -08:00
Eduard Gushchin 9fb8661684 Fixed an inaccuracy in the return parameter information in the SDL_SurfaceHasAlternateImages function 2024-12-03 08:41:30 -08:00
SDL Wiki Bot 068d9cc7d6 Sync SDL3 wiki -> header
[ci skip]
2024-12-02 00:37:15 +00:00
Ryan C. Gordon 2f59a1ce44
SDL_audio.h: Fixed a documentation typo (thanks, @JBetz!). 2024-12-01 19:36:03 -05:00
SDL Wiki Bot 3a1d76d298 Sync SDL3 wiki -> header
[ci skip]
2024-11-29 22:32:15 +00:00
Ryan C. Gordon ce573b01f8 audio: Added SDL_IsAudioDevicePhysical and SDL_IsAudioDevicePlayback.
Fixes #11529.
2024-11-29 17:31:37 -05:00
Ryan C. Gordon bf9fa38920
SDL_audio.h: Fixed two typos. 2024-11-28 00:12:03 -05:00
Ryan C. Gordon f5ad66ef4b audio: Allow channel maps to specify -1 to mute a channel.
Fixes #11373.
2024-11-28 00:00:30 -05:00
SDL Wiki Bot 3303e9843f Sync SDL3 wiki -> header
[ci skip]
2024-11-28 04:42:44 +00:00
Ryan C. Gordon f852038384 filesystem: Added SDL_GetCurrentDirectory().
Fixes #11531.
2024-11-27 23:42:11 -05:00
SDL Wiki Bot c0f1fe8e7f Sync SDL3 wiki -> header
[ci skip]
2024-11-28 04:36:33 +00:00
SDL Wiki Bot b8bbd29ce9 Sync SDL3 wiki -> header
[ci skip]
2024-11-27 06:11:04 +00:00
SDL Wiki Bot 03d15c031b Sync SDL3 wiki -> header
[ci skip]
2024-11-25 22:44:00 +00:00
expikr d55e6dfc5e hint for which system cursor to use as default
Co-Authored-By: Sam Lantinga <slouken@libsdl.org>
2024-11-25 13:08:37 -08:00
SDL Wiki Bot 3c13bae64f Sync SDL3 wiki -> header
[ci skip]
2024-11-25 19:07:53 +00:00
SDL Wiki Bot e9fdcf6c60 Sync SDL3 wiki -> header
[ci skip]
2024-11-25 17:20:21 +00:00
SDL Wiki Bot e14d939ead Sync SDL3 wiki -> header
[ci skip]
2024-11-24 17:41:07 +00:00
SDL Wiki Bot b02285d495 Sync SDL3 wiki -> header
[ci skip]
2024-11-22 20:53:04 +00:00
Maia 97ddc9adf2 Fix outdated references to SDL symbols in docs. Fixes #11503 2024-11-22 15:52:31 -05:00
Ryan C. Gordon 615c935d11 events: Added SDL_RenderEvent.
Fixes #11465.
2024-11-22 15:01:09 -05:00
SDL Wiki Bot e94ba6e700 Sync SDL3 wiki -> header
[ci skip]
2024-11-22 03:38:20 +00:00
SDL Wiki Bot 631c30527b Sync SDL3 wiki -> header
[ci skip]
2024-11-22 03:22:50 +00:00
Ryan C. Gordon 2e70944c44
gpu: Added an initial FAQ to the category documentation.
Fixes #11478.
2024-11-21 19:57:14 -05:00
Eduard Gushchin a4006e654e Fixed typo in the name of the SDL_GetAppMetadataProperty function in the description of the SDL_SetAppMetadataProperty function 2024-11-21 05:53:06 -08:00
SDL Wiki Bot fef001cb48 Sync SDL3 wiki -> header
[ci skip]
2024-11-21 04:53:43 +00:00
Ryan C. Gordon e770b4e266
dialog: Clean up filter param documentation.
The apostrophe was incorrect, but the type is auto linked in the wiki anyhow,
so don't write it out ourselves.
2024-11-20 23:52:49 -05:00
SDL Wiki Bot 795ceae520 Sync SDL3 wiki -> header
[ci skip]
2024-11-21 04:50:57 +00:00
Ryan C. Gordon ecae3789ab
SDL_dialog.h: Remove verbose docs on callback param from several functions.
In the wiki, one can click on SDL_DialogFileCallback for these details, or
grep for the symbol in the headers to find the information.

Fixes #11504.
2024-11-20 23:46:26 -05:00
SDL Wiki Bot d2dc0fa920 Sync SDL3 wiki -> header
[ci skip]
2024-11-19 02:19:43 +00:00
Sam Lantinga d8f8cf3e99 Added SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED 2024-11-18 14:50:37 -08:00
Sam Lantinga e027b85cc4 Validate that pixel formats have the correct attributes
Also added a test to save and load as BMP format to make sure pixel transformations are working correctly.

Fixes https://github.com/libsdl-org/SDL/issues/11483
2024-11-17 11:58:57 -08:00
SDL Wiki Bot 572cc7af63 Sync SDL3 wiki -> header
[ci skip]
2024-11-16 04:44:23 +00:00
ChillerDragon 7d7ee43ddb stdinc: document SDL_strnlen and SDL_strlen
See https://github.com/libsdl-org/sdlwiki/issues/635
2024-11-15 23:43:51 -05:00
SDL Wiki Bot 7c5a2cd462 Sync SDL3 wiki -> header
[ci skip]
2024-11-14 01:12:18 +00:00
Ryan C. Gordon 95c8a1cf7c
iostream: Update docs about return values and SDL_GetIOStatus().
Fixes #11395.
2024-11-13 20:11:18 -05:00
SDL Wiki Bot c021c75737 Sync SDL3 wiki -> header
[ci skip]
2024-11-14 00:30:41 +00:00
Ryan C. Gordon d20936b544
camera: Add some category docs about camera device warmup delays.
Fixes #11454.
2024-11-13 19:29:14 -05:00
SDL Wiki Bot 3877bf55a3 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 20:44:45 +00:00
SDL Wiki Bot c26dda10e0 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 20:38:45 +00:00
SDL Wiki Bot 20cd4290d7 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 04:49:12 +00:00
SDL Wiki Bot dcf6dd19c3 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 04:41:26 +00:00
SDL Wiki Bot 6c99a4b783 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 04:29:53 +00:00
Evan Hemsley 119b4fa5f5
GPU: Remove D3D11 backend and allow D3D12 to ingest DXBC (#11456) 2024-11-12 10:55:21 -08:00
Zack Middleton 8a2cac7aaa Fix SDL_PRIs64 to use standard PRId64
PRIs64 doesn't exist in C standards.
2024-11-08 12:37:14 +03:00
SDL Wiki Bot dbe82e685d Sync SDL3 wiki -> header
[ci skip]
2024-11-08 01:55:37 +00:00
Semphris 3e2ef64c98 Add SDL_SaveFile and SDL_SaveFile_IO functions 2024-11-07 17:55:02 -08:00
SDL Wiki Bot b0140fb1b4 Sync SDL3 wiki -> header
[ci skip]
2024-11-08 00:35:43 +00:00
Sam Lantinga 97dac37373 Added SDL_HINT_ANDROID_LOW_LATENCY_AUDIO 2024-11-07 16:34:34 -08:00
SDL Wiki Bot fb2145f731 Sync SDL3 wiki -> header
[ci skip]
2024-11-04 05:04:44 +00:00
Petar Popovic 96729e745a SDL_GetClosestFullscreenDisplayMode(): Rename parameter `mode` to `closest`
Also: Check, if the parameter is NULL inside the function.
2024-11-03 21:03:44 -08:00
SDL Wiki Bot cacfdc8cfa Sync SDL3 wiki -> header
[ci skip]
2024-11-03 05:23:05 +00:00
Sam Lantinga 7031b240df Added SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER 2024-11-02 22:22:29 -07:00
SDL Wiki Bot 0508f100e2 Sync SDL3 wiki -> header
[ci skip]
2024-11-01 22:50:16 +00:00
Sam Lantinga 927d297161 Updated to version 3.1.7 for development 2024-11-01 15:49:31 -07:00
Sam Lantinga 78cc5c1734 Updated to version 3.1.6 for the preview release 2024-11-01 14:27:01 -07:00
SDL Wiki Bot 19af3a2b34 Sync SDL3 wiki -> header
[ci skip]
2024-11-01 19:42:29 +00:00
SDL Wiki Bot 68cc173d92 Sync SDL3 wiki -> header
[ci skip]
2024-10-30 20:47:55 +00:00
expikr 7c968f1510 Update SDL_hints.h 2024-10-30 12:01:51 -07:00
expikr e2857fc5a2 Update SDL_mouse.c 2024-10-30 12:01:51 -07:00
SDL Wiki Bot 6647345be0 Sync SDL3 wiki -> header
[ci skip]
2024-10-29 21:43:56 +00:00
Evan Hemsley b4dff42dcd
GPU: Add SDL_CancelGPUCommandBuffer (#11316)
---------

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2024-10-29 14:43:22 -07:00
dv-senna 149ecffd6f
SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHABLE_HANDLE
Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes:  https://github.com/libsdl-org/SDL/issues/11328 .
2024-10-29 20:30:10 +03:00
Caleb Cornett feb10434a1 Order by subsystem 2024-10-29 08:50:50 -07:00
Caleb Cornett b2f216f9e2 Add GPU to iOS build config 2024-10-29 08:50:50 -07:00
SDL Wiki Bot e0d019c941 Sync SDL3 wiki -> header
[ci skip]
2024-10-28 07:00:30 +00:00
SDL Wiki Bot 3922bcec95 Sync SDL3 wiki -> header
[ci skip]
2024-10-27 21:42:48 +00:00
Petar Popovic 04a478b6a9 SDL_Enumerate[Storage]Directory() comments: Use enum constant names instead of integers. 2024-10-27 14:41:33 -07:00
SDL Wiki Bot dcd4ddb043 Sync SDL3 wiki -> header
[ci skip]
2024-10-24 18:38:45 +00:00
Ryan C. Gordon 10e52e1899
docs: Added more '\threadsafety` tags.
Reference Issue #7140.
2024-10-24 14:37:23 -04:00
Petar Popovic db4e2ccbac Allow redefinition of only one macro SDL_SINT64_C SDL_UINT64_C 2024-10-24 07:37:44 -07:00
Susko3 d0cf2c19d1
Allow defining custom SDL_SINT64_C and SDL_UINT64_C macros (#11315) 2024-10-23 17:03:13 -07:00
Ryan C. Gordon 7108291d0b video: Change SDL_GLattr to SDL_GLAttr. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon c0e9205a92 video: Change capitalization on various OpenGL attribute typedefs. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon 3c506630c3 video: Turn several OpenGL attribute enums into integer typedefs.
Fixes #11308.
2024-10-23 18:50:52 -04:00
SDL Wiki Bot a04fda211c Sync SDL3 wiki -> header
[ci skip]
2024-10-23 21:01:26 +00:00
Petar Popovic 540db0d164 Bumped version of macro 'main' to 3.1.3 2024-10-23 16:16:07 -04:00
SDL Wiki Bot 370521363a Sync SDL3 wiki -> header
[ci skip]
2024-10-23 19:57:33 +00:00
SDL Wiki Bot 299587fa64 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 19:31:40 +00:00
Petar Popovic 5e855d82e3 Manually bump versions of non-function identifiers introduced after 3.1.3 to 3.2.0 2024-10-23 11:17:46 -07:00
SDL Wiki Bot acfc223e15 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:37:46 +00:00
Evan Hemsley 423337796c
GPU Vulkan: Use dedicated allocation for download buffers (#11298) 2024-10-23 09:37:06 -07:00
SDL Wiki Bot 24b376ef18 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:30:58 +00:00
Ryan C. Gordon 1c1706a00b
fnsince: update `\since` policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
SDL Wiki Bot 63ef5a2369 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:42:03 +00:00
Petar Popovic fd530d029f Fixed typo in SDL_clipboard.h 2024-10-22 22:41:30 -07:00
SDL Wiki Bot 7b6416add0 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:41:03 +00:00
Petar Popovic af1c165352 Set version of new identifiers after 3.1.3 release to 3.1.6 2024-10-22 22:40:07 -07:00
Sam Lantinga c134dd6e5e Fixed typo in the channel layout documentation 2024-10-22 17:46:57 -07:00
Ryan C. Gordon 4a8eadf167
include: Fixed typo in SDL_CopyFile's documentation.
Fixes https://github.com/libsdl-org/sdlwiki/issues/623
2024-10-22 20:12:04 -04:00
SDL Wiki Bot d9e6fe0b7a Sync SDL3 wiki -> header
[ci skip]
2024-10-22 20:03:14 +00:00
Ryan C. Gordon f5c27a3a2c
render: Corrected docs for SDL_SetRenderVSync(). 2024-10-22 16:01:58 -04:00
SDL Wiki Bot a42c9ec5f7 Sync SDL3 wiki -> header
[ci skip]
2024-10-22 17:49:11 +00:00
Ryan C. Gordon 2318961b6f
docs: Add `\threadsafety` to some low-hanging fruit across a few headers.
Reference Issue #7140.
2024-10-22 13:48:35 -04:00
Ryan C. Gordon eed11ad6d6
docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r(). 2024-10-22 13:48:35 -04:00
Ryan C. Gordon 19a1175c02
include: Updated docs on SDL_TouchFingerEvent.
Fixes #4159.
2024-10-22 10:41:31 -04:00
Sam Lantinga 3d47877bb4 Added SDL_EVENT_RENDER_DEVICE_LOST
This is sent when the device is lost and can't be recovered.

Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
2024-10-21 13:28:40 -07:00
SDL Wiki Bot 54e52d055f Sync SDL3 wiki -> header
[ci skip]
2024-10-21 18:06:39 +00:00
Jordan Christiansen 9c848e08e4
docs: Explain events for already plugged in controllers (#11286) 2024-10-21 11:06:05 -07:00
Petar Popovic 4b54e32231 Tweak android path functions comment tag \sa 2024-10-20 16:38:07 -07:00
Petar Popovic 679dd4b181 SDL_RequestAndroidPermission() comment: Add link to android permissions website 2024-10-20 10:13:03 -04:00
SDL Wiki Bot eb1451536e Sync SDL3 wiki -> header
[ci skip]
2024-10-20 14:12:45 +00:00
Petar Popovic 5819d4b360 SDL_CreateRenderer() comment: Remove mention of flags 2024-10-20 10:12:14 -04:00
Frank Praznik 541ba33714
Fix SDL_GetClosestFullscreenDisplayMode documentation
It returns false on failure, not NULL.
2024-10-19 16:01:08 -04:00
SDL Wiki Bot 2668558c5c Sync SDL3 wiki -> header
[ci skip]
2024-10-19 17:21:09 +00:00
Sam Lantinga 153f90a725 Revert "Use the correct return type for SDL_GetAndroidJNIEnv()"
This reverts commit 2d3fa03d53.

Different JDK implementations define JNIEnv differently for C++, so we can't provide the definition here.

Fixes:
/usr/lib/jvm/temurin-11-jdk-amd64/include/jni.h:195:17: error: conflicting declaration ‘typedef struct JNIEnv_ JNIEnv’
/home/runner/work/sdlwiki/sdlwiki/.github/../external/SDL3/include/SDL3/SDL_system.h:266:24: note: previous declaration as ‘typedef struct _JNIEnv JNIEnv’
2024-10-19 10:20:50 -07:00
Maia a48fa675be Fix formatting 2024-10-18 13:45:04 -07:00
Sam Lantinga 1d23d2c3c2 Renamed SDL_SANDBOX_UNKNOWN to SDL_SANDBOX_UNKNOWN_CONTAINER 2024-10-18 12:45:07 -07:00
Frank Praznik a7da3ad59b x11: Support sorting displays via the priority hint
Store the connector name for displays and use it for sorting them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Frank Praznik 0faf9dc4a4 kmsdrm: Support sorting displays via the priority hint
Use the connector name for displays and sort them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
SDL Wiki Bot 2654d5d48b Sync SDL3 wiki -> header
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga e81e917c5e Added an OpenVR video driver (thanks @cnlohr!) 2024-10-17 19:38:04 -07:00
Sam Lantinga 2d3fa03d53 Use the correct return type for SDL_GetAndroidJNIEnv()
This prevents application code from having to cast to JNIEnv everywhere.
2024-10-17 12:02:24 -07:00
Ivan Epifanov 6da4d94abf VITA: implement camera subsystem 2024-10-17 10:24:17 -07:00
Daniel Ludwig 9a5420118a Define SDL_DIALOG_DUMMY in SDL_build_config_xbox.h 2024-10-17 12:45:37 +03:00
Sam Lantinga dd955332a2 Removed SDL_build_config_emscripten.h
The Emscripten build uses cmake, so we don't need the standalone config header.

Fixes https://github.com/libsdl-org/SDL/issues/11236
2024-10-16 18:16:46 -07:00
SDL Wiki Bot c48fbbb067 Sync SDL3 wiki -> header
[ci skip]
2024-10-16 23:48:38 +00:00
Sam Lantinga d6981da5a4 Added SDL_GetSandbox()
This adds support for detecting whether you're running in a sandbox on macOS
2024-10-16 16:47:29 -07:00
Ozkan Sezer 3ebfdb04be SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
Because strdup is not ANSI but POSIX, and its prototype might be hidden..

... and re-enable clang-tidy in CI for LoongArch64.

Fixes:  https://github.com/libsdl-org/SDL/issues/11219.
2024-10-16 21:50:40 +03:00
Maia d9df87f19f Fix syntax of trailing doc comments 2024-10-16 11:28:00 -07:00
Sam Lantinga 9cf388f260 Re-added HAVE_FDATASYNC and HAVE_GETHOSTNAME for platforms that have them. 2024-10-16 11:25:57 -07:00
Sam Lantinga ed1ec236c1 Removed fdatasync and gethostname definitions from platforms that don't have them
As verified by CMake builds in CI
2024-10-16 07:39:30 -07:00
SDL Wiki Bot b4554a8a75 Sync SDL3 wiki -> header
[ci skip]
2024-10-15 22:37:00 +00:00
Sam Lantinga 97f1da73da Rename GPU properties for consistency 2024-10-15 15:36:26 -07:00
Caleb Cornett 9af5ffcfbe
Improve support for private platforms (#11220) 2024-10-15 18:02:07 -04:00
SDL Wiki Bot dede2ab86f Sync SDL3 wiki -> header
[ci skip]
2024-10-15 17:53:13 +00:00
Frank Praznik 553fc5fe0e wayland: Expose displays in a deterministic order, and attempt to better handle selecting a primary display.
Wayland can expose displays in any arbitrary order, and doesn't have the native concept of a primary display. However, there are games that presume that the first listed display is the primary, which can lead to problems if that output isn't necessarily the ideal one, as they may use that display to build a resolution list or as the default fullscreen output. This sorts displays by position, then attempts to find the primary display, first by querying the explicit ordering hint, then the GNOME DBus property, then tries to determine the 'best' display according to the criteria that is generally ideal for games and media playback.

The makes the list of displays deterministic, as long as the desktop configuration remains static, with a reasonably appropriate one prioritized as primary, even if there is no explicit way to retrieve the primary display. In the case where a user has a particularly esoteric physical display configuration, the new hint enables explicitly overriding the sorting and selection logic, allowing the entire display order to be customized, if necessary.
2024-10-15 13:52:35 -04:00
SDL Wiki Bot ce49465b13 Sync SDL3 wiki -> header
[ci skip]
2024-10-15 03:30:54 +00:00
Sam Lantinga 72bae5167e Updated documentation
Fixes https://github.com/libsdl-org/sdlwiki/issues/616
2024-10-14 20:30:22 -07:00
Anonymous Maarten 45dfdfbb7b Add parametrized build script
[ci skip]
2024-10-14 21:30:48 +02:00
SDL Wiki Bot b865708039 Sync SDL3 wiki -> header
[ci skip]
2024-10-14 16:02:54 +00:00
Sam Lantinga 0b6ad8bf62 Improved the documentation for SDL_SetWindowShape()
Fixes https://github.com/libsdl-org/SDL/issues/11199
2024-10-14 09:02:04 -07:00
SDL Wiki Bot 3733b1d5d8 Sync SDL3 wiki -> header
[ci skip]
2024-10-14 06:46:10 +00:00
Ryan C. Gordon c20918b0fb render: Add SDL_RenderDebugText().
Fixes #11201.
2024-10-14 02:45:33 -04:00
SDL Wiki Bot db78c0f563 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 19:15:18 +00:00
Sam Lantinga a8ca024495 Added SDL_GetDefaultLogOutputFunction()
Fixes https://github.com/libsdl-org/SDL/issues/10603
Closes https://github.com/libsdl-org/SDL/pull/11106
2024-10-13 12:14:46 -07:00
SDL Wiki Bot aed1f76248 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 16:27:10 +00:00
Sam Lantinga a567786762 Added SDL_SetErrorV() 2024-10-13 09:26:25 -07:00
Sam Lantinga d5e02474ac Fixed SDL_oldnames.h to use the correct new names 2024-10-13 09:06:46 -07:00
SDL Wiki Bot fd9f2ae5b5 Sync SDL3 wiki -> header
[ci skip]
2024-10-13 00:14:05 +00:00
Maia 01c9c1d0eb Document main callbacks API thread safety 2024-10-12 20:13:30 -04:00
Cameron Cawley aebb64efa1 Remove leftover ARM SIMD code 2024-10-12 11:13:37 -07:00
Semphris 05c53b5ab0 Add macro guards for OpenGL <=1.3 function prototypes
- `#define SDL_OPENGL_1_NO_PROTOTYPES` to hide function prototypes
- `#define SDL_OPENGL_1_FUNCTION_TYPEDEFS` to add PFNGL*PROC function types
2024-10-12 11:21:07 -04:00
SDL Wiki Bot 365dba6de8 Sync SDL3 wiki -> header
[ci skip]
2024-10-12 15:08:54 +00:00
Daniel Gibson 33366b0a4e Fix SDL_MAIN_USE_CALLBACKS with Android, introduce SDL_MAIN_EXPORTED
My simplification of the conditions for including SDL_main_impl.h
had one problem: I forgot that SDL_main_impl.h must be included
even on Android when SDL_MAIN_USE_CALLBACKS is used, because then a
SDL_main() function that makes sure the callbacks get called is needed,
and that function is implemented in SDL_main_impl.h

But OTOH, even when SDL_MAIN_USE_CALLBACKS is used, SDL_main_impl.h
should not implement a standard `int main(...)` function on Android
(because there the SDL-using native code is compiled as a library and
 the entry point is in SDLActivity.java, which calls SDL_main()
 in said library).

So the check for platforms that don't have *any* native main function
but just SDL_main() called from the outside should be handled in
SDL_main_impl.h, so both the normal and the callback case can avoid
generating a standard main() in the same way.
To do this, SDL_MAIN_EXPORTED is defined for platforms like Android,
where the real entry point (main() function) is outside of the code
that uses SDL, so
- SDL_main() must be visibly exported with SDL_DECLSPEC, so the outside
  code can call it
- SDL_main_impl.h must not implement a "real" main() function

Another small change based on this is defining SDLMAIN_DECLSPEC
at a more general place.

If another platform like Android (where the entry point is somewhere
else entirely, possibly implemented in a different programming language)
turns up, defining SDL_MAIN_NEEDED (so the users main() is renamed
to SDL_main()) and SDL_MAIN_EXPORTED should be all that's needed on the
SDL_main.h side - and if not then at least the implementation is
cleaner and clearer now, IMHO.

fixes #11162
2024-10-11 18:54:29 -07:00
Andrei Rafael Brongel 86ef790a23 explicit cast to int in SDL_bits 2024-10-11 18:52:06 -07:00
Petar Popovic 3086b25c4e Set hint SDL_HINT_MAC_SCROLL_MOMENTUM version to SDL 3.1.4. 2024-10-11 17:33:52 -07:00
SDL Wiki Bot e31c68427a Sync SDL3 wiki -> header
[ci skip]
2024-10-10 23:35:37 +00:00
Evan Hemsley 6ea4a66451
GPU: Add SDL_CalculateGPUTextureFormatSize (#11146)
---------

Co-authored-by: Sam Lantinga <slouken@libsdl.org>
2024-10-10 16:34:38 -07:00
Petar Popovic 6d85127560 Rename hint string literal SDL_HINT_MAC_SCROLL_MOMENTUM 2024-10-10 16:16:36 -07:00
SDL Wiki Bot 8aaaeb7560 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 17:02:43 +00:00
SDL Wiki Bot 2a9cb68b91 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 16:43:29 +00:00
SDL Wiki Bot e4b1a9f382 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:24:38 +00:00
SDL Wiki Bot ac6b9e2d19 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:06:56 +00:00
Sam Lantinga c8f5f6d47a Added SDL_DelayPrecise()
SDL_DelayNS() now passes through to the high precision OS delay function, and SDL_DelayPrecise() tries to busy wait to get as close as possible to the desired wait time.

Fixes https://github.com/libsdl-org/SDL/issues/11141
2024-10-10 08:06:18 -07:00
Sam Lantinga 28a70a5b71 Use the correct version for the \since field 2024-10-10 08:06:18 -07:00
SDL Wiki Bot 4707bb730e Sync SDL3 wiki -> header
[ci skip]
2024-10-10 00:32:39 +00:00
Sam Lantinga ee9b6204cf Updated to version 3.1.5 for development
We should bump the version immediately before and after release so the release version corresponds to a fixed snapshot of code.
2024-10-09 11:02:01 -07:00
SDL Wiki Bot 02f3a96476 Sync SDL3 wiki -> header
[ci skip]
2024-10-09 16:49:57 +00:00
Sam Lantinga f8eac30276 Added SDL_StepBackUTF8() 2024-10-09 09:49:10 -07:00
Daniel Ludwig 5b6342a00d Default SDL_HINT_JOYSTICK_GAMEINPUT to "1" on GDK platforms 2024-10-09 07:30:13 -07:00
Delta 8e6ead2f7b
[GPU] Added ASTC texture format support (#11116) 2024-10-08 18:45:04 -04:00
Ryan C. Gordon 02434cd293
emscripten: Fixes for data addresses above 2gb
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.

Fixes: #9052

(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Sam Lantinga c34790f9f1 Fixed spacing 2024-10-08 11:49:08 -07:00
Daniel Gibson 312ecc4a52 SDL_main.h: Remove dead code for hypothetical C++ platforms
If WinRT returns after all, or a similarly bad platforms turns up,
the code can still be found in the git history.
But keep in mind that it then will have to be added *before* the
 #if ( defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) ...
case for platforms that support plain C to work correctly
2024-10-08 11:47:33 -07:00
Daniel Gibson 823b218051 Simplify code to include SDL_main_impl.h in SDL_main.h
Basically all platforms where SDL_main.h renames main() to SDL_main()
use the platform-specific main() (or WinMain() or whatever)
implementations in SDL_main_impl.h - and that renaming is enabled with:
  #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) \
      || defined(SDL_MAIN_USE_CALLBACKS)
    #define main SDL_main
  #endif

The only exception is Android, where main() *is* renamed, but
SDL_main_impl.h isn't used, because SDL_main() is called from Java.

So I think it's cleaner and less error-prone (for adding additional
platforms that need SDL_main() in the future), to use the same check
for including SDL_main_impl.h as is used for `#define main SDL_main`
and only list the exceptions (currently Android) there explicitly.

If new platforms like Android turn up, they can easily be added there
by inserting "|| defined(SDL_PLATFORM_WEIRDPLATFORM)" right next
to the Android check.

See also https://github.com/libsdl-org/SDL/issues/11068#issuecomment-2399907535
2024-10-08 11:47:33 -07:00
SDL Wiki Bot d9f8474dd7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 17:38:17 +00:00
SDL Wiki Bot 95aaaa3232 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 17:06:41 +00:00
Frank Praznik 158ba93d61
Update some window function documentation
Updates some documentation to correspond with changes made since it was originally written, clarifies some function behavior, and includes some assorted typo fixes.
2024-10-08 13:05:20 -04:00
SDL Wiki Bot 7acfdfd3e7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 16:50:41 +00:00
SDL Wiki Bot 326ab439d7 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 15:09:24 +00:00
Sam Lantinga fb07ab91c6 Improved SDL_main documentation and remove extern "C" comment.
It turns out that this is incorrect and any C linkage is already taken care of by SDL when redefining SDL_main.

Fixes https://github.com/libsdl-org/SDL/issues/11068
2024-10-08 08:07:54 -07:00
SDL Wiki Bot 03fa9ff0b0 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 13:59:10 +00:00
Sam Lantinga f6fa617139 Define SDL_DIALOG_DUMMY in SDL_build_config.h as needed 2024-10-07 19:52:50 -07:00
Sam Lantinga 4627283eca Allow building both Cocoa and dummy dialog implementations
This allows us to remove platformFilters from the Xcode project, which is not supported in Xcode 12.
2024-10-07 18:01:39 -07:00
Frank Praznik 2fd12b2e8a
keyboard: Note that enabling text input can also enable an IME
An active IME can potentially eat key events, particularly dead keys and parts of a compose sequence, so note this behavior in the documentation.
2024-10-07 19:21:34 -04:00
Naman Dixit 54e622c2e6 Use the printf vararg verification macros when compiling with clang 2024-10-06 22:19:52 -07:00
SDL Wiki Bot d0ef58b442 Sync SDL3 wiki -> header
[ci skip]
2024-10-06 23:03:29 +00:00
SDL Wiki Bot cbb9a16367 Sync SDL3 wiki -> header
'[ci skip]'
2024-10-06 22:58:06 +00:00
Jan Sedivy bf54eddba9 macOS: Clarify when macOS hints need to be set 2024-10-06 12:36:42 -07:00
Jan Sedivy c2b98e21ba macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values 2024-10-06 12:36:42 -07:00
SDL Wiki Bot e59078ac6f Sync SDL3 wiki -> header 2024-10-06 18:31:17 +00:00
Ryan C. Gordon 9e74ada7b8
gpu: fixed formatting in docs. 2024-10-06 14:30:07 -04:00
Frank Praznik c9ffa3f9e1
Remove vestiges of the TAKE_FOCUS window event
The event was removed, so remove the rename define and update the coccinelle script.
2024-10-06 10:02:53 -04:00
David Fort e00b1fdd67 clipboard: include mime types in SDL_ClipboarUpdate
This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
2024-10-05 18:19:10 -07:00
Sam Lantinga b8e72b0969 Note that creating a renderer will fail if the preferred renderer isn't available.
Fixes https://github.com/libsdl-org/SDL/issues/11077
2024-10-05 09:55:26 -07:00
zshoals 1ca45c5891 Fix typo: DiretMedia->DirectMedia 2024-10-05 00:08:01 -04:00
Ryan C. Gordon 8c3f88b495
docs: Wrote CategoryVulkan. 2024-10-04 16:55:50 -04:00
SDL Wiki Bot 369b93771b Sync SDL3 wiki -> header 2024-10-04 20:38:03 +00:00
SDL Wiki Bot deeffaa8d6 Sync SDL3 wiki -> header 2024-10-04 20:36:26 +00:00
Ryan C. Gordon 84ecf7fd3e
docs: Add CategorySurface text. 2024-10-04 16:35:49 -04:00
SDL Wiki Bot e292d1f5ac Sync SDL3 wiki -> header 2024-10-04 20:27:58 +00:00
Sam Lantinga d5af0c7e09 Added missing parentheses 2024-10-04 13:27:13 -07:00
SDL Wiki Bot 5a60d073c0 Sync SDL3 wiki -> header 2024-10-04 20:24:40 +00:00
SDL Wiki Bot a3413e050b Sync SDL3 wiki -> header 2024-10-04 20:23:29 +00:00
Ryan C. Gordon c25423b94c
docs: Filled in some category pages. 2024-10-04 16:22:00 -04:00
Sam Lantinga a57ecad648 Fixed documentation typos 2024-10-04 13:04:27 -07:00
SDL Wiki Bot 37315110c1 Sync SDL3 wiki -> header 2024-10-04 19:50:14 +00:00
Anonymous Maarten f26dd52090 SDL_GetProcessProperties is missing a SDLCALL 2024-10-04 21:48:27 +02:00
SDL Wiki Bot 64cbf02dbf Sync SDL3 wiki -> header 2024-10-04 19:35:00 +00:00
Ryan C. Gordon ffe4e571d1
wikiheaders: regex hack to make a URL not confuse wikilink genertion. 2024-10-04 15:34:18 -04:00
SDL Wiki Bot a7e4e9219a Sync SDL3 wiki -> header 2024-10-04 19:29:06 +00:00
cosmonaut e8c852d77c GPU: re-add parens to wiki intro 2024-10-04 12:28:05 -07:00
SDL Wiki Bot f592a35439 Sync SDL3 wiki -> header 2024-10-04 18:32:44 +00:00
cosmonaut 12d007038c GPU: wiki header link typo 2024-10-04 11:31:52 -07:00
SDL Wiki Bot f275731e18 Sync SDL3 wiki -> header 2024-10-04 18:30:06 +00:00
cosmonaut f3285b01c8 GPU: Intro fixes 2024-10-04 11:29:27 -07:00
SDL Wiki Bot 93c7521dd5 Sync SDL3 wiki -> header 2024-10-04 18:22:19 +00:00
Evan Hemsley c1084bfaa3
GPU Introduction (#11062) 2024-10-04 11:21:36 -07:00
cosmonaut 21e7fa45e8 GPU: fix padding field typo 2024-10-04 10:45:47 -07:00
SDL Wiki Bot f859d69c44 Sync SDL3 wiki -> header 2024-10-04 16:14:38 +00:00
Sam Lantinga 6c64c62114 Rename SDL_BUTTON() to SDL_BUTTON_MASK()
Fixes https://github.com/libsdl-org/SDL/issues/11056
2024-10-04 09:13:59 -07:00
SDL Wiki Bot d529407ce7 Sync SDL3 wiki -> header 2024-10-04 15:58:03 +00:00
Sam Lantinga fe2880fcda Rename SDL_SetThreadPriority() to SDL_SetCurrentThreadPriority()
Fixes https://github.com/libsdl-org/SDL/issues/11055
2024-10-04 08:57:03 -07:00
Sam Lantinga 43e7ce7dfc Updated to version 3.1.3 for the preview release 2024-10-03 23:01:55 -07:00
SDL Wiki Bot ca0b1eaf5a Sync SDL3 wiki -> header 2024-10-04 05:54:33 +00:00
Sam Lantinga 93c27a6675 Fixed the documentation for consistency. 2024-10-03 22:54:05 -07:00
SDL Wiki Bot 3ae2af8aa1 Sync SDL3 wiki -> header 2024-10-04 05:53:50 +00:00
Ryan C. Gordon 9a5d5a2839 video: Improve the EGL attribute callbacks.
Now it has access to information it needs and it's clear who is reponsible
for memory management.

Fixes #11039.
2024-10-03 22:52:52 -07:00
Ryan C. Gordon 191f3ecbbc render: Restore previous policy for converting window/render coordinates.
Before this commit, it would adjust for the logical presentation settings.
Now, it works as it did before the logical presentation render target was
removed: it takes current viewport and scale into account, as well.

Fixes #10978.
2024-10-03 16:31:56 -04:00
Ethan Lee a0de6c4abf Add properties to SDL_IOStreams returned by IOFromMem 2024-10-02 22:09:09 -07:00
Ryan C. Gordon d287feaddf
render: Remove non-pointer args' const qualifiers on SDL_RenderTextureRotated.
Reference Issue #11032.
2024-10-02 15:31:20 -04:00