hints: Change hints to be backed by Properties, add documentation. (#9892)

This makes the subsystem thread-safe, more performant, and cleans up the code a little.

Also removed SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS, since setting this hint programmatically initializes properties, which creates a lock, so we can't check hints while creating locks. The slim reader-writer locks have been the default for ages and are solid, so we'll just use those when available.
This commit is contained in:
Ryan C. Gordon 2024-08-05 12:02:28 -04:00 committed by GitHub
parent e3682995f5
commit 074dd8c35f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 257 additions and 215 deletions

View file

@ -25,8 +25,9 @@
#ifndef SDL_hints_c_h_
#define SDL_hints_c_h_
extern void SDL_InitHints(void);
extern SDL_bool SDL_GetStringBoolean(const char *value, SDL_bool default_value);
extern int SDL_GetStringInteger(const char *value, int default_value);
extern void SDL_ClearHints(void);
extern void SDL_QuitHints(void);
#endif /* SDL_hints_c_h_ */