Simplify the common combination of sprintf() and OutputDebugString() (PR #1031)

- Update LogOutput() and LogFileOutput().
- Add StrFormat() to produce std::string out of snprintf() & add StrFormat.cpp to projects.
- Add PTRDIFF_T_FMT in parallel to SIZE_T_FMT to StdAfx.h, for completeness.
- In Log.cpp, changed to get timestamp using posix functions.
- Removed TCHAR usage throughout - simply use char.
This commit is contained in:
Kelvin Lee
2022-02-14 08:37:05 +11:00
committed by GitHub
parent 83e56924f7
commit 9a3832084a
22 changed files with 222 additions and 133 deletions
+1 -3
View File
@@ -339,9 +339,7 @@ static void DebugHddEntrypoint(const USHORT PC)
if (!bOldPCAtC7xx /*&& PC != 0xc70a*/)
{
Count++;
char szDebug[100];
sprintf(szDebug, "HDD Entrypoint: $%04X\n", PC);
OutputDebugString(szDebug);
LogOutput("HDD Entrypoint: $%04X\n", PC);
}
bOldPCAtC7xx = true;