mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 03:07:05 +00:00
Revert "[WIN32SS] Only refresh graphics mode list when iModeNum = 0"
This reverts commit c243133b2c
.
Without the revert, VirtualBox auto-resize doesn't work on first attempt,
but only on next ones.
However, according to documentation, we must only initialize device and
cache information when iModeNum = 0.
CORE-18189
This commit is contained in:
parent
588285881e
commit
63e59e10f3
1 changed files with 8 additions and 17 deletions
|
@ -412,36 +412,27 @@ UserEnumDisplaySettings(
|
||||||
PGRAPHICS_DEVICE pGraphicsDevice;
|
PGRAPHICS_DEVICE pGraphicsDevice;
|
||||||
PDEVMODEENTRY pdmentry;
|
PDEVMODEENTRY pdmentry;
|
||||||
ULONG i, iFoundMode;
|
ULONG i, iFoundMode;
|
||||||
|
PPDEVOBJ ppdev;
|
||||||
|
|
||||||
TRACE("Enter UserEnumDisplaySettings('%wZ', %lu)\n",
|
TRACE("Enter UserEnumDisplaySettings('%wZ', %lu)\n",
|
||||||
pustrDevice, iModeNum);
|
pustrDevice, iModeNum);
|
||||||
|
|
||||||
/* Ask GDI for the GRAPHICS_DEVICE */
|
/* Ask GDI for the GRAPHICS_DEVICE */
|
||||||
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0);
|
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0);
|
||||||
if (!pGraphicsDevice)
|
ppdev = EngpGetPDEV(pustrDevice);
|
||||||
|
|
||||||
|
if (!pGraphicsDevice || !ppdev)
|
||||||
{
|
{
|
||||||
/* No device found */
|
/* No device found */
|
||||||
ERR("No device found!\n");
|
ERR("No device found!\n");
|
||||||
return STATUS_INVALID_PARAMETER_1;
|
return STATUS_INVALID_PARAMETER_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iModeNum == 0)
|
/* let's politely ask the driver for an updated mode list,
|
||||||
{
|
just in case there's something new in there (vbox) */
|
||||||
PPDEVOBJ ppdev;
|
|
||||||
ppdev = EngpGetPDEV(pustrDevice);
|
|
||||||
if (!ppdev)
|
|
||||||
{
|
|
||||||
/* No device found */
|
|
||||||
ERR("No device found!\n");
|
|
||||||
return STATUS_INVALID_PARAMETER_1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Let's politely ask the driver for an updated mode list,
|
PDEVOBJ_vRefreshModeList(ppdev);
|
||||||
* just in case there's something new in there (vbox) */
|
PDEVOBJ_vRelease(ppdev);
|
||||||
|
|
||||||
PDEVOBJ_vRefreshModeList(ppdev);
|
|
||||||
PDEVOBJ_vRelease(ppdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
iFoundMode = 0;
|
iFoundMode = 0;
|
||||||
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
||||||
|
|
Loading…
Reference in a new issue