Skip to content

Commit 74718d8

Browse files
committed
UWP doesn't have RenderDoc.
1 parent 7be547e commit 74718d8

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

Apps/Playground/Shared/Diagnostics.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@
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+
3239
namespace
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
318325
namespace
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

589596
bool 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
{

0 commit comments

Comments
 (0)