1
0
Fork 0

microprofileui: Use correct printf specifier

This commit is contained in:
Sam Spilsbury 2016-03-27 12:01:57 +08:00
parent aacc3a4a59
commit fdd7e9e86a
1 changed files with 5 additions and 0 deletions

View File

@ -1230,7 +1230,12 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16]; char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
const char* cLocal = MicroProfileIsLocalThread(nThreadId) ? "*": " "; const char* cLocal = MicroProfileIsLocalThread(nThreadId) ? "*": " ";
#if defined(WIN32)
// nThreadId is 32-bit on Windows
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) ); int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
#else
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
#endif
uint32_t nThreadColor = -1; uint32_t nThreadColor = -1;
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore) if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
nThreadColor = UI.nHoverColorShared|0x906060; nThreadColor = UI.nHoverColorShared|0x906060;