mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +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;
|
||||
PDEVMODEENTRY pdmentry;
|
||||
ULONG i, iFoundMode;
|
||||
PPDEVOBJ ppdev;
|
||||
|
||||
TRACE("Enter UserEnumDisplaySettings('%wZ', %lu)\n",
|
||||
pustrDevice, iModeNum);
|
||||
|
||||
/* Ask GDI for the GRAPHICS_DEVICE */
|
||||
pGraphicsDevice = EngpFindGraphicsDevice(pustrDevice, 0);
|
||||
if (!pGraphicsDevice)
|
||||
ppdev = EngpGetPDEV(pustrDevice);
|
||||
|
||||
if (!pGraphicsDevice || !ppdev)
|
||||
{
|
||||
/* No device found */
|
||||
ERR("No device found!\n");
|
||||
return STATUS_INVALID_PARAMETER_1;
|
||||
}
|
||||
|
||||
if (iModeNum == 0)
|
||||
{
|
||||
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,
|
||||
just in case there's something new in there (vbox) */
|
||||
|
||||
/* Let's politely ask the driver for an updated mode list,
|
||||
* just in case there's something new in there (vbox) */
|
||||
|
||||
PDEVOBJ_vRefreshModeList(ppdev);
|
||||
PDEVOBJ_vRelease(ppdev);
|
||||
}
|
||||
PDEVOBJ_vRefreshModeList(ppdev);
|
||||
PDEVOBJ_vRelease(ppdev);
|
||||
|
||||
iFoundMode = 0;
|
||||
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
||||
|
|
Loading…
Reference in a new issue