From 549d5950a98dbcde1ce2e8c6ed53da657a08f7d3 Mon Sep 17 00:00:00 2001 From: Bud <75859057+bud3699@users.noreply.github.com> Date: Wed, 24 Apr 2024 01:15:28 +0100 Subject: [PATCH] Fixed error where variable wasnt defined outside the class to fix storage allocation for it defined in the global scope outside the class to properly allocate storage for variable --- IddSampleDriver/Driver.cpp | 3 +++ IddSampleDriver/Driver.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/IddSampleDriver/Driver.cpp b/IddSampleDriver/Driver.cpp index 75909ad..4d330b6 100644 --- a/IddSampleDriver/Driver.cpp +++ b/IddSampleDriver/Driver.cpp @@ -56,6 +56,9 @@ vector> monitorModes; vector< DISPLAYCONFIG_VIDEO_SIGNAL_INFO> s_KnownMonitorModes2; UINT numVirtualDisplays; +std::vector +Microsoft::IndirectDisp::IndirectDeviceContext::s_knownMonitorEdidData; + struct IndirectDeviceContextWrapper { IndirectDeviceContext* pContext; diff --git a/IddSampleDriver/Driver.h b/IddSampleDriver/Driver.h index 5bb76b0..07ee040 100644 --- a/IddSampleDriver/Driver.h +++ b/IddSampleDriver/Driver.h @@ -80,6 +80,7 @@ namespace Microsoft public: IndirectDeviceContext(_In_ WDFDEVICE WdfDevice); virtual ~IndirectDeviceContext(); + static std::vector s_knownMonitorEdidData; void InitAdapter(); void FinishInit(); @@ -101,7 +102,7 @@ namespace Microsoft public: static const DISPLAYCONFIG_VIDEO_SIGNAL_INFO s_KnownMonitorModes[]; static BYTE* s_KnownMonitorEdid(); - static std::vector s_knownMonitorEdidData; + }; }; } \ No newline at end of file