Sam Lantinga
32cf23d392
Added video/x11/edid.h to third party code list
2024-09-18 08:18:26 -07:00
Sam Lantinga
407ccadfd7
Added copyright header to edid.h
2024-09-18 08:18:26 -07:00
Sam Lantinga
bd04459cde
Fix typos (thanks @qndel!)
...
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb )
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
libm \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
video/khronos \
video/x11/edid.h \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
2024-09-18 08:18:26 -07:00
Sam Lantinga
03ae792df3
Fixed the recording field in audio device events
...
Fixes https://github.com/libsdl-org/SDL/issues/10885
2024-09-17 11:36:55 -07:00
Sam Lantinga
c68e9e157c
Fixed typo
2024-09-17 10:59:28 -07:00
Sam Lantinga
bc9780299c
Don't define backends if SDL_GPU_DISABLED is set
2024-09-17 09:40:29 -07:00
Sam Lantinga
807b8a9d4d
Allow initializing hints and properties from any thread
2024-09-17 08:53:27 -07:00
Sam Lantinga
d0edf68774
Added Uint32 versions of the atomic functions
2024-09-17 08:53:27 -07:00
Sam Lantinga
8d223b3037
Renamed atomic functions to match SDL 3.0 naming convention
...
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -07:00
Sam Lantinga
f3e419596b
Removed SDL_INIT_TIMER
...
This is no longer necessary before calling SDL_AddTimer()
2024-09-17 08:53:27 -07:00
Sam Lantinga
9275c533ca
Added thread-safe initialization/cleanup support
...
Also went through and removed inappropriate uses of spinlocks.
Fixes https://github.com/libsdl-org/SDL/issues/10872
2024-09-17 08:53:27 -07:00
Sam Lantinga
7edd43c276
Don't define render_drivers if SDL_RENDER_DISABLED is set
...
Fixes https://github.com/libsdl-org/SDL/issues/10861
2024-09-17 08:46:05 -07:00
Sam Lantinga
98cd8b34a7
Close the other file descriptors after redirection has taken place
...
Fixes https://github.com/libsdl-org/SDL/issues/10868
2024-09-17 07:46:48 -07:00
Sam Lantinga
231ea07617
Added SDL_LogTrace()
2024-09-17 02:04:54 -07:00
Sam Lantinga
6180da00e1
Skip a lock/unlock when logging known categories
2024-09-17 02:04:54 -07:00
Sam Lantinga
1bbc897e48
Updated documentation for bool return type
...
Also updated the test CRC functions to return bool.
2024-09-16 13:12:15 -07:00
Sam Lantinga
dc639956ba
Improve logging performance and make log priorities thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/9679
2024-09-16 13:09:17 -07:00
Sam Lantinga
0f85fdefc8
Fixed warning: "SDL_VIDEO_RENDER_D3D12" is not defined, evaluates to 0
2024-09-16 07:40:00 -07:00
Sam Lantinga
0548050fc5
Verify that the subsystems were successfully initialized
2024-09-15 12:04:10 -07:00
Sam Lantinga
5b5b1a8926
Fixed cleaning up dependent subsystems if initialization fails
2024-09-15 11:40:31 -07:00
Sam Lantinga
97d40b9218
Removed SDL_CleanupEnvironment()
2024-09-15 10:00:21 -07:00
Sam Lantinga
28b94c4758
Re-added SDL_getenv() as a thread-safe getenv() implementation
2024-09-15 09:37:04 -07:00
Sam Lantinga
718845a33d
Fixed warning C4701: potentially uninitialized local variable 'startup_info' used
2024-09-15 09:21:04 -07:00
Sam Lantinga
19243092c6
Renamed SDL_GpuGraphicsPipelineTargetInfo to SDL_GPUGraphicsPipelineTargetInfo
...
Fixes https://github.com/libsdl-org/SDL/issues/10855
2024-09-15 07:46:26 -07:00
Sam Lantinga
604d0c519e
If posix_spawn() is available, so is sigaction
2024-09-14 22:54:18 -07:00
Sam Lantinga
ec5d280c90
Make sure we ignore SIGPIPE so we don't crash if we write when the pipe is closed
2024-09-14 22:15:18 -07:00
Sam Lantinga
34b2f4ffca
Use non-blocking pipes for process I/O on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/10846
2024-09-14 21:16:35 -07:00
Sam Lantinga
8569bde053
Fixed typo
2024-09-14 14:35:57 -07:00
Sam Lantinga
dcb2a8c2fe
Use CreateProcessW() to handle non-ASCII file paths and arguments
2024-09-14 12:27:22 -07: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
56fc4b790c
Reduce strcmp() calls in hashtable lookup
2024-09-14 11:46:40 -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
Sam Lantinga
7ff015ceae
Close file descriptors not used by the child process
2024-09-14 10:29:02 -07:00
Sam Lantinga
fed0149172
Switched wayland messageboxes to use the new process API
2024-09-14 10:29:02 -07:00
Sam Lantinga
aa7357a14d
SDL_CreateEnvironment() fills the environment with a non-zero parameter
2024-09-14 10:29:02 -07:00
Sam Lantinga
76c469910e
Added SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN
2024-09-14 10:29:02 -07:00
Sam Lantinga
44c6cfda05
Switched zenity dialogs to use the new process API
2024-09-14 10:29:02 -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
Sam Lantinga
6c83491116
Added SDL_FlushIO()
...
Also added SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER and refactored the internal API to be able to create SDL_IOStream objects from native file handles.
2024-09-13 15:19:32 -07:00
Sam Lantinga
93caf1cd21
Fixed typo
2024-09-13 14:59:52 -07:00
Sam Lantinga
f1d0a71629
Fixed the documentation for SDL_SetError()
2024-09-13 13:54:54 -07:00
Sam Lantinga
b15fab0207
Fixed typo in SDL_dialog.h
2024-09-11 17:35:23 -07:00
Sam Lantinga
4d135fb696
Fixed color scale when rendering to an sRGB render target
2024-09-11 14:23:58 -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
86e393b523
Clarify that INPUTTYPE_UNSPECIFIED is correct for RGB textures
2024-09-11 14:23:58 -07:00
Sam Lantinga
92255d36d4
We already have functions for converting between sRGB and linear space
2024-09-11 14:23:58 -07:00
Sam Lantinga
667a3e40e9
Use the correct namespace for structures
...
Otherwise the debugger may use the wrong structure definition at runtime.
2024-09-11 14:23:58 -07:00
Sam Lantinga
77c569496d
SDL_GPUShaderFormat isn't an enum anymore
2024-09-11 09:32:17 -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
Sam Lantinga
4123023d3e
Renamed sdlgpu to gpu
2024-09-11 08:34:51 -07:00
Sam Lantinga
c77e51c084
Use SDL_unsetenv()
2024-09-11 07:42:17 -07:00
Sam Lantinga
b8dbc7086d
Disable GameInput mouse and keyboard support
...
GameInput currently has a bug with keys stuck on focus change, and crashes on initialization on some systems, so we'll disable it until these issues are fixed.
2024-09-10 15:29:52 -07:00
Sam Lantinga
76ce83801a
Removed pipewire client version check
...
@smcv may have found the root cause of the pipewire thread crash, so removing the pipewire client version check to re-enable use of pipewire in older container runtimes.
2024-09-10 13:05:48 -07:00
Sam Lantinga
817f1b3da8
Revert "Changed SDL_GPU_TEXTUREFORMAT_INVALID to 0"
...
This reverts commit b51c6551d6 .
2024-09-10 09:22:49 -07:00
Sam Lantinga
b51c6551d6
Changed SDL_GPU_TEXTUREFORMAT_INVALID to 0
...
This is more in line with SDL's convention and makes it easier to do zero-based structure initialization.
2024-09-10 08:37:52 -07:00
Sam Lantinga
640559eba6
Added migration documentation for SDL_strtoll(), SDL_strtoull(), SDL_lltoa(), and SDL_ulltoa().
2024-09-09 15:56:42 -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
Sam Lantinga
80e541d1fc
Fixed calling SDL_utf8strlcpy() with dst_bytes of 0
2024-09-09 10:42:25 -07:00
Sam Lantinga
7df1caba7c
Clarified that the contents of new textures aren't defined.
2024-09-08 07:23:17 -07:00
Sam Lantinga
cf9613fe63
The GPU log category ate one of the SDL reserved categories
2024-09-07 07:57:29 -07:00
Sam Lantinga
a01e8a5e10
The GPU log category ate one of the SDL reserved categories
...
Fixes https://github.com/libsdl-org/SDL/issues/10739
2024-09-07 07:54:13 -07:00
Sam Lantinga
1d59be67fc
Fixed crash if PIPEWIRE_PREFERRED_Init() fails and then pipewire is used anyway
...
The symbols were unloaded, but not reloaded because pipewire_initialized was still true.
2024-09-06 17:26:45 -07:00
Sam Lantinga
4c8357a37d
Clarified why the WINDOWS driver is lower than the RAWINPUT driver
2024-09-06 11:27:51 -07:00
Sam Lantinga
66b4c080c0
Clarified why the WGI driver is lower than the WINDOWS driver
2024-09-06 11:25:57 -07:00
Sam Lantinga
8f46cb771c
SDL_XINPUT_Enabled() returns false until XInput DLL is successfully loaded
...
We make sure we initialize XInput first, so that anything checking whether it's enabled gets a valid result based on whether we were able to load it or not.
2024-09-06 11:21:06 -07:00
Sam Lantinga
6d7c211faf
Fixed race condition at startup that could cause a crash in the XInput driver
2024-09-06 10:15:16 -07:00
Sam Lantinga
6e5bd58c4c
Include the Steam controller driver on Android
2024-09-06 09:14:42 -07:00
Sam Lantinga
1381cc8554
Add a step to fix generated shader code
2024-09-06 09:09:01 -07:00
Sam Lantinga
104642ffe7
Sorted API symbols
2024-09-06 08:57:40 -07:00
Sam Lantinga
4c382aafcd
Fixed building on Raspberry Pi
2024-09-06 08:54:05 -07:00
Sam Lantinga
379aea5c2d
Fixed warnings building with Visual Studio
2024-09-05 20:24:30 -07:00
Sam Lantinga
8edb901724
Fixed crashes in Metal renderer due to ARC releasing references on random memory in newly allocated structs
2024-09-05 19:48:33 -07: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
Sam Lantinga
04a732881a
Add a test to verify structure alignment
2024-09-05 15:27:56 -07:00
Sam Lantinga
387774ab8a
Build config flags are either defined or undefined, never 0
...
This is for consistency with CMake build configuration
Also added SDL_VIDEO_RENDER_GPU to the non-CMake build configurations
2024-09-05 09:52:40 -07:00
Sam Lantinga
b00bb21507
Added -Wl,--no-undefined-version to Android.mk
...
Make sure we aren't missing any API entry points
2024-09-05 06:52:45 -07: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
Sam Lantinga
20d0a1a3d1
Added a defensive check against XINPUTGETCAPABILITIES being NULL
...
This should never happen, but it does, possibly due to a data segment overwrite elsewhere.
2024-09-04 16:30:27 -07:00
Sam Lantinga
abd2ac5992
Set the desired channel count when opening audio on Android
2024-09-04 13:59:48 -07:00
Sam Lantinga
e2c9a0a427
Updated Android audio log messages
2024-09-04 13:59:48 -07:00
Sam Lantinga
c9387bcca5
pipewire: spa_list_is_empty() returns bool
2024-09-03 13:45:00 -07:00
Sam Lantinga
0fd275e16e
pulseaudio: fixed cleanup if couldn't connect to pulseaudio server
2024-09-03 13:34:19 -07:00
Sam Lantinga
a56315cd48
Fixed return value failing to load pulseaudio functions
2024-09-03 13:24:27 -07:00
Sam Lantinga
7ca676aeed
Use ASCII characters in SDL source and headers
...
Fixes https://github.com/libsdl-org/SDL/issues/10636
2024-09-03 12:52:27 -07: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
73898a0a64
Renamed NDA platform constants to "PRIVATE"
2024-09-02 21:00:34 -07:00
Sam Lantinga
46ffa82f4e
Added SDL_ALPHA_OPAQUE_FLOAT and SDL_ALPHA_TRANSPARENT_FLOAT
...
Fixes https://github.com/libsdl-org/SDL/issues/10684
2024-09-02 17:17:48 -07:00
Sam Lantinga
18c46a3313
Fixed SDL_pen.h for SDL3 bit flag conventions
2024-09-02 17:17:48 -07:00
Sam Lantinga
35dadda327
Fixed build warnings
2024-09-02 17:17:48 -07:00
Sam Lantinga
f11e7cd06f
Add annotations to README-migration.md for functions that changed return type
2024-09-02 17:17:48 -07:00
Sam Lantinga
eacf119923
Renamed SDL_size_add_overflow() and SDL_size_mul_overflow()
2024-09-02 17:17:48 -07:00
Sam Lantinga
d501f6db07
Make newer DRM and GBM functions optional
...
Fixes https://github.com/libsdl-org/SDL/issues/10675
2024-09-02 10:37:50 -07:00
Sam Lantinga
8371114009
Fixed error: multiple storage classes in declaration specifiers
2024-09-02 09:50:19 -07:00
Sam Lantinga
93423c1c46
spin_acquire_lock() takes a volatile pointer parameter
2024-09-02 09:50:19 -07:00
Sam Lantinga
01fa9cad80
Fixed error: conflicting types for 'getpagesize'
2024-09-02 09:50:19 -07:00
Sam Lantinga
8b0798a3da
Fixed error: variable 'nfences' set but not used
2024-09-02 09:50:19 -07:00
Sam Lantinga
b5700ccc02
Updated dlmalloc to version 2.8.6
...
From https://gee.cs.oswego.edu/pub/misc/malloc-2.8.6.c
2024-09-02 09:50:19 -07:00
Sam Lantinga
df501040fd
Fixed random seed not affecting SDLTest_RandomIntegerInRange()
2024-09-01 14:05:27 -07:00