mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-09 16:13:16 +00:00
Merge commit 'e7e519a466' into main
This commit is contained in:
commit
e944e404c0
1 changed files with 15 additions and 0 deletions
|
|
@ -292,9 +292,24 @@ DSP_FlushCapture(_THIS)
|
|||
}
|
||||
}
|
||||
|
||||
static SDL_bool InitTimeDevicesExist = SDL_FALSE;
|
||||
static int
|
||||
look_for_devices_test(int fd)
|
||||
{
|
||||
InitTimeDevicesExist = SDL_TRUE; /* note that _something_ exists. */
|
||||
/* Don't add to the device list, we're just seeing if any devices exist. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
DSP_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
InitTimeDevicesExist = SDL_FALSE;
|
||||
SDL_EnumUnixAudioDevices(0, look_for_devices_test);
|
||||
if (!InitTimeDevicesExist) {
|
||||
return 0; /* maybe try a different backend. */
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->DetectDevices = DSP_DetectDevices;
|
||||
impl->OpenDevice = DSP_OpenDevice;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue