mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-23 09:40:40 +01:00
RANDR 1.2: Inherit PreferredMode from the global configuration, if any.
If you don't do this, then Modes "800x600" in the Display subsection will be dutifully ignored and the driver will start at whatever resolution it feels like.
This commit is contained in:
parent
28c156e2ba
commit
5d2946655b
1 changed files with 18 additions and 2 deletions
|
|
@ -1261,6 +1261,23 @@ xf86SortModes (DisplayModePtr input)
|
|||
return output;
|
||||
}
|
||||
|
||||
static char *
|
||||
preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output)
|
||||
{
|
||||
char *preferred_mode = NULL;
|
||||
|
||||
/* Check for a configured preference for a particular mode */
|
||||
preferred_mode = xf86GetOptValString (output->options,
|
||||
OPTION_PREFERRED_MODE);
|
||||
if (preferred_mode)
|
||||
return preferred_mode;
|
||||
|
||||
if (pScrn->display->modes && *pScrn->display->modes)
|
||||
preferred_mode = *pScrn->display->modes;
|
||||
|
||||
return preferred_mode;
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
||||
{
|
||||
|
|
@ -1445,8 +1462,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
|||
output->probed_modes = xf86SortModes (output->probed_modes);
|
||||
|
||||
/* Check for a configured preference for a particular mode */
|
||||
preferred_mode = xf86GetOptValString (output->options,
|
||||
OPTION_PREFERRED_MODE);
|
||||
preferred_mode = preferredMode(scrn, output);
|
||||
|
||||
if (preferred_mode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue