mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-31 08:57:40 +00:00
Add SDL_mutex implementation using Windows Slim Reader/Writer Locks Keep Critical Section impl for Windows XP/Vista - choose at runtime
v2: - Add SRW definitions as suggested by Ozkan Sezer Allows building against older platform headers. - Rename "hidden" function parameter `mutex_` to `_mutex` v3: - Use GetModuleHandle instead of LoadLibrary - Fix typo in comment
This commit is contained in:
parent
090fffac6a
commit
548cb90893
2 changed files with 259 additions and 19 deletions
|
@ -1196,6 +1196,20 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
|
||||
|
||||
/**
|
||||
* \brief Force SDL to use Critical Sections for mutexes on Windows.
|
||||
* On Windows 7 and newer, Slim Reader/Writer Locks are available.
|
||||
* They offer better performance, allocate no kernel ressources and
|
||||
* use less memory. SDL will fall back to Critical Sections on older
|
||||
* OS versions or if forced to by this hint.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
|
||||
* "1" - Force the use of Critical Sections in all cases.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue