diff options
author | Adam Jackson <ajax@redhat.com> | 2009-10-26 14:04:23 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-10-29 14:06:00 -0400 |
commit | fb86433d897c116315cc7994390d11ac2f577511 (patch) | |
tree | 45085cbcbb971ac129155dcd8dfb788e8b638ad0 /hw | |
parent | fc2ec95664d55f45f77f1ebb039a7c17a1fcdaa3 (diff) |
modes: Decorate interlaced mode names with a trailing 'i'
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/modes/xf86EdidModes.c | 4 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Modes.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 8885a7cc4..6fef1e0f9 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -566,8 +566,6 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, return NULL; } - xf86SetModeDefaultName(Mode); - /* We ignore h/v_size and h/v_border for now. */ if (timing->interlaced) @@ -587,6 +585,8 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, Mode->Flags |= V_NHSYNC; } + xf86SetModeDefaultName(Mode); + return Mode; } diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index d105b48ab..ae6d95642 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -136,10 +136,12 @@ xf86ModeBandwidth(DisplayModePtr mode, int depth) void xf86SetModeDefaultName(DisplayModePtr mode) { - if (mode->name != NULL) - xfree(mode->name); + Bool interlaced = !!(mode->Flags & V_INTERLACE); - mode->name = XNFprintf("%dx%d", mode->HDisplay, mode->VDisplay); + xfree(mode->name); + + mode->name = XNFprintf("%dx%d%s", mode->HDisplay, mode->VDisplay, + interlaced ? "i" : ""); } /* |