1
0
forked from mirrors/0ad

Fix printf argument types

This was SVN commit r10529.
This commit is contained in:
Ykkrosh
2011-11-13 18:31:06 +00:00
parent 97d3f1cfc9
commit fbff0aa98d
15 changed files with 74 additions and 42 deletions
+5 -5
View File
@@ -639,7 +639,7 @@ private:
ogl_WarnIfError();
ENSURE(length == m_QueryTypes[j].counterBufferSize);
m_Storage.RecordAttributePrintf("-- %hs --", m_QueryTypes[j].name.c_str());
m_Storage.RecordAttributePrintf("-- %s --", m_QueryTypes[j].name.c_str());
for (size_t k = 0; k < m_QueryTypes[j].counters.size(); ++k)
{
@@ -650,14 +650,14 @@ private:
ENSURE(counter.size == 4);
GLuint value;
memcpy(&value, buf + counter.offset, counter.size);
m_Storage.RecordAttributePrintf("%hs: %d", counter.name.c_str(), value);
m_Storage.RecordAttributePrintf("%s: %d", counter.name.c_str(), value);
}
else if (counter.type == INTEL_PERFQUERIES_TYPE_UNSIGNED_INT64)
{
ENSURE(counter.size == 8);
GLuint64 value;
memcpy(&value, buf + counter.offset, counter.size);
m_Storage.RecordAttributePrintf("%hs: %.0f", counter.name.c_str(), (double)value);
m_Storage.RecordAttributePrintf("%s: %.0f", counter.name.c_str(), (double)value);
if (counter.name == "TotalTime")
elapsed = (double)value / 1e6;
@@ -667,7 +667,7 @@ private:
ENSURE(counter.size == 4);
GLfloat value;
memcpy(&value, buf + counter.offset, counter.size);
m_Storage.RecordAttributePrintf("%hs: %f", counter.name.c_str(), value);
m_Storage.RecordAttributePrintf("%s: %f", counter.name.c_str(), value);
}
else if (counter.type == INTEL_PERFQUERIES_TYPE_BOOL)
{
@@ -675,7 +675,7 @@ private:
GLuint value;
memcpy(&value, buf + counter.offset, counter.size);
ENSURE(value == 0 || value == 1);
m_Storage.RecordAttributePrintf("%hs: %d", counter.name.c_str(), value);
m_Storage.RecordAttributePrintf("%s: %d", counter.name.c_str(), value);
}
else
{