Author: tkreuzer
Date: Fri Oct 14 13:41:03 2011
New Revision: 54133
URL:
http://svn.reactos.org/svn/reactos?rev=54133&view=rev
Log:
[WIN32K]
- Since some display drivers don't do as they should - return the drisplay driver name
in the DEVMODE's dmDisplayName field - but return the miniport driver name, fix that
name when creating the mode list. This fixes loading of VBox driver, when it is installed
properly, which needs to be fixed as well.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/device.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/device.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/device.c [iso-8859-1] Fri Oct 14 13:41:03
2011
@@ -148,13 +148,19 @@
pdminfo->pdmiNext = pGraphicsDevice->pdevmodeInfo;
pGraphicsDevice->pdevmodeInfo = pdminfo;
- /* Count DEVMODEs */
+ /* Loop all DEVMODEs */
pdmEnd = (DEVMODEW*)((PCHAR)pdminfo->adevmode + pdminfo->cbdevmode);
for (pdm = pdminfo->adevmode;
pdm + 1 <= pdmEnd;
pdm = (DEVMODEW*)((PCHAR)pdm + pdm->dmSize + pdm->dmDriverExtra))
{
+ /* Count this DEVMODE */
cModes++;
+
+ /* Some drivers like the VBox driver don't fill the dmDeviceName
+ with the name of the display driver. So fix that here. */
+ wcsncpy(pdm->dmDeviceName, pwsz, CCHDEVICENAME);
+ pdm->dmDeviceName[CCHDEVICENAME - 1] = 0;
}
// FIXME: release the driver again until it's used?