wasapi: If device is marked as a zombie, don't try to resuscitate it.

This commit is contained in:
Ryan C. Gordon
2023-10-27 01:27:22 -04:00
parent 85923049a6
commit ce3be02b48
2 changed files with 3 additions and 0 deletions

View File

@@ -397,6 +397,8 @@ static SDL_bool RecoverWasapiIfLost(SDL_AudioDevice *device)
WASAPI_DisconnectDevice(device);
SDL_assert(SDL_AtomicGet(&device->shutdown)); // so we don't come back through here.
return SDL_FALSE; // already failed.
} else if (SDL_AtomicGet(&device->zombie)) {
return SDL_FALSE; // we're already dead, so just leave and let the Zombie implementations take over.
} else if (!device->hidden->client) {
return SDL_TRUE; // still waiting for activation.
}