Skip to content

Commit

Permalink
Do a better job of finding default ALSA devices
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken authored and Kontrabant committed Oct 22, 2023
1 parent 142679b commit 0dccfe7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/audio/alsa/SDL_alsa_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ static void ALSA_HotplugIteration(SDL_bool *has_default_output, SDL_bool *has_de
continue;
}

if (SDL_strcmp(name, "default") == 0) {
if (SDL_strcmp(name, "default") == 0 ||
SDL_strncmp(name, "default:", 8 ) == 0 ||
SDL_strncmp(name, "sysdefault:", 11 ) == 0 ) {
if (has_default < 0) {
has_default = i;
}
Expand Down

0 comments on commit 0dccfe7

Please sign in to comment.