Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess

# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
This commit is contained in:
Azaezel 2018-03-28 15:42:34 -05:00
commit 28e509af1a
158 changed files with 2954 additions and 709 deletions

View file

@ -82,7 +82,7 @@ U32 LeapMotionDevice::LM_FRAME = 0;
LeapMotionDevice::LeapMotionDevice()
{
// From IInputDevice
dStrcpy(mName, "leapmotion");
dStrcpy(mName, "leapmotion", 30);
mDeviceType = INPUTMGR->getNextDeviceType();
mController = NULL;

View file

@ -86,7 +86,7 @@ F32 OculusVRDevice::smPositionTrackingScale = 1.0f;
OculusVRDevice::OculusVRDevice()
{
// From IInputDevice
dStrcpy(mName, "oculusvr");
dStrcpy(mName, "oculusvr", 30);
mDeviceType = INPUTMGR->getNextDeviceType();
//

View file

@ -493,7 +493,7 @@ OpenVRProvider::OpenVRProvider() :
mDrawCanvas(NULL),
mGameConnection(NULL)
{
dStrcpy(mName, "openvr");
dStrcpy(mName, "openvr", 30);
mDeviceType = INPUTMGR->getNextDeviceType();
buildInputCodeTable();
GFXDevice::getDeviceEventSignal().notify(this, &OpenVRProvider::_handleDeviceEvent);

View file

@ -91,7 +91,7 @@ U32 RazerHydraDevice::RH_FRAME = 0;
RazerHydraDevice::RazerHydraDevice()
{
// From IInputDevice
dStrcpy(mName, "razerhydra");
dStrcpy(mName, "razerhydra", 30);
mDeviceType = INPUTMGR->getNextDeviceType();
//

View file

@ -433,7 +433,7 @@ bool FileDialog::setDefaultPath(void *object, const char *index, const char *dat
// Copy and Backslash the path (Windows dialogs are VERY picky about this format)
static char szPathValidate[512];
dStrcpy(szPathValidate, data);
dStrcpy(szPathValidate, data, 512);
Platform::makeFullPathName(data, szPathValidate, sizeof(szPathValidate));
//backslash( szPathValidate );

View file

@ -523,7 +523,7 @@ next:
tblPkgID[j] = apicID & PackageIDMask;
sprintf(tmp," AffinityMask = %d; Initial APIC = %d; Physical ID = %d, Core ID = %d, SMT ID = %d\n",
dwAffinityMask, apicID, tblPkgID[j], tblCoreID[j], tblSMTID[j]);
strcat(g_s3Levels, tmp);
dStrcat(g_s3Levels, tmp, 2048);
numLPEnabled ++; // Number of available logical processors in the system.
@ -654,4 +654,4 @@ next:
} // namespace CPUInfo
#endif
#endif
#endif

View file

@ -534,7 +534,7 @@ StringTableEntry Platform::makeRelativePathName(const char *path, const char *to
// Copy the rest
if(*branch)
dStrcpy(bufPtr, branch + 1);
dStrcpy(bufPtr, branch + 1, temp.size - (bufPtr - temp.ptr));
else
*--bufPtr = 0;

View file

@ -1130,7 +1130,7 @@ static void logFree(const AllocatedHeader* hdr)
void enableLogging(const char* fileName)
{
dStrcpy(gLogFilename, fileName);
dStrcpy(gLogFilename, fileName, 256);
if (!gEnableLogging)
{
gEnableLogging = true;

View file

@ -280,7 +280,7 @@ namespace PlatformNetState
if (addressString[0] == '[')
{
// Must be ipv6 notation
dStrcpy(outAddress, addressString+1);
dStrcpy(outAddress, addressString+1, 256);
addressString = outAddress;
portString = dStrchr(outAddress, ']');
@ -305,7 +305,7 @@ namespace PlatformNetState
}
else
{
dStrcpy(outAddress, addressString);
dStrcpy(outAddress, addressString, 256);
addressString = outAddress;
// Check to see if we have multiple ":" which would indicate this is an ipv6 address
@ -546,7 +546,7 @@ static PolledSocket* addPolledSocket(NetSocket handleFd, SOCKET fd, S32 state,
sock->handleFd = handleFd;
sock->state = state;
if (remoteAddr)
dStrcpy(sock->remoteAddr, remoteAddr);
dStrcpy(sock->remoteAddr, remoteAddr, 256);
if (port != -1)
sock->remotePort = port;
gPolledSockets.push_back(sock);

View file

@ -94,7 +94,7 @@ void RedBook::setLastError(const char * error)
if(!error || dStrlen(error) >= sizeof(smLastError))
setLastError("Invalid error string passed");
else
dStrcpy(smLastError, error);
dStrcpy(smLastError, error, 1024);
}
const char * RedBook::getLastError()

View file

@ -328,9 +328,9 @@ const char * Profiler::constructProfilePath(ProfilerData * pd)
U32 mark = FrameAllocator::getWaterMark();
char * buf = (char*)FrameAllocator::alloc(len+1);
dStrcpy(buf,pd->mParent->mPath);
dStrcat(buf,connector);
dStrcat(buf,pd->mRoot->mName);
dStrcpy(buf,pd->mParent->mPath,len+1);
dStrcat(buf,connector,len+1);
dStrcat(buf,pd->mRoot->mName,len+1);
const char * ret = StringTable->insert(buf);
FrameAllocator::setWaterMark(mark);
@ -433,7 +433,7 @@ void Profiler::dumpToFile(const char* fileName)
AssertFatal(dStrlen(fileName) < DumpFileNameLength, "Error, dump filename too long");
mDumpToFile = true;
mDumpToConsole = false;
dStrcpy(mDumpFileName, fileName);
dStrcpy(mDumpFileName, fileName, DumpFileNameLength);
}
void Profiler::hashPop(ProfilerRootData *expected)
@ -645,11 +645,11 @@ void Profiler::dump()
AssertFatal(success, "Cannot write profile dump to specified file!");
char buffer[1024];
dStrcpy(buffer, "Profiler Data Dump:\n");
dStrcpy(buffer, "Profiler Data Dump:\n", 1024);
fws.write(dStrlen(buffer), buffer);
dStrcpy(buffer, "Ordered by non-sub total time -\n");
dStrcpy(buffer, "Ordered by non-sub total time -\n", 1024);
fws.write(dStrlen(buffer), buffer);
dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n");
dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n", 1024);
fws.write(dStrlen(buffer), buffer);
for(U32 i = 0; i < rootVector.size(); i++)
@ -665,9 +665,9 @@ void Profiler::dump()
rootVector[i]->mTotalTime = 0;
rootVector[i]->mSubTime = 0;
}
dStrcpy(buffer, "\nOrdered by non-sub total time -\n");
dStrcpy(buffer, "\nOrdered by non-sub total time -\n", 1024);
fws.write(dStrlen(buffer), buffer);
dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n");
dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n", 1024);
fws.write(dStrlen(buffer), buffer);
mCurrentProfilerData->mTotalTime = endHighResolutionTimer(mCurrentProfilerData->mStartTime);

View file

@ -27,10 +27,11 @@
#define FN_CDECL
#define STDCALL
#include <stddef.h>
// size_t is needed to overload new
// size_t tends to be OS and compiler specific and may need to
// be if/def'ed in the future
typedef unsigned long dsize_t;
typedef size_t dsize_t;
/** Platform dependent file date-time structure. The defination of this structure