winex11.drv: Support finding a full display mode with specified orientation.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2020-09-22 15:01:54 +08:00 committed by Alexandre Julliard
parent ec245c7e30
commit bbae35f0fb
1 changed files with 4 additions and 1 deletions

View File

@ -497,7 +497,7 @@ static DEVMODEW *get_full_mode(ULONG_PTR id, DEVMODEW *dev_mode)
if (is_detached_mode(dev_mode))
return dev_mode;
if (!handler.get_modes(id, 0, &modes, &mode_count))
if (!handler.get_modes(id, EDS_ROTATEDMODE, &modes, &mode_count))
return NULL;
qsort(modes, mode_count, sizeof(*modes) + modes[0].dmDriverExtra, mode_compare);
@ -519,6 +519,9 @@ static DEVMODEW *get_full_mode(ULONG_PTR id, DEVMODEW *dev_mode)
dev_mode->dmDisplayFrequency != 1 &&
dev_mode->dmDisplayFrequency != found_mode->dmDisplayFrequency)
continue;
if (dev_mode->dmFields & DM_DISPLAYORIENTATION &&
found_mode->u1.s2.dmDisplayOrientation != dev_mode->u1.s2.dmDisplayOrientation)
continue;
break;
}