OpenAL Mac

Cleanup print functions cos mac hates them. All these functions did was print what was capable on openal anyway end user doesn't really get any benefit from this. Will save these for the refactor.
This commit is contained in:
marauder2k7 2022-08-29 18:04:55 +01:00
parent 282678c28d
commit 5b1e20f28c
3 changed files with 15 additions and 159 deletions

View file

@ -83,17 +83,23 @@ ALDeviceList::ALDeviceList( const OPENALFNTABLE &oalft )
dMemset(&ALDeviceInfo, 0, sizeof(ALDEVICEINFO));
ALDeviceInfo.bSelected = true;
dStrncpy(ALDeviceInfo.strInternalDeviceName, devices, sizeof(ALDeviceInfo.strInternalDeviceName));
char* openFind = dStrchr(devices, '(');
char deviceExternal[256];
dStrcpy(deviceExternal, devices, 256);
char* openFind = dStrchr(deviceExternal, '(');
if (openFind)
{
devices = openFind + 1;
char* closeFind = dStrchr(devices, ')');
char* deviceName = openFind + 1;
char* closeFind = dStrchr(deviceName, ')');
if (closeFind)
(*closeFind) = '\0';
dStrncpy(ALDeviceInfo.strDeviceName, devices, sizeof(ALDeviceInfo.strDeviceName));
dStrncpy(ALDeviceInfo.strDeviceName, deviceName, sizeof(ALDeviceInfo.strDeviceName));
}
else
{
dStrncpy(ALDeviceInfo.strDeviceName, devices, sizeof(ALDeviceInfo.strDeviceName));
}
vDeviceInfo.push_back(ALDeviceInfo);
}