mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Device Name
-OpenAL wraps device name in brackets, if found return only device name.
This commit is contained in:
parent
4006615723
commit
52dc5cf3da
|
|
@ -1264,7 +1264,16 @@ DefineEngineFunction( sfxGetAvailableDevices, const char*, (),,
|
|||
{
|
||||
const SFXDeviceInfo* info = deviceInfo[d];
|
||||
const char *providerName = provider->getName().c_str();
|
||||
const char *infoName = info->name.c_str();
|
||||
char *infoName = (char*)info->name.c_str();
|
||||
char* openFind = dStrchr(&infoName[0], '(');
|
||||
if (openFind)
|
||||
{
|
||||
infoName = openFind + 1;
|
||||
char* closeFind = dStrchr(infoName, ')');
|
||||
if (closeFind)
|
||||
(*closeFind) = '\0';
|
||||
}
|
||||
|
||||
dSprintf(ptr, len, "%s\t%s\t%s\t%i\n", providerName, infoName, info->hasHardware ? "1" : "0", info->maxBuffers);
|
||||
|
||||
ptr += dStrlen(ptr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue