mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Fix late night coding issue
This commit is contained in:
parent
0e87023e46
commit
20acbfed04
1 changed files with 5 additions and 4 deletions
|
|
@ -1253,8 +1253,9 @@ DefineEngineFunction( sfxGetAvailableDevices, const char*, (),,
|
||||||
"@ref SFX_devices\n"
|
"@ref SFX_devices\n"
|
||||||
"@ingroup SFX" )
|
"@ingroup SFX" )
|
||||||
{
|
{
|
||||||
char* deviceList = Con::getReturnBuffer( 2048 );
|
const S32 bufferSize = 2048;
|
||||||
S32 len = 2048;
|
char* deviceList = Con::getReturnBuffer( bufferSize );
|
||||||
|
S32 len = bufferSize;
|
||||||
char *ptr = deviceList;
|
char *ptr = deviceList;
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
|
|
||||||
|
|
@ -1270,8 +1271,8 @@ DefineEngineFunction( sfxGetAvailableDevices, const char*, (),,
|
||||||
const char *infoName = info->name.c_str();
|
const char *infoName = info->name.c_str();
|
||||||
dSprintf(ptr, len, "%s\t%s\t%s\t%i\n", providerName, infoName, info->hasHardware ? "1" : "0", info->maxBuffers);
|
dSprintf(ptr, len, "%s\t%s\t%s\t%i\n", providerName, infoName, info->hasHardware ? "1" : "0", info->maxBuffers);
|
||||||
|
|
||||||
ptr += dStrlen(deviceList);
|
ptr += dStrlen(ptr);
|
||||||
len = 2048 - (ptr - deviceList);
|
len = bufferSize - (ptr - deviceList);
|
||||||
|
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return deviceList;
|
return deviceList;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue