[WIN32SS:ENG] Fix check to enable panning driver

If ldevtype is not LDEV_DEVICE_DISPLAY, pdm is really a PMDEVOBJ structure.
So, we must not read the dmFields value.
This commit is contained in:
Hervé Poussineau 2025-05-21 21:18:11 +02:00
parent c699471994
commit 0743ceefa2

View file

@ -562,8 +562,8 @@ PDEVOBJ_Create(
ppdev->dwAccelerationLevel = dwAccelerationLevel;
/* Copy the function table */
if ((ldevtype == LDEV_DEVICE_DISPLAY && dwAccelerationLevel >= 5) ||
pdm->dmFields & (DM_PANNINGWIDTH | DM_PANNINGHEIGHT))
if (ldevtype == LDEV_DEVICE_DISPLAY && (dwAccelerationLevel >= 5 ||
pdm->dmFields & (DM_PANNINGWIDTH | DM_PANNINGHEIGHT)))
{
ULONG i;