Skip to content

Commit 5281cef

Browse files
author
bud3699
committed
Give option to dis-allow logs through the pipe
1 parent 3a500d8 commit 5281cef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Virtual Display Driver (HDR)/MttVDD/Driver.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ bool customEdid = false;
9797
bool hardwareCursor = false;
9898
bool preventManufacturerSpoof = false;
9999
bool edidCeaOverride = false;
100+
bool sendLogsThroughPipe = true;
100101
IDDCX_BITS_PER_COMPONENT SDRCOLOUR = IDDCX_BITS_PER_COMPONENT_8;
101102
IDDCX_BITS_PER_COMPONENT HDRCOLOUR = IDDCX_BITS_PER_COMPONENT_10;
102103

@@ -109,6 +110,7 @@ std::map<std::wstring, std::pair<std::wstring, std::wstring>> SettingsQueryMap =
109110
{L"HardwareCursorEnabled", {L"HARDWARECURSOR", L"HardwareCursor"}},
110111
{L"PreventMonitorSpoof", {L"PREVENTMONITORSPOOF", L"PreventSpoof"}},
111112
{L"EdidCeaOverride", {L"EDIDCEAOVERRIDE", L"EdidCeaOverride"}},
113+
{L"SendLogsThroughPipe", {L"SENDLOGSTHROUGHPIPE", L"SendLogsThroughPipe"}},
112114
};
113115

114116
vector<unsigned char> Microsoft::IndirectDisp::IndirectDeviceContext::s_KnownMonitorEdid; //Changed to support static vector
@@ -348,7 +350,7 @@ void vddlog(const char* type, const char* message) {
348350

349351
fclose(logFile);
350352

351-
if (g_pipeHandle != INVALID_HANDLE_VALUE) {
353+
if (sendLogsThroughPipe && g_pipeHandle != INVALID_HANDLE_VALUE) {
352354
string logMessage = ss.str() + " [" + logType + "] " + message + "\n";
353355
DWORD bytesWritten;
354356
DWORD logMessageSize = static_cast<DWORD>(logMessage.size());
@@ -1231,6 +1233,7 @@ extern "C" NTSTATUS DriverEntry(
12311233
hardwareCursor = EnabledQuery(L"HardwareCursorEnabled");
12321234
preventManufacturerSpoof = EnabledQuery(L"PreventMonitorSpoof");
12331235
edidCeaOverride = EnabledQuery(L"EdidCeaOverride");
1236+
sendLogsThroughPipe = EnabledQuery(L"SendLogsThroughPipe");
12341237

12351238
vddlog("i", "Driver Starting");
12361239
string utf8_confpath = WStringToString(confpath);

Virtual Display Driver (HDR)/vdd_settings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@
5858
<!-- Warning: Leaving logging on too long can lead to excessive filesize. Especially DebugLogging, which should only be used for short periods to log errors. -->
5959
<!-- Logging: Useful to troubleshoot and determine which GPUs are being used, and if displays are working as intended.-->
6060
<!-- Debug Logging: Logs local system information with every driver function/event/process. Useful for GitHub Help Tickets.-->
61+
<SendLogsThroughPipe>true</SendLogsThroughPipe>
6162
</options>
6263
</vdd_settings>

0 commit comments

Comments
 (0)