Revert "Try all drivers for an unknown device name"
This reverts commit dadf7a4cf2.
This commit is contained in:
+10
-14
@@ -374,13 +374,12 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename)
|
||||
idx = GetDriverIndexForName(&AllDevicesList, devicename);
|
||||
}
|
||||
almtx_unlock(&EnumerationLock);
|
||||
if(idx >= 0)
|
||||
device = DriverList[idx].alcOpenDevice(devicename);
|
||||
else for(idx = 0;idx < DriverListSize;idx++)
|
||||
if(idx < 0)
|
||||
{
|
||||
device = DriverList[idx].alcOpenDevice(devicename);
|
||||
if(device) break;
|
||||
ATOMIC_STORE_SEQ(&LastError, ALC_INVALID_VALUE);
|
||||
return NULL;
|
||||
}
|
||||
device = DriverList[idx].alcOpenDevice(devicename);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -816,17 +815,14 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename,
|
||||
(void)alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);
|
||||
idx = GetDriverIndexForName(&CaptureDevicesList, devicename);
|
||||
almtx_unlock(&EnumerationLock);
|
||||
if(idx >= 0)
|
||||
device = DriverList[idx].alcCaptureOpenDevice(
|
||||
devicename, frequency, format, buffersize
|
||||
);
|
||||
else for(idx = 0;idx < DriverListSize;idx++)
|
||||
if(idx < 0)
|
||||
{
|
||||
device = DriverList[idx].alcCaptureOpenDevice(
|
||||
devicename, frequency, format, buffersize
|
||||
);
|
||||
if(device) break;
|
||||
ATOMIC_STORE_SEQ(&LastError, ALC_INVALID_VALUE);
|
||||
return NULL;
|
||||
}
|
||||
device = DriverList[idx].alcCaptureOpenDevice(
|
||||
devicename, frequency, format, buffersize
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user