xorg-x11-server/xserver-1.3.0-randr12-config-hack.patch
Adam Jackson afcbbe25e6 * Wed Oct 31 2007 Adam Jackson <ajax@redhat.com> 1.4.99.1-0.2
- BuildRequires: git.
- Manage the source directory as a git repo.
- Use git-am(1) to apply patches instead of %patch.
- Reformat a bunch of patches to conform to git-am's rules.
- Add wfb to file manifest.
- Drop afb, sorry Amiga users.
- Delete the SecurityPolicy man page from the buildroot, until we have a
  xorg-x11-server-common.
- Update to today's snapshot.
2007-10-31 19:28:56 +00:00

43 lines
1.4 KiB
Diff

From: Adam Jackson <ajax@redhat.com>
Date: Sun, 28 Oct 2007 09:37:52 +0100
Subject: [PATCH] Use the global Modes list when determining preferred mode.
---
diff -up xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c.da xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c
--- xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c.da 2007-09-26 17:12:44.000000000 +1000
+++ xorg-server-1.3.0.0/hw/xfree86/modes/xf86Crtc.c 2007-09-26 17:14:44.000000000 +1000
@@ -1214,6 +1214,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)
{
@@ -1395,8 +1412,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn,
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)
{