From abb5578dbb101c92a9b0b4c5cb4c59f8e11eb80f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Oct 2015 19:42:11 -0400 Subject: [PATCH 1/2] Unconditionally include to declare sprintf(). --- Source/RSP/log.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/RSP/log.cpp b/Source/RSP/log.cpp index 3ebcc8fea..5a07ec162 100644 --- a/Source/RSP/log.cpp +++ b/Source/RSP/log.cpp @@ -23,6 +23,8 @@ * should be forwarded to them so if they want them. * */ + +#include #include #include #include @@ -208,7 +210,6 @@ void RDP_LogLoc ( DWORD /*PC*/ ) #ifdef old #include -#include #include "RSP Registers.h" #include "log.h" From 6a3fe2bfb621c04c5cea5edde802e811697e8df6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Oct 2015 19:42:39 -0400 Subject: [PATCH 2/2] Include to fix one undeclared sprintf(). --- Source/RSP/Profiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/RSP/Profiling.cpp b/Source/RSP/Profiling.cpp index 95891554b..648f945f0 100644 --- a/Source/RSP/Profiling.cpp +++ b/Source/RSP/Profiling.cpp @@ -24,6 +24,7 @@ * */ +#include #include #include extern "C" { @@ -168,8 +169,9 @@ public: { char Buffer[255]; float CpuUsage = (float)(((double)ItemList[count]->second / (double)TotalTime) * 100); + if (CpuUsage <= 0.2) { continue; } - sprintf(Buffer,"Func 0x%08X",ItemList[count]->first); + sprintf(Buffer, "Func 0x%08X", ItemList[count]->first); for (int NameID = 0; NameID < (sizeof(TimerNames) / sizeof(TIMER_NAME)); NameID++) { if (ItemList[count]->first == (DWORD)TimerNames[NameID].Timer)