Added SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE

This commit is contained in:
Sam Lantinga committed 2024-08-05 08:54:10 -07:00
1 parent 71574ac985
commit f05cd85048
2 files changed
+12 -1

No files matched your search

+1 -1
View File
@@ -228,7 +228,7 @@ static const char *get_audio_device(void *handle, const int channels)
ALSA_Device *dev = (ALSA_Device *)handle;
if (SDL_strcmp(dev->name, "default") == 0) {
const char *device = SDL_getenv("AUDIODEV"); // Is there a standard variable name?
const char *device = SDL_GetHint(SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE);
if (device) {
return device;
} else if (channels == 6) {