mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-19 19:28:28 +00:00
hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints.
They were just environment variables before. Fixes #5528.
This commit is contained in:
parent
634b9edc7f
commit
c1336b21ed
4 changed files with 51 additions and 3 deletions
include
|
@ -1993,6 +1993,53 @@ extern "C" {
|
|||
#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what video backend to use.
|
||||
*
|
||||
* By default, SDL will try all available video backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "x11" if, say, you are
|
||||
* on Wayland but want to try talking to the X server instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best video backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what audio backend to use.
|
||||
*
|
||||
* By default, SDL will try all available audio backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "alsa" if, say, you are
|
||||
* on PulseAudio but want to try talking to the lower level instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best audio backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue