mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
48e213b4cddea928b824cc46d285df98d904f6e0

We should wait for the state to stabilize before SDL_ShouldQuit() returns. For example: Thread A initializes and increments a use refcount Thread B skips initializing and increments the use refcount Thread B starts cleaning up and checks the use refcount Thread A starts cleaning up, returns because SDL_ShouldQuit() returns false (not initialized), not touching the use refcount Thread B returns because the use refcount isn't zero Now we have the state where the refcount is greater than one and both thread A and B have attempted to cleanup. With this change: Thread A initializes and increments a use refcount Thread B skips initializing and increments the use refcount Thread B starts cleaning up and decrements and checks the use refcount Thread A starts cleaning up, waits for thread B Thread B returns because the use refcount isn't zero Thread A continues and decrements and checks the use refcount, and finishes cleaning up because it has reached 0.
Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Languages
C
86.4%
C++
5.9%
Objective-C
3.4%
CMake
1.6%
Perl
0.8%
Other
1.7%