Carl Åstholm
d0e70c37ab
main: Rewrite the Windows implementation of SDL_RunApp()
...
This new implementation only parses the command line into an argv when
the provided argv is NULL. This lets programs that don't want to/can't
include `SDL_main.h` to do their own custom argument processing before
explicitly calling `SDL_RunApp()` without having SDL clobber the argv.
If the user includes `SDL_main.h` as normal, the behavior remains the
same as before (because `SDL_main_impl.h` passes a NULL argv).
In addition, this new implementation performs fewer allocations and no
longer leaks on failure.
2025-11-23 13:40:13 -05:00
Carl Åstholm
dd9b9d4513
Check if GL_OES_EGL_image_external is supported before trying to use it
2025-03-24 19:52:13 -07:00
Carl Åstholm
7ec13a2ead
Document SDL_malloc alignment guarantees
2025-03-24 19:10:31 -07:00
Carl Åstholm
54f5b73333
emscripten: Don't use legacy JS library functions for assertions
2025-03-20 16:24:16 -07:00
Carl Åstholm
14deef997c
emscripten: Fix undefined behavior in opengles2 renderer
2025-03-18 19:18:24 -07:00
Carl Åstholm
c21bc48a70
Fix undefined behavior in SDL_windowsmouse.c
...
This fix prevents C undefined behavior from being invoked on Windows
if the user's configured cursor speed is below 6.
2025-01-28 05:12:16 -08:00
Carl Åstholm
49153ebfc4
audio: Add NULL check to SDL_UnbindAudioStreams
2024-12-28 00:10:58 -05:00
Carl Åstholm
1b99467c71
audio: Make SDL_Bind/UnbindAudioStreams take const arrays
2024-12-28 00:10:58 -05:00
Carl Åstholm
a0e537b9c0
examples: Fix dead links in app metadata
2024-12-27 17:10:52 -08: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
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
7d94bf528d
stdlib: Document SDL_strtox functions
2024-09-13 12:30:58 -07:00
Carl Åstholm
8092e35287
stdlib: Improve SDL_strtod
...
- Handle leading whitespace
- Handle positive sign
- Parse integer part as unsigned long long
- Handle signed zero (this also applies to printf)
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
56a48763cd
stdlib: Bring SDL_wcstol in line with SDL_strtol
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
fb82772fb3
stdlib: Rewrite SDL_strtoull impl
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
88d3cb4f90
Remove unnecessary include from SDL_pen_c.h
2024-09-13 12:30:58 -07:00
Carl Åstholm
4efbe1ca28
stdlib: Assert that signed integers use two's complement arithmetic
2024-09-13 12:30:58 -07:00
Carl Åstholm
fd53b3e112
stdlib: Rewrite SDL_wcstol impl
...
SDL_wcstol should now fully adhere to the libc spec.
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
Carl Åstholm
af37056c0d
stdinc: Fix typos and reword comments about aliasing
2024-09-09 13:51:16 -07:00
Carl Åstholm
8eb194b6f8
stdinc: Document number parsing APIs
2024-09-09 13:51:16 -07:00
Carl Åstholm
eda459ac49
stdinc: Fix up some printf definitions
2024-09-09 13:51:16 -07:00
Carl Åstholm
d6caf2abe7
Remove SDL_RESTRICT in favor of doc comments
2024-09-09 13:51:16 -07:00
Carl Åstholm
731939fca1
stdinc: Document memcpy APIs
2024-09-09 13:51:16 -07:00
Carl Åstholm
8cea4bd3c9
stdinc: Document memory allocation APIs
2024-09-09 13:51:16 -07:00
Carl Åstholm
f099898a66
Correct ibus include path
...
ibus-1.0.pc adds /usr/include/ibus-1.0 to the search path but not
/usr/include, which makes the canonical include path <ibus.h>.
2024-07-15 11:24:47 -07:00