mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +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);
|
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
||||||
|
|
||||||
/* Insert the device into the global list */
|
/* Insert the device into the global list */
|
||||||
pGraphicsDevice->pNextGraphicsDevice = gpGraphicsDeviceLast;
|
pGraphicsDevice->pNextGraphicsDevice = NULL;
|
||||||
|
if (gpGraphicsDeviceLast)
|
||||||
|
gpGraphicsDeviceLast->pNextGraphicsDevice = pGraphicsDevice;
|
||||||
gpGraphicsDeviceLast = pGraphicsDevice;
|
gpGraphicsDeviceLast = pGraphicsDevice;
|
||||||
if (!gpGraphicsDeviceFirst)
|
if (!gpGraphicsDeviceFirst)
|
||||||
gpGraphicsDeviceFirst = pGraphicsDevice;
|
gpGraphicsDeviceFirst = pGraphicsDevice;
|
||||||
|
@ -246,11 +248,13 @@ EngpFindGraphicsDevice(
|
||||||
UNICODE_STRING ustrCurrent;
|
UNICODE_STRING ustrCurrent;
|
||||||
PGRAPHICS_DEVICE pGraphicsDevice;
|
PGRAPHICS_DEVICE pGraphicsDevice;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
DPRINT("EngpFindGraphicsDevice('%wZ', %ld, 0x%lx)\n",
|
||||||
|
pustrDevice, iDevNum, dwFlags);
|
||||||
|
|
||||||
/* Lock list */
|
/* Lock list */
|
||||||
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
||||||
|
|
||||||
if (pustrDevice)
|
if (pustrDevice && pustrDevice->Buffer)
|
||||||
{
|
{
|
||||||
/* Loop through the list of devices */
|
/* Loop through the list of devices */
|
||||||
for (pGraphicsDevice = gpGraphicsDeviceFirst;
|
for (pGraphicsDevice = gpGraphicsDeviceFirst;
|
||||||
|
|
|
@ -307,7 +307,7 @@ UserEnumDisplayDevices(
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open thhe device map registry key */
|
/* Open the device map registry key */
|
||||||
Status = RegOpenKey(KEY_VIDEO, &hkey);
|
Status = RegOpenKey(KEY_VIDEO, &hkey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -354,10 +354,6 @@ NtUserEnumDisplayDevices(
|
||||||
TRACE("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
|
TRACE("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
|
||||||
pustrDevice, iDevNum);
|
pustrDevice, iDevNum);
|
||||||
|
|
||||||
// FIXME: HACK, desk.cpl passes broken crap
|
|
||||||
if (pustrDevice && iDevNum != 0)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
dispdev.cb = sizeof(dispdev);
|
dispdev.cb = sizeof(dispdev);
|
||||||
|
|
||||||
if (pustrDevice)
|
if (pustrDevice)
|
||||||
|
@ -423,7 +419,7 @@ NtUserEnumDisplayDevices(
|
||||||
_SEH2_END
|
_SEH2_END
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
|
TRACE("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
|
||||||
/* Return the result */
|
/* Return the result */
|
||||||
// return Status;
|
// return Status;
|
||||||
return NT_SUCCESS(Status); // FIXME
|
return NT_SUCCESS(Status); // FIXME
|
||||||
|
@ -464,8 +460,8 @@ UserEnumDisplaySettings(
|
||||||
PDEVMODEENTRY pdmentry;
|
PDEVMODEENTRY pdmentry;
|
||||||
ULONG i, iFoundMode;
|
ULONG i, iFoundMode;
|
||||||
|
|
||||||
TRACE("Enter UserEnumDisplaySettings('%ls', %ld)\n",
|
TRACE("Enter UserEnumDisplaySettings('%wZ', %ld)\n",
|
||||||
pustrDevice ? pustrDevice->Buffer : NULL, iModeNum);
|
pustrDevice, iModeNum);
|
||||||
|
|
||||||
/* Ask gdi for the GRAPHICS_DEVICE */
|
/* Ask gdi for the GRAPHICS_DEVICE */
|
||||||
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0, 0);
|
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0, 0);
|
||||||
|
@ -570,8 +566,8 @@ NtUserEnumDisplaySettings(
|
||||||
ULONG cbSize, cbExtra;
|
ULONG cbSize, cbExtra;
|
||||||
DEVMODEW dmReg, *pdm;
|
DEVMODEW dmReg, *pdm;
|
||||||
|
|
||||||
TRACE("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
|
TRACE("Enter NtUserEnumDisplaySettings(%wZ, %ld, %p, 0x%lx)\n",
|
||||||
pustrDevice ? pustrDevice->Buffer : 0, iModeNum);
|
pustrDevice, iModeNum, lpDevMode, dwFlags);
|
||||||
|
|
||||||
if (pustrDevice)
|
if (pustrDevice)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue