diff options
Diffstat (limited to 'hw/xfree86/modes/xf86Crtc.c')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index bb416fddc..653042c85 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -36,6 +36,7 @@ #include "xf86DDC.h" #include "xf86Crtc.h" #include "xf86Modes.h" +#include "xf86Priv.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" #define DPMS_SERVER @@ -704,9 +705,9 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height) mm_height = output->mm_height; if (!mm_height) - mm_height = 203; /* 768 pixels at 96dpi */ + mm_height = (768 * 25.4) / DEFAULT_DPI; /* - * Pick a mode closest to 96dpi + * Pick a mode closest to DEFAULT_DPI */ for (mode = output->probed_modes; mode; mode = mode->next) { @@ -721,7 +722,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height) /* yes, use VDisplay here, not xf86ModeHeight */ dpi = (mode->VDisplay * 254) / (mm_height * 10); - diff = dpi - 96; + diff = dpi - DEFAULT_DPI; diff = diff < 0 ? -diff : diff; if (target_mode == NULL || (preferred > target_preferred) || (preferred == target_preferred && diff < target_diff)) |