Skip to content

Commit e4bc402

Browse files
committed
Xor Support level added
THIS SHOULD NOT BE CHANGED UNLESS YOU KNOW WHAT YOU'RE DOING
1 parent 976dd16 commit e4bc402

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

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

+35
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ bool sendLogsThroughPipe = true;
103103
bool alphaCursorSupport = true;
104104
int CursorMaxX = 128;
105105
int CursorMaxY = 128;
106+
IDDCX_XOR_CURSOR_SUPPORT XorCursorSupportLevel = IDDCX_XOR_CURSOR_SUPPORT_FULL;
106107

107108

108109
//Rest
@@ -123,9 +124,26 @@ std::map<std::wstring, std::pair<std::wstring, std::wstring>> SettingsQueryMap =
123124
{L"AlphaCursorSupport", {L"ALPHACURSORSUPPORT", L"AlphaCursorSupport"}},
124125
{L"CursorMaxX", {L"CURSORMAXX", L"CursorMaxX"}},
125126
{L"CursorMaxY", {L"CURSORMAXY", L"CursorMaxY"}},
127+
{L"XorCursorSupportLevel", {L"XORCURSORSUPPORTLEVEL", L"XorCursorSupportLevel"}},
126128

127129
};
128130

131+
const char* XorCursorSupportLevelToString(IDDCX_XOR_CURSOR_SUPPORT level) {
132+
switch (level) {
133+
case IDDCX_XOR_CURSOR_SUPPORT_UNINITIALIZED:
134+
return "IDDCX_XOR_CURSOR_SUPPORT_UNINITIALIZED";
135+
case IDDCX_XOR_CURSOR_SUPPORT_NONE:
136+
return "IDDCX_XOR_CURSOR_SUPPORT_NONE";
137+
case IDDCX_XOR_CURSOR_SUPPORT_FULL:
138+
return "IDDCX_XOR_CURSOR_SUPPORT_FULL";
139+
case IDDCX_XOR_CURSOR_SUPPORT_EMULATION:
140+
return "IDDCX_XOR_CURSOR_SUPPORT_EMULATION";
141+
default:
142+
return "Unknown";
143+
}
144+
}
145+
146+
129147
vector<unsigned char> Microsoft::IndirectDisp::IndirectDeviceContext::s_KnownMonitorEdid; //Changed to support static vector
130148

131149
struct IndirectDeviceContextWrapper
@@ -1344,6 +1362,23 @@ extern "C" NTSTATUS DriverEntry(
13441362
CursorMaxX = GetIntegerSetting(L"CursorMaxX");
13451363
CursorMaxY = GetIntegerSetting(L"CursorMaxY");
13461364

1365+
int xorCursorSupportLevelInt = GetIntegerSetting(L"XorCursorSupportLevel");
1366+
std::string xorCursorSupportLevelName;
1367+
1368+
if (xorCursorSupportLevelInt < 0 || xorCursorSupportLevelInt > 3) {
1369+
vddlog("w", "Selected Xor Level unsupported, defaulting to IDDCX_XOR_CURSOR_SUPPORT_FULL");
1370+
XorCursorSupportLevel = IDDCX_XOR_CURSOR_SUPPORT_FULL;
1371+
}
1372+
else {
1373+
XorCursorSupportLevel = static_cast<IDDCX_XOR_CURSOR_SUPPORT>(xorCursorSupportLevelInt);
1374+
}
1375+
1376+
xorCursorSupportLevelName = XorCursorSupportLevelToString(XorCursorSupportLevel);
1377+
1378+
vddlog("i", ("Selected Xor Cursor Support Level: " + xorCursorSupportLevelName).c_str());
1379+
1380+
1381+
13471382
vddlog("i", "Driver Starting");
13481383
string utf8_confpath = WStringToString(confpath);
13491384
string logtext = "VDD Path: " + utf8_confpath;

Virtual Display Driver (HDR)/vdd_settings.xml

+7
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,12 @@
6464
<CursorMaxY>128</CursorMaxY> <!--The maximum height support for all cursor types. Older intel cpus may be limited to 64x64 -->
6565
<CursorMaxX>128</CursorMaxX> <!--The maximum width supported for all supported cursor types.-->
6666
<AlphaCursorSupport>true</AlphaCursorSupport> <!--Indicates if the adapter supports the 32-bit alpha cursor format. Most cursors are alpha format.-->
67+
<XorCursorSupportLevel>2</XorCursorSupportLevel> <!-- Do not change if you don't know what you're doing -->
68+
<!--
69+
0 = IDDCX_XOR_CURSOR_SUPPORT_UNINITIALIZED
70+
1 = IDDCX_XOR_CURSOR_SUPPORT_NONE
71+
2 = IDDCX_XOR_CURSOR_SUPPORT_FULL
72+
3 = IDDCX_XOR_CURSOR_SUPPORT_EMULATION
73+
-->
6774
</cursor>
6875
</vdd_settings>

0 commit comments

Comments
 (0)