mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
alsa: don't enumerate virtual devices, just physical hardware.
This commit is contained in:
parent
ad1bfea5a0
commit
cfa95fe68c
@ -714,6 +714,8 @@ ALSA_DetectDevices(void)
|
||||
char *desc = ALSA_snd_device_name_get_hint(hints[i], "DESC");
|
||||
char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID");
|
||||
|
||||
/* only want physical hardware interfaces */
|
||||
if (SDL_strncmp(name, "hw:", 3) == 0) {
|
||||
if ((ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0)) {
|
||||
add_device(SDL_FALSE, name, desc);
|
||||
}
|
||||
@ -721,6 +723,7 @@ ALSA_DetectDevices(void)
|
||||
if ((ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0)) {
|
||||
add_device(SDL_TRUE, name, desc);
|
||||
}
|
||||
}
|
||||
|
||||
free(name);
|
||||
free(desc);
|
||||
|
Loading…
Reference in New Issue
Block a user