<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 21, 2017 at 2:21 PM, Frediano Ziglio <span dir="ltr"><<a href="mailto:fziglio@redhat.com" target="_blank">fziglio@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">><br>
> Registry override of default behavior (disabling when enabled<br>
> by default) provided for support and troubleshooting only in case<br>
> this feature affects specific user.<br>
><br>
> Signed-off-by: Yuri Benditovich <<a href="mailto:yuri.benditovich@daynix.com">yuri.benditovich@daynix.com</a>><br>
> ---<br>
> qxldod/driver.cpp | 35 ++++++++++++++++++++++++++++++<wbr>+++++<br>
> 1 file changed, 35 insertions(+)<br>
><br>
> diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp<br>
> index 1946147..01b88d7 100755<br>
> --- a/qxldod/driver.cpp<br>
> +++ b/qxldod/driver.cpp<br>
> @@ -21,6 +21,38 @@<br>
><br>
> int nDebugLevel = TRACE_LEVEL_ERROR;<br>
><br>
> +// registry-based configuration is intended to be manual only<br>
> +// for VSync suppression during support and troubleshooting<br>
> +// and not expected to be made default<br>
> +static void QueryVSyncSetting(BOOLEAN& b, UNICODE_STRING *path)<br>
> +{<br>
> + PAGED_CODE();<br>
> + WCHAR buffer[MAX_PATH];<br>
> + ULONG val = b;<br>
> + RTL_QUERY_REGISTRY_TABLE QueryTable[3] = {};<br>
> + if (path->Length >= sizeof(buffer))<br>
> + return;<br>
> +<br>
> + QueryTable[0].Flags = RTL_QUERY_REGISTRY_SUBKEY;<br>
> + QueryTable[0].Name = L"Parameters";<br>
> + QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT |<br>
> RTL_QUERY_REGISTRY_TYPECHECK | RTL_QUERY_REGISTRY_REQUIRED;<br>
> + QueryTable[1].Name = L"EnableVSync";<br>
> + QueryTable[1].DefaultType = REG_DWORD << 24;<br>
> + QueryTable[1].EntryContext = &val;<br>
> +<br>
> + RtlCopyMemory(buffer, path->Buffer, path->Length);<br>
> + buffer[path->Length/2] = 0;<br>
> + NTSTATUS status = RtlQueryRegistryValues(RTL_<wbr>REGISTRY_ABSOLUTE, buffer,<br>
> QueryTable, NULL, NULL);<br>
> + if (NT_SUCCESS(status))<br>
> + {<br>
> + DbgPrint(TRACE_LEVEL_WARNING, ("%s: val = %d\n", __FUNCTION__,<br>
> val));<br>
<br>
</div></div>I would say INFORMATION level, nothing to worry about<br>
<span class=""><br>
> + b = !!val;<br>
> + }<br>
> + else<br>
> + {<br>
> + DbgPrint(TRACE_LEVEL_WARNING, ("%s: status = %X\n", __FUNCTION__,<br>
> status));<br>
<br>
</span>Even this, mostly of the time should be that the value is not set which is<br>
normal. Unless is supposed to always to present (from the inf file for instance).<br></blockquote><div><br></div><div>This value is planned as override of default behavior, and so normally not present.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> + }<br>
> +}<br>
><br>
> extern "C"<br>
> NTSTATUS<br>
> @@ -52,6 +84,9 @@ DriverEntry(<br>
> // related to enabled VSync control in Win10RS1<br>
><br>
> //g_bSupportVSync = TRUE;<br>
<br>
</span>Maybe this line now can be removed?<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>This line is planned to be uncommented in future.</div><div>Registry value is normally not set (as it is explained in the comment)</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
> +<br>
> + // for support/troubleshooting be able to disable VSync on specific<br>
> machine<br>
> + QueryVSyncSetting(g_<wbr>bSupportVSync, pRegistryPath);<br>
> }<br>
> DbgPrint(TRACE_LEVEL_WARNING, ("VSync support %sabled for %d.%d.%d\n",<br>
> g_bSupportVSync ? "en" : "dis",<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">Frediano<br>
</font></span></blockquote></div><br></div></div>