Revert "Fixed audio device removed events for ALSA"

This reverts commit e57fef8f0b.

We actually need to match on a unique handle
This commit is contained in:
Sam Lantinga
2023-10-23 18:50:32 -07:00
parent a774694be0
commit 5ba03d377a
3 changed files with 1 additions and 19 deletions

View File

@@ -877,7 +877,7 @@ static void ALSA_HotplugIteration(SDL_bool *has_default_output, SDL_bool *has_de
for (ALSA_Device *dev = unseen; dev; dev = next) {
//SDL_LogInfo(SDL_LOG_CATEGORY_AUDIO, "ALSA: removing %s device '%s'", dev->iscapture ? "capture" : "output", dev->name);
next = dev->next;
SDL_AudioDeviceDisconnected(SDL_FindPhysicalAudioDeviceByHandleString(dev->name));
SDL_AudioDeviceDisconnected(SDL_FindPhysicalAudioDeviceByHandle(dev->name));
SDL_free(dev->name);
SDL_free(dev);
}