Improve profiler to CSV export

This commit is contained in:
Marianne Gagnon 2014-02-16 19:05:30 -05:00
parent 753e5199b9
commit 148ab7deb3
2 changed files with 8 additions and 2 deletions

View File

@ -344,6 +344,11 @@ void Profiler::draw()
}
font->draw(text, MARKERS_NAMES_POS, video::SColor(0xFF, 0xFF, 0x00, 0x00));
}
if (m_capture_report)
{
font->draw("Capturing profiler report...", MARKERS_NAMES_POS, video::SColor(0xFF, 0x00, 0x90, 0x00));
}
}
//-----------------------------------------------------------------------------

View File

@ -66,6 +66,7 @@ struct ostreambuf : public std::basic_streambuf<char_type, std::char_traits<char
}
};
class StringBuffer
{
private:
@ -75,13 +76,13 @@ private:
public:
StringBuffer(unsigned int size) : m_buffer(new char[size]), ostreamBuffer(m_buffer, size), messageStream(&ostreamBuffer)
StringBuffer(unsigned int size) : m_buffer((char*)calloc(size, 1)), ostreamBuffer(m_buffer, size), messageStream(&ostreamBuffer)
{
}
~StringBuffer()
{
delete[] m_buffer;
free(m_buffer);
}
std::ostream& getStdStream() { return messageStream; }