mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
Revert "[WIN32SS] Handle panning in LDEVOBJ_bProbeAndCaptureDevmode"
This reverts commit 37c2bb3985
.
CORE-18189
This commit is contained in:
parent
c243133b2c
commit
22dac3447f
1 changed files with 7 additions and 46 deletions
|
@ -688,14 +688,6 @@ LDEVOBJ_bGetClosestMode(
|
||||||
if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, pSelectedMode, FALSE))
|
if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, pSelectedMode, FALSE))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Remove panning (if specified) */
|
|
||||||
if (RequestedMode->dmFields & (DM_PANNINGWIDTH | DM_PANNINGHEIGHT))
|
|
||||||
{
|
|
||||||
RequestedMode->dmFields &= ~(DM_PANNINGWIDTH | DM_PANNINGHEIGHT);
|
|
||||||
if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, pSelectedMode, FALSE))
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fall back to first mode */
|
/* Fall back to first mode */
|
||||||
WARN("Fall back to first available mode\n");
|
WARN("Fall back to first available mode\n");
|
||||||
*pSelectedMode = pGraphicsDevice->pDevModeList[0].pdm;
|
*pSelectedMode = pGraphicsDevice->pDevModeList[0].pdm;
|
||||||
|
@ -726,36 +718,21 @@ LDEVOBJ_bProbeAndCaptureDevmode(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Search if requested mode exists */
|
/* Search if requested mode exists */
|
||||||
DWORD dmPelsWidth = RequestedMode->dmPelsWidth;
|
|
||||||
DWORD dmPelsHeight = RequestedMode->dmPelsHeight;
|
|
||||||
DWORD dmFields = RequestedMode->dmFields;
|
|
||||||
|
|
||||||
if (dmFields & DM_PANNINGWIDTH)
|
|
||||||
{
|
|
||||||
dmFields |= DM_PELSWIDTH;
|
|
||||||
dmPelsWidth = RequestedMode->dmPanningWidth;
|
|
||||||
}
|
|
||||||
if (dmFields & DM_PANNINGHEIGHT)
|
|
||||||
{
|
|
||||||
dmFields |= DM_PELSHEIGHT;
|
|
||||||
dmPelsHeight = RequestedMode->dmPanningHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
||||||
{
|
{
|
||||||
pdmCurrent = pGraphicsDevice->pDevModeList[i].pdm;
|
pdmCurrent = pGraphicsDevice->pDevModeList[i].pdm;
|
||||||
|
|
||||||
/* Compare asked DEVMODE fields
|
/* Compare asked DEVMODE fields
|
||||||
* Only compare those that are valid in both DEVMODE structs */
|
* Only compare those that are valid in both DEVMODE structs */
|
||||||
dwFields = pdmCurrent->dmFields & dmFields;
|
dwFields = pdmCurrent->dmFields & RequestedMode->dmFields;
|
||||||
|
|
||||||
/* For now, we only need those */
|
/* For now, we only need those */
|
||||||
if ((dwFields & DM_BITSPERPEL) &&
|
if ((dwFields & DM_BITSPERPEL) &&
|
||||||
(pdmCurrent->dmBitsPerPel != RequestedMode->dmBitsPerPel)) continue;
|
(pdmCurrent->dmBitsPerPel != RequestedMode->dmBitsPerPel)) continue;
|
||||||
if ((dwFields & DM_PELSWIDTH) &&
|
if ((dwFields & DM_PELSWIDTH) &&
|
||||||
(pdmCurrent->dmPelsWidth != dmPelsWidth)) continue;
|
(pdmCurrent->dmPelsWidth != RequestedMode->dmPelsWidth)) continue;
|
||||||
if ((dwFields & DM_PELSHEIGHT) &&
|
if ((dwFields & DM_PELSHEIGHT) &&
|
||||||
(pdmCurrent->dmPelsHeight != dmPelsHeight)) continue;
|
(pdmCurrent->dmPelsHeight != RequestedMode->dmPelsHeight)) continue;
|
||||||
if ((dwFields & DM_DISPLAYFREQUENCY) &&
|
if ((dwFields & DM_DISPLAYFREQUENCY) &&
|
||||||
(pdmCurrent->dmDisplayFrequency != RequestedMode->dmDisplayFrequency)) continue;
|
(pdmCurrent->dmDisplayFrequency != RequestedMode->dmDisplayFrequency)) continue;
|
||||||
|
|
||||||
|
@ -766,10 +743,10 @@ LDEVOBJ_bProbeAndCaptureDevmode(
|
||||||
if (!pdmSelected)
|
if (!pdmSelected)
|
||||||
{
|
{
|
||||||
WARN("Requested mode not found (%dx%dx%d %d Hz)\n",
|
WARN("Requested mode not found (%dx%dx%d %d Hz)\n",
|
||||||
dmFields & DM_PELSWIDTH ? dmPelsWidth : 0,
|
RequestedMode->dmFields & DM_PELSWIDTH ? RequestedMode->dmPelsWidth : 0,
|
||||||
dmFields & DM_PELSHEIGHT ? dmPelsHeight : 0,
|
RequestedMode->dmFields & DM_PELSHEIGHT ? RequestedMode->dmPelsHeight : 0,
|
||||||
dmFields & DM_BITSPERPEL ? RequestedMode->dmBitsPerPel : 0,
|
RequestedMode->dmFields & DM_BITSPERPEL ? RequestedMode->dmBitsPerPel : 0,
|
||||||
dmFields & DM_DISPLAYFREQUENCY ? RequestedMode->dmDisplayFrequency : 0);
|
RequestedMode->dmFields & DM_DISPLAYFREQUENCY ? RequestedMode->dmDisplayFrequency : 0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -785,22 +762,6 @@ LDEVOBJ_bProbeAndCaptureDevmode(
|
||||||
(PVOID)((ULONG_PTR)pdmSelected + pdmSelected->dmSize),
|
(PVOID)((ULONG_PTR)pdmSelected + pdmSelected->dmSize),
|
||||||
pdmSelected->dmDriverExtra);
|
pdmSelected->dmDriverExtra);
|
||||||
|
|
||||||
if (!bSearchClosestMode)
|
|
||||||
{
|
|
||||||
if (RequestedMode->dmFields & DM_PANNINGWIDTH)
|
|
||||||
{
|
|
||||||
pdm->dmFields |= DM_PANNINGWIDTH;
|
|
||||||
pdm->dmPanningWidth = pdm->dmPelsWidth;
|
|
||||||
pdm->dmPelsWidth = RequestedMode->dmPelsWidth;
|
|
||||||
}
|
|
||||||
if (RequestedMode->dmFields & DM_PANNINGHEIGHT)
|
|
||||||
{
|
|
||||||
pdm->dmFields |= DM_PANNINGHEIGHT;
|
|
||||||
pdm->dmPanningHeight = pdm->dmPelsHeight;
|
|
||||||
pdm->dmPelsHeight = RequestedMode->dmPelsHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*pSelectedMode = pdm;
|
*pSelectedMode = pdm;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue