summaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-09-16 16:54:41 -0400
committerGravatar bunnei2014-09-16 16:54:41 -0400
commit1c79a4f10c1eb679b1ab253572a45a7c7df99691 (patch)
tree93af53b4a6a6e92bf8960b19635c17e8f55f887c /src/core/core_timing.cpp
parentMerge pull request #109 from lioncash/cruft (diff)
parentCore: Replace a sprintf in core_timing with StringFromFormat (diff)
downloadyuzu-1c79a4f10c1eb679b1ab253572a45a7c7df99691.tar.gz
yuzu-1c79a4f10c1eb679b1ab253572a45a7c7df99691.tar.xz
yuzu-1c79a4f10c1eb679b1ab253572a45a7c7df99691.zip
Merge pull request #107 from lioncash/sprintf
Core: Replace a sprintf in core_timing with StringFromFormat
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 25fccce76..0116cb376 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -7,11 +7,12 @@
7#include <atomic> 7#include <atomic>
8#include <mutex> 8#include <mutex>
9 9
10#include "common/msg_handler.h"
11#include "common/chunk_file.h" 10#include "common/chunk_file.h"
11#include "common/msg_handler.h"
12#include "common/string_util.h"
12 13
13#include "core/core_timing.h"
14#include "core/core.h" 14#include "core/core.h"
15#include "core/core_timing.h"
15 16
16int g_clock_rate_arm11 = 268123480; 17int g_clock_rate_arm11 = 268123480;
17 18
@@ -586,9 +587,10 @@ std::string GetScheduledEventsSummary()
586 const char *name = event_types[ptr->type].name; 587 const char *name = event_types[ptr->type].name;
587 if (!name) 588 if (!name)
588 name = "[unknown]"; 589 name = "[unknown]";
589 char temp[512]; 590
590 sprintf(temp, "%s : %i %08x%08x\n", name, (int)ptr->time, (u32)(ptr->userdata >> 32), (u32)(ptr->userdata)); 591 text += Common::StringFromFormat("%s : %i %08x%08x\n", name, (int)ptr->time,
591 text += temp; 592 (u32)(ptr->userdata >> 32), (u32)(ptr->userdata));
593
592 ptr = ptr->next; 594 ptr = ptr->next;
593 } 595 }
594 return text; 596 return text;