Renamed AUDIODRIVER and VIDEODRIVER hint/env to AUDIO_DRIVER and VIDEO_DRIVER

main
Sylvain 2022-12-08 10:40:01 +01:00 committed by Ryan C. Gordon
parent 7ca0d15d64
commit c265fb74b0
9 changed files with 15 additions and 9 deletions

View File

@ -30,6 +30,8 @@ General:
* SDL_HINT_VIDEO_X11_FORCE_EGL
* SDL_HINT_VIDEO_X11_XINERAMA
* SDL_HINT_VIDEO_X11_XVIDMODE
* Renamed hints 'SDL_HINT_VIDEODRIVER' and 'SDL_HINT_AUDIODRIVER' to 'SDL_HINT_VIDEO_DRIVER' and 'SDL_HINT_AUDIO_DRIVER'
* Renamed environment variables 'SDL_VIDEODRIVER' and 'SDL_AUDIODRIVER' to 'SDL_VIDEO_DRIVER' and 'SDL_AUDIO_DRIVER'
* SDL_stdinc.h no longer includes stdio.h, stdlib.h, etc., it only provides the SDL C runtime functionality
* Added SDL_CreateSurface() and SDL_CreateSurfaceFrom() which replace the SDL_CreateRGBSurface*(), and can also be used to create YUV surfaces
* Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat

View File

@ -308,3 +308,7 @@ The following hints have been removed:
* SDL_HINT_VIDEO_X11_FORCE_EGL (use SDL_HINT_VIDEO_FORCE_EGL instead)
* SDL_HINT_VIDEO_X11_XINERAMA (Xinerama no longer supported by the X11 backend)
* SDL_HINT_VIDEO_X11_XVIDMODE (Xvidmode no longer supported by the X11 backend)
* Renamed hints 'SDL_HINT_VIDEODRIVER' and 'SDL_HINT_AUDIODRIVER' to 'SDL_HINT_VIDEO_DRIVER' and 'SDL_HINT_AUDIO_DRIVER'
* Renamed environment variables 'SDL_VIDEODRIVER' and 'SDL_AUDIODRIVER' to 'SDL_VIDEO_DRIVER' and 'SDL_AUDIO_DRIVER'

View File

@ -2313,7 +2313,7 @@ extern "C" {
* 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"
#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
/**
* \brief A variable that decides what audio backend to use.
@ -2336,7 +2336,7 @@ extern "C" {
* 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"
#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
/**
* \brief A variable that decides what KMSDRM device to use.

View File

@ -892,7 +892,7 @@ int SDL_AudioInit(const char *driver_name)
/* Select the proper audio driver */
if (driver_name == NULL) {
driver_name = SDL_GetHint(SDL_HINT_AUDIODRIVER);
driver_name = SDL_GetHint(SDL_HINT_AUDIO_DRIVER);
}
if (driver_name != NULL && *driver_name != 0) {

View File

@ -443,7 +443,7 @@ int SDL_VideoInit(const char *driver_name)
/* Select the proper video driver */
video = NULL;
if (driver_name == NULL) {
driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER);
driver_name = SDL_GetHint(SDL_HINT_VIDEO_DRIVER);
}
if (driver_name != NULL && *driver_name != 0) {
const char *driver_attempt = driver_name;

View File

@ -62,7 +62,7 @@ static void DUMMY_EVDEV_Poll(_THIS);
static int DUMMY_Available(void)
{
const char *envr = SDL_GetHint(SDL_HINT_VIDEODRIVER);
const char *envr = SDL_GetHint(SDL_HINT_VIDEO_DRIVER);
if (envr) {
if (SDL_strcmp(envr, DUMMYVID_DRIVER_NAME) == 0) {
return 1;

View File

@ -353,8 +353,8 @@ if(APPLE)
endif()
set(TESTS_ENVIRONMENT
SDL_AUDIODRIVER=dummy
SDL_VIDEODRIVER=dummy
SDL_AUDIO_DRIVER=dummy
SDL_VIDEO_DRIVER=dummy
)
foreach(TESTCASE ${SDL_TESTS_NONINTERACTIVE})

View File

@ -178,7 +178,7 @@ int main(int argc, char *argv[])
SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
}
SDL_Log("Select a driver with the SDL_AUDIODRIVER environment variable.\n");
SDL_Log("Select a driver with the SDL_AUDIO_DRIVER environment variable.\n");
SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
#ifdef __EMSCRIPTEN__

View File

@ -69,7 +69,7 @@ int main(int argc, char **argv)
for (i = 0; i < n; ++i) {
SDL_Log(" %d: %s\n", i, SDL_GetAudioDriver(i));
}
SDL_Log("Select a driver with the SDL_AUDIODRIVER environment variable.\n");
SDL_Log("Select a driver with the SDL_AUDIO_DRIVER environment variable.\n");
}
SDL_Log("Using audio driver: %s\n\n", SDL_GetCurrentAudioDriver());