diff --git a/Source/Engine/Platform/Windows/WindowsPlatform.cpp b/Source/Engine/Platform/Windows/WindowsPlatform.cpp index 222a20055..277927af3 100644 --- a/Source/Engine/Platform/Windows/WindowsPlatform.cpp +++ b/Source/Engine/Platform/Windows/WindowsPlatform.cpp @@ -42,17 +42,17 @@ void* WindowsPlatform::Instance = nullptr; extern "C" { static HANDLE dbgHelpLock; -void DbgHelpInit() +void FlaxDbgHelpInit() { dbgHelpLock = CreateMutexW(nullptr, FALSE, nullptr); } -void DbgHelpLock() +void FlaxDbgHelpLock() { WaitForSingleObject(dbgHelpLock, INFINITE); } -void DbgHelpUnlock() +void FlaxDbgHelpUnlock() { ReleaseMutex(dbgHelpLock); } @@ -544,7 +544,7 @@ void WindowsPlatform::PreInit(void* hInstance) #if CRASH_LOG_ENABLE TCHAR buffer[MAX_PATH] = { 0 }; - DbgHelpLock(); + FlaxDbgHelpLock(); if (::GetModuleFileNameW(::GetModuleHandleW(nullptr), buffer, MAX_PATH)) SymbolsPath.Add(StringUtils::GetDirectoryName(buffer)); if (::GetEnvironmentVariableW(TEXT("_NT_SYMBOL_PATH"), buffer, MAX_PATH)) @@ -553,7 +553,7 @@ void WindowsPlatform::PreInit(void* hInstance) options |= SYMOPT_LOAD_LINES | SYMOPT_FAIL_CRITICAL_ERRORS | SYMOPT_DEFERRED_LOADS | SYMOPT_EXACT_SYMBOLS; SymSetOptions(options); OnSymbolsPathModified(); - DbgHelpUnlock(); + FlaxDbgHelpUnlock(); #endif GetWindowsVersion(WindowsName, VersionMajor, VersionMinor, VersionBuild); @@ -767,7 +767,7 @@ void WindowsPlatform::BeforeExit() void WindowsPlatform::Exit() { #if CRASH_LOG_ENABLE - DbgHelpLock(); + FlaxDbgHelpLock(); #if !TRACY_ENABLE if (SymInitialized) { @@ -776,7 +776,7 @@ void WindowsPlatform::Exit() } #endif SymbolsPath.Resize(0); - DbgHelpUnlock(); + FlaxDbgHelpUnlock(); #endif // Unregister app class @@ -1278,14 +1278,14 @@ void* WindowsPlatform::LoadLibrary(const Char* filename) #if CRASH_LOG_ENABLE // Refresh modules info during next stack trace collecting to have valid debug symbols information - DbgHelpLock(); + FlaxDbgHelpLock(); if (folder.HasChars() && !SymbolsPath.Contains(folder)) { SymbolsPath.Add(folder); SymbolsPath.Last().Replace('/', '\\'); OnSymbolsPathModified(); } - DbgHelpUnlock(); + FlaxDbgHelpUnlock(); #endif return handle; @@ -1296,7 +1296,7 @@ void* WindowsPlatform::LoadLibrary(const Char* filename) Array WindowsPlatform::GetStackFrames(int32 skipCount, int32 maxDepth, void* context) { Array result; - DbgHelpLock(); + FlaxDbgHelpLock(); // Initialize HANDLE process = GetCurrentProcess(); @@ -1428,7 +1428,7 @@ Array WindowsPlatform::GetStackFrames(int32 skipCount, } } - DbgHelpUnlock(); + FlaxDbgHelpUnlock(); return result; } diff --git a/Source/ThirdParty/tracy/tracy.Build.cs b/Source/ThirdParty/tracy/tracy.Build.cs index e23a7c10f..9d54ca688 100644 --- a/Source/ThirdParty/tracy/tracy.Build.cs +++ b/Source/ThirdParty/tracy/tracy.Build.cs @@ -47,7 +47,7 @@ public class tracy : ThirdPartyModule switch (options.Platform.Target) { case TargetPlatform.Windows: - options.PrivateDefinitions.Add("TRACY_DBGHELP_LOCK=DbgHelp"); + options.PrivateDefinitions.Add("TRACY_DBGHELP_LOCK=FlaxDbgHelp"); break; case TargetPlatform.Switch: options.PrivateDefinitions.Add("TRACY_USE_MALLOC");