Author: tkreuzer
Date: Sun Oct 16 09:15:19 2011
New Revision: 54156
URL:
http://svn.reactos.org/svn/reactos?rev=54156&view=rev
Log:
[WIN32K]
- Fix insertion of the GRAPHICS_DEVICE into the global list. Fixes mode enumeration when
the 2nd adapter is used.
- Remove a hack.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/device.c
trunk/reactos/subsystems/win32/win32k/ntuser/display.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] Sun Oct 16 09:15:19
2011
@@ -220,7 +220,9 @@
EngAcquireSemaphore(ghsemGraphicsDeviceList);
/* Insert the device into the global list */
- pGraphicsDevice->pNextGraphicsDevice = gpGraphicsDeviceLast;
+ pGraphicsDevice->pNextGraphicsDevice = NULL;
+ if (gpGraphicsDeviceLast)
+ gpGraphicsDeviceLast->pNextGraphicsDevice = pGraphicsDevice;
gpGraphicsDeviceLast = pGraphicsDevice;
if (!gpGraphicsDeviceFirst)
gpGraphicsDeviceFirst = pGraphicsDevice;
@@ -246,11 +248,13 @@
UNICODE_STRING ustrCurrent;
PGRAPHICS_DEVICE pGraphicsDevice;
ULONG i;
+ DPRINT("EngpFindGraphicsDevice('%wZ', %ld, 0x%lx)\n",
+ pustrDevice, iDevNum, dwFlags);
/* Lock list */
EngAcquireSemaphore(ghsemGraphicsDeviceList);
- if (pustrDevice)
+ if (pustrDevice && pustrDevice->Buffer)
{
/* Loop through the list of devices */
for (pGraphicsDevice = gpGraphicsDeviceFirst;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] Sun Oct 16
09:15:19 2011
@@ -307,7 +307,7 @@
return STATUS_UNSUCCESSFUL;
}
- /* Open thhe device map registry key */
+ /* Open the device map registry key */
Status = RegOpenKey(KEY_VIDEO, &hkey);
if (!NT_SUCCESS(Status))
{
@@ -354,10 +354,6 @@
TRACE("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
pustrDevice, iDevNum);
- // FIXME: HACK, desk.cpl passes broken crap
- if (pustrDevice && iDevNum != 0)
- return FALSE;
-
dispdev.cb = sizeof(dispdev);
if (pustrDevice)
@@ -423,7 +419,7 @@
_SEH2_END
}
- ERR("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
+ TRACE("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
/* Return the result */
// return Status;
return NT_SUCCESS(Status); // FIXME
@@ -464,8 +460,8 @@
PDEVMODEENTRY pdmentry;
ULONG i, iFoundMode;
- TRACE("Enter UserEnumDisplaySettings('%ls', %ld)\n",
- pustrDevice ? pustrDevice->Buffer : NULL, iModeNum);
+ TRACE("Enter UserEnumDisplaySettings('%wZ', %ld)\n",
+ pustrDevice, iModeNum);
/* Ask gdi for the GRAPHICS_DEVICE */
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0, 0);
@@ -570,8 +566,8 @@
ULONG cbSize, cbExtra;
DEVMODEW dmReg, *pdm;
- TRACE("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
- pustrDevice ? pustrDevice->Buffer : 0, iModeNum);
+ TRACE("Enter NtUserEnumDisplaySettings(%wZ, %ld, %p, 0x%lx)\n",
+ pustrDevice, iModeNum, lpDevMode, dwFlags);
if (pustrDevice)
{