mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[WIN32K]
- Fix insertion of the GRAPHICS_DEVICE into the global list. Fixes mode enumeration when the 2nd adapter is used. - Remove a hack. svn path=/trunk/; revision=54156
This commit is contained in:
parent
d11dc6f620
commit
7dae81f20e
2 changed files with 12 additions and 12 deletions
|
@ -220,7 +220,9 @@ EngpRegisterGraphicsDevice(
|
|||
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 @@ EngpFindGraphicsDevice(
|
|||
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;
|
||||
|
|
|
@ -307,7 +307,7 @@ UserEnumDisplayDevices(
|
|||
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 @@ NtUserEnumDisplayDevices(
|
|||
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 @@ NtUserEnumDisplayDevices(
|
|||
_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 @@ UserEnumDisplaySettings(
|
|||
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 @@ NtUserEnumDisplaySettings(
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue