diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 0fdfbdb..b4e2db5 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -300,11 +300,25 @@ add(char **p, char *new) * Convenient VRefresh printing was added, though, compared to xf86Mode.c */ _X_EXPORT void -xf86PrintModeline(int scrnIndex,DisplayModePtr mode) +xf86PrintModeline(int scrnIndex, DisplayModePtr mode) { char tmp[256]; + char tchar[] = "UeudPb"; + int tbit[]={ M_T_USERPREF, M_T_DRIVER, M_T_USERDEF, + M_T_DEFAULT, M_T_PREFERRED, M_T_BUILTIN }; + char tflag[sizeof(tchar)+2]; + int i, tlen = 0; char *flags = xnfcalloc(1, 1); + if(mode->type) + tflag[tlen++] = ' '; + + for(i=0; itype & tbit[i]) + tflag[tlen++] = tchar[i]; + + tflag[tlen++] = '\0'; + if (mode->HSkew) { snprintf(tmp, 256, "hskew %i", mode->HSkew); add(&flags, tmp); @@ -328,11 +342,11 @@ #if 0 #endif xf86DrvMsg(scrnIndex, X_INFO, "Modeline \"%s\"x%.01f %6.2f %i %i %i %i %i %i %i %i%s " - "(%.01f kHz)\n", + "(%.01f kHz%s)\n", mode->name, mode->VRefresh, mode->Clock/1000., mode->HDisplay, mode->HSyncStart, mode->HSyncEnd, mode->HTotal, mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, - mode->VTotal, flags, xf86ModeHSync(mode)); + mode->VTotal, flags, xf86ModeHSync(mode), tflag); xfree(flags); } #endif /* XORG_VERSION_CURRENT <= 7.2.99.2 */