Author: cfinck
Date: Fri Aug 3 16:10:43 2007
New Revision: 28127
URL: http://svn.reactos.org/svn/reactos?rev=28127&view=rev
Log:
Check if the same Monitor ID (= 10 bytes from the EDID, which can be used to uniquely identify a monitor) appears two times and stop the enumeration in this case.
This is needed for some older monitors (1994-1999), which transmit the EDID data according to the VBE/DDC Standard 1.0.
We assumed that the function for reading the EDID fails, when we input higher controller unit numbers, but some older monitors don't care about the controller unit number and always return valid EDID data.
More information is available at: http://www.vesa.org/public/VBE/VBEDDC11.PDF
See issue #2239 for more details.
Modified:
trunk/reactos/drivers/video/videoprt/videoprt.c
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c Fri Aug 3 16:10:43 2007
@@ -1100,6 +1100,8 @@
ULONG Status;
VIDEO_CHILD_ENUM_INFO ChildEnumInfo;
VIDEO_CHILD_TYPE ChildType;
+ BOOLEAN bHaveLastMonitorID = FALSE;
+ UCHAR LastMonitorID[10];
UCHAR ChildDescriptor[256];
ULONG ChildId;
ULONG Unused;
@@ -1131,7 +1133,37 @@
ChildDescriptor,
&ChildId,
&Unused);
- if (Status == VIDEO_ENUM_INVALID_DEVICE)
+ if (Status == VIDEO_ENUM_MORE_DEVICES)
+ {
+ if (ChildType == Monitor)
+ {
+ // Check if the EDID is valid
+ if (ChildDescriptor[0] == 0x00 &&
+ ChildDescriptor[1] == 0xFF &&
+ ChildDescriptor[2] == 0xFF &&
+ ChildDescriptor[3] == 0xFF &&
+ ChildDescriptor[4] == 0xFF &&
+ ChildDescriptor[5] == 0xFF &&
+ ChildDescriptor[6] == 0xFF &&
+ ChildDescriptor[7] == 0x00)
+ {
+ if (bHaveLastMonitorID)
+ {
+ // Compare the previous monitor ID with the current one, break the loop if they are identical
+ if (RtlCompareMemory(LastMonitorID, &ChildDescriptor[8], sizeof(LastMonitorID)) == sizeof(LastMonitorID))
+ {
+ DPRINT("Found identical Monitor ID two times, stopping enumeration\n");
+ break;
+ }
+ }
+
+ // Copy 10 bytes from the EDID, which can be used to uniquely identify the monitor
+ RtlCopyMemory(LastMonitorID, &ChildDescriptor[8], sizeof(LastMonitorID));
+ bHaveLastMonitorID = TRUE;
+ }
+ }
+ }
+ else if (Status == VIDEO_ENUM_INVALID_DEVICE)
{
DPRINT("Child device %d is invalid!\n", ChildEnumInfo.ChildIndex);
continue;
@@ -1141,7 +1173,7 @@
DPRINT("End of child enumeration! (%d children enumerated)\n", i - 1);
break;
}
- else if (Status != VIDEO_ENUM_MORE_DEVICES)
+ else
{
DPRINT("HwGetVideoChildDescriptor returned unknown status code 0x%x!\n", Status);
break;
Author: dreimer
Date: Fri Aug 3 15:47:20 2007
New Revision: 28125
URL: http://svn.reactos.org/svn/reactos?rev=28125&view=rev
Log:
Update Help and Comments.
Set Default Shortcut active after setting it.
Modified:
trunk/tools/RosBE-Windows/Root/Help.cmd
trunk/tools/RosBE-Windows/Root/RosBE.cmd
trunk/tools/RosBE-Windows/Root/scut.cmd
Modified: trunk/tools/RosBE-Windows/Root/Help.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Help.cmd?…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/Help.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/Help.cmd Fri Aug 3 15:47:20 2007
@@ -118,6 +118,9 @@
echo (Optional: "Shortcut" "Directory" as second and third parameter)
echo remove - Removes a shortcut.
echo (Optional: "Shortcut" as second parameter)
+ echo def - Chooses Default Shortcut which is enabled on
+ echo every start of RosBE. "Default" is the Source
+ echo Directory as you know it from previous Versions
goto :EOF
)
if not "%1" == "" (
Modified: trunk/tools/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RosBE.cmd…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/RosBE.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/RosBE.cmd Fri Aug 3 15:47:20 2007
@@ -58,8 +58,8 @@
:EndCommandParse
::
-:: Save our initial directory (should be the ReactOS source directory)
-:: and add PATH for Tools Folder.
+:: Load the Base Directory from the Shortcut-XML and set it as new
+:: Source Directory and add PATH for Tools Folder.
::
set PATH=%ROSBEBASEDIR%\Tools;%PATH%
for /f "usebackq" %%i in (`"grep base= "%ROSBEBASEDIR%\srclist.xml"|cutz main"`) do @SET scut=%%i
@@ -82,7 +82,8 @@
echo -------------------------------------------------
::
-:: Load the macros that serve as our commands.
+:: Load the macros that serve as our commands and set new Source
+:: Directory / Default Source Directory.
::
doskey /macrofile="%ROSBEBASEDIR%\RosBE.mac"
if "%scut%" == "Default" (
Modified: trunk/tools/RosBE-Windows/Root/scut.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/scut.cmd?…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/scut.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/scut.cmd Fri Aug 3 15:47:20 2007
@@ -10,6 +10,9 @@
title Choose your Source Folder...
+::
+:: Receive the first Parameter and decide what to do.
+::
if /I "%1"=="" (
goto :DEF
)
@@ -32,6 +35,9 @@
SET /P XY=
goto :RUN
+::
+:: Load Shortcut from XML and set it active.
+::
:RUN
for /f "usebackq" %%i in (`"grep name=\"%XY%\" "%ROSBEBASEDIR%\srclist.xml"|cutz dir"`) do @SET dir=%%i
cd /D %dir%
@@ -51,6 +57,9 @@
goto :ADD1
)
+::
+:: Add new Shortcut to XML.
+::
:ADD1
echo Choose your Shortcut:
SET /P CUT=
@@ -64,6 +73,9 @@
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
goto :END
+::
+:: Remove Shortcut from XML.
+::
:REM
if not "%2" == "" (
set CUTREM=%2
@@ -77,6 +89,9 @@
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
goto :END
+::
+:: Set Default Shortcut.
+::
:DEF2
if not "%2" == "" (
set DEF=%2
@@ -88,6 +103,7 @@
sed "s/base=\".*\"/base=\"%DEF%\"/g" "%ROSBEBASEDIR%\srclist.xml" > "%ROSBEBASEDIR%\srclist2.xml"
del "%ROSBEBASEDIR%\srclist.xml"
ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml
+call "%ROSBEBASEDIR%\RosBE.cmd"
:END
title ReactOS Build Environment %_VER%