Browse Source

Do a better job of finding default ALSA devices

Sam Lantinga 1 year ago
parent
commit
d65861f049
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/audio/alsa/SDL_alsa_audio.c

+ 3 - 1
src/audio/alsa/SDL_alsa_audio.c

@@ -784,7 +784,9 @@ static void ALSA_HotplugIteration(SDL_bool *has_default_output, SDL_bool *has_de
                 continue;
                 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) {
                 if (has_default < 0) {
                     has_default = i;
                     has_default = i;
                 }
                 }