Commit Graph

1805 Commits

Author SHA1 Message Date
Sam Lantinga
0548050fc5 Verify that the subsystems were successfully initialized 2024-09-15 12:04:10 -07:00
Carl Åstholm
1f3fd65c4c cpuinfo: Rename SDL_GetCPUCount to SDL_GetNumLogicalCPUCores
This was the only API that broke the "GetNumThings" convention
used elsewhere, so renaming it helps with consistency.
Adding "logical cores" to the name also makes it a bit
more immediately obvious what the count actually represents.
2024-09-14 19:33:30 -07:00
Ryan C. Gordon
93bf534268 testgpu_simple_clear: Fixed AppInit return values. 2024-09-14 19:19:27 -04:00
Sam Lantinga
e97f636590 SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER is an SDL_Environment pointer 2024-09-14 12:27:22 -07:00
Sam Lantinga
e673479449 Removed SDL_WriteProcess()
This had the unfortunate side-effect of blocking if you tried to write too much. Instead you can use SDL_GetProcessInput() and handle SDL_IO_STATUS_NOT_READY as needed.

Fixes https://github.com/libsdl-org/SDL/issues/10834
2024-09-14 11:15:50 -07:00
ritalat
f6f49de134 Add convenience functions to get process IOStreams 2024-09-14 10:33:29 -07:00
Sam Lantinga
aa7357a14d SDL_CreateEnvironment() fills the environment with a non-zero parameter 2024-09-14 10:29:02 -07:00
Semphris
3cf54675bb Windows process: escape backslashes before quotes 2024-09-13 22:15:56 -07:00
Sam Lantinga
90e01040c5 Added thread-safe environment functions
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.

As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
Semphris
9eea8234e6 Add SDL_Process subsystem 2024-09-13 15:19:32 -07:00
Carl Åstholm
84361bcf0a stdlib: Remove test cases with impl-defined results 2024-09-13 12:30:58 -07:00
Carl Åstholm
eb199176e6 stdlib: Conditionally undef some SDL_strtox tests
Some test cases have implementation-defined results,
so we should only test these when we know SDL's own
implementations of the functions are used.
2024-09-13 12:30:58 -07:00
Carl Åstholm
59ec034412 stdlib: Use macros to define SDL_strtox tests 2024-09-13 12:30:58 -07:00
Carl Åstholm
a78f612d4b stdlib: Add some tests for SDL_strtod 2024-09-13 12:30:58 -07:00
Carl Åstholm
61bc856b04 stdlib: Use new parser for scanf %p specifier 2024-09-13 12:30:58 -07:00
Carl Åstholm
e109aa09aa stdlib: Rewrite SDL_strto(ll?|ul) impl 2024-09-13 12:30:58 -07:00
Carl Åstholm
e326540a45 stdlib: Add failing tests for SDL_strto(ll?|ul) 2024-09-13 12:30:58 -07:00
Carl Åstholm
5331f36789 stdlib: Add failing tests for SDL_strtoull 2024-09-13 12:30:58 -07:00
Carl Åstholm
5d30980df4 stdlib: Add failing tests for SDL_wcstol
These help illustrate some key differences between a specs-compliant
libc wcstol and SDL's own implementation.
2024-09-13 12:30:58 -07:00
Ethan Lee
96e147b2b9 gpu: Rework driver name queries, add GetGPUShaderFormats 2024-09-13 12:29:40 -04:00
Caleb Cornett
a45a2caf49 GPU: Rename VertexBinding to VertexBufferDescription (#10811) 2024-09-12 18:02:39 -05:00
Petar Popovic
fd2a266549 Adding void to empty function prototype parenthesis 2024-09-11 19:44:52 -07:00
Sam Lantinga
3f7f6f624b testcolorspace: don't tonemap from HDR to SDR when reading pixels
Our source content is in the SDR range, so we don't need to tonemap when reading it back.
2024-09-11 14:23:58 -07:00
Sam Lantinga
4e43da684c Added texture colorspace testing 2024-09-11 14:23:58 -07:00
Sam Lantinga
37c9fb490e Changed enums to use XXX_COUNT for the count or number of values
Fixes https://github.com/libsdl-org/SDL/issues/10763
2024-09-11 09:32:17 -07:00
Petar Popovic
6fca867ffe Fix testoffscreen.c: bool literal returned from 'main' 2024-09-11 01:49:45 -04:00
Evan Hemsley
0b6f993dea GPU: Zero-init handling (#10786) 2024-09-10 18:17:08 -07:00
Sam Lantinga
4eb4370500 SDL_strtoll(), SDL_strtoull(), SDL_lltoa(), and SDL_ulltoa() use long long values 2024-09-09 15:46:26 -07:00
Sam Lantinga
6fc6e3dc7e Use SDL_bool where appropriate in SDL events
This involved changing button state from Uint8 to SDL_bool, and made SDL_PRESSED and SDL_RELEASED unnecessary.

Fixes https://github.com/libsdl-org/SDL/issues/10069
2024-09-09 14:00:19 -07:00
cosmonaut
d3091b9538 Remove SDL_GPUDepthStencilValue struct 2024-09-09 10:55:05 -07:00
Evan Hemsley
668e2f82d2 Add load op and clear color to SDL_BlitGPUTexture (#10767) 2024-09-09 10:19:52 -07:00
Anonymous Maarten
c797ae1619 Fix -Wtype-limits warning
actual has type Uint8, so there's no need to compare against 0.
2024-09-09 14:40:50 +02:00
Petar Popovic
d2ef15d8e6 Fix warnings: calloc-transposed-args 2024-09-08 19:28:11 -07:00
Evan Hemsley
68a9991ec9 GPU: Document structs (#10742) 2024-09-07 08:29:14 -07:00
Caleb Cornett
9730f62e8c GPU: Rename struct members and parameters for SDL3 naming conventions (#10730)
---------

Co-authored-by: Evan Hemsley <2342303+thatcosmonaut@users.noreply.github.com>
2024-09-06 16:38:23 -07:00
Ryan C. Gordon
154452a726 winrt: Removed WinRT/Windows Phone/UWP support.
Fixes #10724.
2024-09-06 13:28:39 -04:00
Anonymous Maarten
db96ddca34 SDL_test: use SDLCALL calling convention
This is needed when using a pre-built static SDL3_test library.
2024-09-06 14:19:05 +02:00
Sam Lantinga
702ed83f72 Initialize interface structures so they can be extended in the future
We guarantee that we will only add to the end of these interfaces, and any new fields will be optional.
2024-09-05 19:16:00 -07:00
Anonymous Maarten
434193d153 testmultiaudio: initialize audio through SDL_test framework 2024-09-06 03:06:40 +02:00
Anonymous Maarten
102b3b480b SDL_test: move argument parsing into SDL_test 2024-09-06 03:06:40 +02:00
Anonymous Maarten
872608b8af Don't allocate in SDLTest_GenerateRunSeed 2024-09-06 03:06:40 +02:00
Anonymous Maarten
2f4b2df595 SDL_test: pass data pointer to unit tests 2024-09-06 03:06:40 +02:00
Anonymous Maarten
baa1a5e2f4 Add SDL_strpbrk 2024-09-06 01:35:43 +02:00
Frank Praznik
a46e7027ce video: Allow setting the parents of toplevel windows
Allow setting a parent/child relationship on toplevel windows, which allows raising sets of windows together, and allows child windows to always float above their parents.

Modal windows are now set by setting the parent, then toggling modal status, as the previous interface duplicated functionality now handled by SDL_SetWindowParent().
2024-09-05 15:22:23 -04:00
Sam Lantinga
a0f36fb85b Use atomic variables for thread communication
Fixes https://github.com/libsdl-org/SDL/issues/10711
2024-09-05 06:05:49 -07:00
Anonymous Maarten
ff1e252413 testautomation: remove SDLTest_TestCaseFp casts 2024-09-04 23:54:56 +02:00
Sam Lantinga
575d9cda6f The parameter to SDL_AppEvent() should be non-const
This allows functions like SDL_ConvertEventToRenderCoordinates() to work without having to copy the event.

Fixes https://github.com/libsdl-org/SDL/issues/10691
2024-09-03 08:18:36 -07:00
Sam Lantinga
eacf119923 Renamed SDL_size_add_overflow() and SDL_size_mul_overflow() 2024-09-02 17:17:48 -07:00
Caleb Cornett
f405def691 Change GPU flag enums to defines (#10681) 2024-09-02 15:19:43 -07:00
Sam Lantinga
be341bc078 Make sure we put more than RESAMPLER_MAX_PADDING_FRAMES into an audio stream
It's not an error if we don't, but we'll get 0 bytes out of the stream if we don't flush, which the audio_resampleLoss test treats as a failure.

Fixes https://github.com/libsdl-org/SDL/issues/10613
2024-09-01 14:05:27 -07:00