Author: tkreuzer
Date: Fri Oct 14 14:50:22 2011
New Revision: 54135
URL:
http://svn.reactos.org/svn/reactos?rev=54135&view=rev
Log:
[VIDEOPRT]
Remove an old hack, that caused an inconsistency between the display's device object
name and the name of its symbolic link / registry key. The hack isn't needed anymore,
because win32k now loads the next device if one isn't available. Fixes VBoxVideo being
loaded together with framebuf.dll instead of VBoxDisp.dll and now the mouse pointer
integration works completely.
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 [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Fri Oct 14 14:50:22 2011
@@ -359,7 +359,7 @@
WCHAR SymlinkBuffer[20];
UNICODE_STRING SymlinkName;
BOOL LegacyDetection = FALSE;
- ULONG DeviceNumber, DisplayNumber;
+ ULONG DeviceNumber;
DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
DeviceNumber = DeviceExtension->DeviceNumber;
@@ -480,30 +480,12 @@
RtlInitUnicodeString(&DeviceName, DeviceBuffer);
/* Create symbolic link "\??\DISPLAYx" */
-
- /* HACK: We need this to find the first available display to
- * use. We can't use the device number because then we could
- * end up with \Device\Video0 being non-functional because
- * HwFindAdapter returned an error. \Device\Video1 would be
- * the correct primary display but it would be set to DISPLAY2
- * so it would never be used and ROS would bugcheck on boot.
- * By doing it this way, we ensure that DISPLAY1 is always
- * functional. Another idea would be letting the IO manager
- * give our video devices names then getting those names
- * somehow and creating symbolic links to \Device\VideoX
- * and \??\DISPLAYX once we know that HwFindAdapter has succeeded.
- */
- DisplayNumber = 0;
- do
- {
- DisplayNumber++;
- swprintf(SymlinkBuffer, L"\\??\\DISPLAY%lu", DisplayNumber);
- RtlInitUnicodeString(&SymlinkName, SymlinkBuffer);
- }
- while (IoCreateSymbolicLink(&SymlinkName, &DeviceName) != STATUS_SUCCESS);
+ swprintf(SymlinkBuffer, L"\\??\\DISPLAY%lu", DeviceNumber + 1);
+ RtlInitUnicodeString(&SymlinkName, SymlinkBuffer);
+ IoCreateSymbolicLink(&SymlinkName, &DeviceName);
/* Add entry to DEVICEMAP\VIDEO key in registry. */
- swprintf(DeviceVideoBuffer, L"\\Device\\Video%d", DisplayNumber - 1);
+ swprintf(DeviceVideoBuffer, L"\\Device\\Video%d", DeviceNumber);
RtlWriteRegistryValue(
RTL_REGISTRY_DEVICEMAP,
L"VIDEO",