https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0dfc7f06b7119a3713352efc8d1b2b6d122c0d12

commit 0dfc7f06b7119a3713352efc8d1b2b6d122c0d12
Author:     Dmitry Borisov <[email protected]>
AuthorDate: Tue Sep 15 18:24:42 2020 +0600
Commit:     GitHub <[email protected]>
CommitDate: Tue Sep 15 15:24:42 2020 +0300

    [VIDEOPRT] Add global variable for debugging video drivers (#3080)
    
    Reference: 
https://docs.microsoft.com/en-us/previous-versions/ff570170(v=vs.85)
---
 win32ss/drivers/videoprt/videoprt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/win32ss/drivers/videoprt/videoprt.c 
b/win32ss/drivers/videoprt/videoprt.c
index a59d0442017..edce0febccd 100644
--- a/win32ss/drivers/videoprt/videoprt.c
+++ b/win32ss/drivers/videoprt/videoprt.c
@@ -31,6 +31,8 @@
 
 /* GLOBAL VARIABLES 
***********************************************************/
 
+ULONG VideoDebugLevel = 0;
+
 BOOLEAN VpBaseVideo = FALSE;
 BOOLEAN VpNoVesa = FALSE;
 
@@ -294,6 +296,8 @@ IntVideoPortFindAdapter(
                                       SystemBasicInfo.PageSize;
     }
 
+    // FIXME: Check the adapter key and update VideoDebugLevel variable.
+
     /*
      * Call miniport HwVidFindAdapter entry point to detect if
      * particular device is present. There are two possible code
@@ -794,6 +798,9 @@ VideoPortDebugPrint(
 {
     va_list ap;
 
+    if (VideoDebugLevel >= DebugPrintLevel)
+        DebugPrintLevel = Error;
+
     va_start(ap, DebugMessage);
     vDbgPrintEx(DPFLTR_IHVVIDEO_ID, DebugPrintLevel, DebugMessage, ap);
     va_end(ap);

Reply via email to