diff --git a/client/concurrentqueue.h b/client/concurrentqueue.h index dfde96db..7a57e547 100644 --- a/client/concurrentqueue.h +++ b/client/concurrentqueue.h @@ -3553,6 +3553,7 @@ private: template static inline void destroy_array(U* p, size_t count) { + ((void)count); if (p != nullptr) { assert(count > 0); (Traits::free)(p); diff --git a/common/TracySystem.hpp b/common/TracySystem.hpp index d5e98ecd..489f5a35 100644 --- a/common/TracySystem.hpp +++ b/common/TracySystem.hpp @@ -8,7 +8,9 @@ #endif #ifdef _WIN32 +#ifndef _WINDOWS_ extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void); +#endif #else # include #endif diff --git a/common/tracy_sema.h b/common/tracy_sema.h index 2419bb79..d0584987 100644 --- a/common/tracy_sema.h +++ b/common/tracy_sema.h @@ -35,10 +35,15 @@ namespace tracy //--------------------------------------------------------- // Semaphore (Windows) //--------------------------------------------------------- - #ifndef MAXLONG enum { MAXLONG = 0x7fffffff }; +#endif + +#ifndef INFINITE enum { INFINITE = 0xFFFFFFFF }; +#endif + +#ifndef _WINDOWS_ typedef void* HANDLE; extern "C" __declspec(dllimport) HANDLE __stdcall CreateSemaphoreA( void*, long, long, const char* ); diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 780af07f..af23871d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -22,6 +22,10 @@ # include "../nfd/nfd.h" #endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 +#endif + namespace tracy { diff --git a/standalone/src/main.cpp b/standalone/src/main.cpp index 355f7eb7..6ae6f8aa 100644 --- a/standalone/src/main.cpp +++ b/standalone/src/main.cpp @@ -51,7 +51,13 @@ int main( int argc, char** argv ) float dpiScale = 1.f; #ifdef _WIN32 - dpiScale = GetDpiForSystem() / 96.f; + typedef UINT(*GDFS)(void); + GDFS getDpiForSystem = nullptr; + HMODULE dll = GetModuleHandleW(L"user32.dll"); + if (dll != INVALID_HANDLE_VALUE) + getDpiForSystem = (GDFS)GetProcAddress(dll, "GetDpiForSystem"); + if (getDpiForSystem) + dpiScale = getDpiForSystem() / 96.f; #endif // Setup ImGui binding