Skip to content

Commit

Permalink
winex11.drv: Support finding a full display mode with specified orien…
Browse files Browse the repository at this point in the history
…tation.

Signed-off-by: Zhiyi Zhang <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
zzhiyi authored and julliard committed Sep 22, 2020
1 parent ec245c7 commit bbae35f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dlls/winex11.drv/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit bbae35f

Please sign in to comment.