16467 Commits

Author SHA1 Message Date
Ryan C. Gordon
35a1cf910a
examples/audio/simple-playback: Add a description to the example. 2024-07-23 17:33:33 -04:00
Sam Lantinga
66011e497d Removed duplication in SDL_EGL_* function names 2024-07-23 13:11:37 -07:00
Eduard Gushchin
86934975b9 Update SDL_video.h
Fixed a typo in the function name in the documentation for SDL_EGL_GetProcAddress
2024-07-23 12:48:10 -07:00
Ryan C. Gordon
f5f44de155
examples: Add audio/01-simple-playback. 2024-07-23 14:52:31 -04:00
Ryan C. Gordon
5216aea31d
examples: Explicitly call SDL_Init(). 2024-07-23 14:52:30 -04:00
Sam Lantinga
ff7a60db85 Minor fixes to the primitive example
* The random number generator is automatically seeded, no need for SDL_srand()
* Draw the points first, so they don't overlap the other primitives and look like broken line drawing
2024-07-23 08:34:15 -07:00
Sam Lantinga
b499c54af4 Fixed testvulkan on macOS (thanks @proton991!)
Fixes https://github.com/libsdl-org/SDL/issues/10351
2024-07-23 08:17:22 -07:00
Sam Lantinga
5c00e54073 Updated SDL_migration.cocci for SDL_GUIDFromString rename (thanks @sezero!) 2024-07-23 08:14:13 -07:00
Ryan C. Gordon
4d8b938969
examples: Added renderer/primitives example. 2024-07-23 10:37:14 -04:00
Ryan C. Gordon
266744af03
examples: Number examples, so they are presented in a specific order. 2024-07-23 10:12:53 -04:00
Ryan C. Gordon
23cf09163e
examples: More n3ds build fixes. 2024-07-23 01:35:15 -04:00
Ryan C. Gordon
3671497ea1
examples: Maybe fix n3ds builds. 2024-07-23 01:28:19 -04:00
Ryan C. Gordon
d2e2b9bdc9
examples: Maybe fix Android builds. 2024-07-23 01:25:29 -04:00
Ryan C. Gordon
d8d7212efd
examples: Maybe fix UWP builds. 2024-07-23 01:22:19 -04:00
Ryan C. Gordon
a03ecaacb0
workflows: Enable building examples on GitHub Actions. 2024-07-23 01:04:05 -04:00
Ryan C. Gordon
16535b7ee2
examples: Add CMake glue to optionally build examples, as we do for the tests.
In fact, most of the CMake code was stolen from the test directory.
2024-07-23 00:58:57 -04:00
Ryan C. Gordon
2038620717
examples/README: fixed typo. 2024-07-22 23:41:16 -04:00
Ryan C. Gordon
15562564ad
build-web-examples: Run highlight with --enclose-pre option. 2024-07-22 23:23:53 -04:00
Ryan C. Gordon
549317e0e4
build-web-examples: Minor tweaks. 2024-07-22 23:05:59 -04:00
Ryan C. Gordon
2de83359ba
build-web-examples: Fix CMake dir. 2024-07-22 22:55:41 -04:00
Ryan C. Gordon
70348d77e1
build-web-examples: It's usually /bin/bash on Linux, not /usr/bin/bash. 2024-07-22 22:42:32 -04:00
Ryan C. Gordon
5339b4458d
examples: Added initial examples infrastructure. 2024-07-22 22:39:09 -04:00
Ryan C. Gordon
2f6e34d2d0
wikiheaders: Added copyright comment to the top of file. 2024-07-22 22:39:09 -04:00
SDL Wiki Bot
2aea74aa84 Sync SDL3 wiki -> header 2024-07-22 22:19:38 +00:00
Sam Lantinga
a36be94ad1 More clarification on temporary memory 2024-07-22 15:19:26 -07:00
Sam Lantinga
29f0fd33dc SDL_getenv() should return const
This also allows us to use SDL_FreeLater() and make SDL_getenv() thread-safe on Windows.
2024-07-22 13:00:39 -07:00
Sam Lantinga
ef21e31a9a SDL_GUIDFromString() renamed SDL_StringToGUID() 2024-07-22 12:39:15 -07:00
SDL Wiki Bot
5e12706ae0 Sync SDL3 wiki -> header 2024-07-22 17:05:52 +00:00
Eduard Gushchin
24bb95f60c Fixed a typo in the name of the method in the documentation for SDL_GetDisplayProperties 2024-07-22 10:04:59 -07:00
Sam Lantinga
c4bf5f9f59 SDL_CreateTexture() uses the SDL_TextureAccess type for the access parameter 2024-07-22 09:32:02 -07:00
Frank Praznik
b0713a7d30
x11: Track cursor visibility internally
Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true.

Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland.
2024-07-22 12:03:07 -04:00
SDL Wiki Bot
3e943090d0 Sync SDL3 wiki -> header 2024-07-22 14:50:48 +00:00
Eduard Gushchin
61565b7f61 Update SDL_video.h
Led to the actual list of WindowsFlag in the documentation of the SDL_CreateWindow method
2024-07-22 07:50:07 -07:00
SDL Wiki Bot
40cb3fb74a Sync SDL3 wiki -> header 2024-07-22 14:35:35 +00:00
Sam Lantinga
ff1d351390 Removed SDL_FreeTemporaryMemory()
This was just causing confusion and anxiety. SDL temporary memory will be automatically freed on the main thread when processing events and on other threads when it ages out after a second. The application can free it directly by calling SDL_ClaimTemporaryMemory() to get ownership of the pointer, if necessary.
2024-07-22 07:34:25 -07:00
Ozkan Sezer
70c1012e8c SDL_stdinc.h (SDL_COMPILE_TIME_ASSERT): Keep C++ case alone (after PR/10331)
Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode.
Reference issue: https://github.com/libsdl-org/SDL/issues/6078 which was fixed by
f6b81125b3
2024-07-22 16:00:37 +03:00
SDL Wiki Bot
230f2a684d Sync SDL3 wiki -> header 2024-07-22 12:59:19 +00:00
Sam Lantinga
685e381735 Add an overview of how to handle temporary memory 2024-07-22 05:58:19 -07:00
Sam Lantinga
9bfd0d901c Audio device IDs are unsigned 2024-07-22 05:48:01 -07:00
Sam Lantinga
033c9c5951 Added SDL_CopyFile() and SDL_CopyStorageFile()
Fixes https://github.com/libsdl-org/SDL/issues/9553
2024-07-21 19:58:23 -07:00
Sam Lantinga
128df75e05 Fixed potential NULL dereference 2024-07-21 14:32:19 -07:00
Sam Lantinga
bd27b89903 Prevent potential overflow in rectangle functions
We're limiting the functions to rects with positions and sizes < 1 billion for speed, which is totally fine for most SDL use cases. If you need rectangles larger than that, you can roll your own functions that use 64-bit intermediate values and do proper overflow handling of output values.

Fixes https://github.com/libsdl-org/SDL/issues/8879
2024-07-21 13:04:11 -07:00
Anonymous Maarten
22bfbdbc02 stdinc: c23 deprecated _Static_assert in favor of static_assert 2024-07-21 21:51:55 +03:00
Sam Lantinga
4830fc4e40 Added more 8-bit blit test coverage 2024-07-21 11:39:38 -07:00
Sam Lantinga
bab982f2e0 Don't recalculate the blit mapping when changing surfaces
We don't actually need to change the blit mapping if we're targeting a new surface with the same format and palette.
2024-07-21 11:39:38 -07:00
Dragon-Baroque
68cabc2837 Support SDL_EVENT_DROP_TEXT in Cocoa
src/video/cocoa/SDL_cocoawindow.m
    Support Copy in addition to Generic as Drag and Drop operation,
    Register and Support public.utf8-plain-text for SDL_EVENT_DROP_TEXT.
2024-07-21 11:17:04 -07:00
Sam Lantinga
c040a02d6c Removed SDL_PROP_SURFACE_COLORSPACE_NUMBER
Now that we have surface internal data, we can store it there. This slightly improves performance in the surface blitting paths.
2024-07-21 09:36:22 -07:00
SDL Wiki Bot
4a7e95402f Sync SDL3 wiki -> header 2024-07-21 15:09:24 +00:00
Sam Lantinga
e0fd59de64 Fixed floating point rectangles to be mathematically correct.
* A floating point rectangle contains all points >= x and <= x + w
* A floating point rectangle is only empty if it has negative width. The zero rectangle contains the zero point.
* Adjacent floating point rectangles intersect along their shared side

Fixes https://github.com/libsdl-org/SDL/issues/6791
2024-07-21 08:08:15 -07:00
Sam Lantinga
9e978740c3 Removed unnecessary casts 2024-07-21 08:08:15 -07:00