Commit fb86433d authored by Adam Jackson's avatar Adam Jackson 🎧

modes: Decorate interlaced mode names with a trailing 'i'

Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent fc2ec956
......@@ -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;
}
......
......@@ -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" : "");
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment