Merge branch 'master' of github.com:supertuxkart/stk-code
This commit is contained in:
commit
753e5199b9
@ -21,13 +21,13 @@
|
|||||||
#include "guiengine/event_handler.hpp"
|
#include "guiengine/event_handler.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
#include "guiengine/scalable_font.hpp"
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "io/utf_writer.hpp"
|
|
||||||
#include "utils/vs.hpp"
|
#include "utils/vs.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
Profiler profiler;
|
Profiler profiler;
|
||||||
|
|
||||||
@ -100,8 +100,9 @@ void Profiler::setCaptureReport(bool captureReport)
|
|||||||
{
|
{
|
||||||
// when disabling capture to file, flush captured data to a file
|
// when disabling capture to file, flush captured data to a file
|
||||||
{
|
{
|
||||||
UTFWriter writer(file_manager->getUserConfigFile("profiling.csv").c_str());
|
std::ofstream filewriter(file_manager->getUserConfigFile("profiling.csv").c_str(), std::ios::out | std::ios::binary);
|
||||||
writer << m_capture_report_buffer->getRawBuffer();
|
const char* str = m_capture_report_buffer->getRawBuffer();
|
||||||
|
filewriter.write(str, strlen(str));
|
||||||
}
|
}
|
||||||
m_capture_report = false;
|
m_capture_report = false;
|
||||||
delete m_capture_report_buffer;
|
delete m_capture_report_buffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user