File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323#include < io.h>
2424#include < wchar.h>
2525#include < wctype.h>
26+ # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
27+ # define BN_DIAG_HAS_RENDERDOC 1
2628// VS_FIXEDFILEINFO + VerQueryValueW
27- #pragma comment(lib, "version.lib")
29+ # pragma comment(lib, "version.lib")
30+ # endif
2831#else
2932#include < unistd.h>
3033#endif
3134
35+ #ifndef BN_DIAG_HAS_RENDERDOC
36+ #define BN_DIAG_HAS_RENDERDOC 0
37+ #endif
38+
3239namespace
3340{
3441 std::atomic<bool > s_installed{false };
@@ -314,7 +321,7 @@ namespace Diagnostics
314321 va_end (args);
315322 }
316323
317- #if defined(_MSC_VER)
324+ #if BN_DIAG_HAS_RENDERDOC
318325namespace
319326{
320327 // Minimal RenderDoc API surface for diagnostic queries. GetAPIVersion is
@@ -584,11 +591,11 @@ namespace
584591
585592 std::atomic<bool > s_renderDocSetupDone{false };
586593} // anonymous namespace
587- #endif // _MSC_VER
594+ #endif // BN_DIAG_HAS_RENDERDOC
588595
589596bool SetupRenderDoc (const char * explicitDllPath, bool captureRequested)
590597{
591- #if !defined(_MSC_VER)
598+ #if !BN_DIAG_HAS_RENDERDOC
592599 (void )explicitDllPath;
593600 if (captureRequested)
594601 {
You can’t perform that action at this time.
0 commit comments