Skip to content

Commit

Permalink
Print detailed modes in a format more similar to X modelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
anholt committed Feb 14, 2007
1 parent ed3d577 commit 272f0da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions edid-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ detailed_block(unsigned char *x)
pvsync = (x[17] & (1 << 1)) ? '+' : '-';

printf("Detailed mode: Clock %.3f MHz, %d mm x %d mm\n"
" ha %d hbl %d hso %d hspw %d hborder %d\n"
" va %d vbl %d vso %d vspw %d vborder %d\n"
" %4d %4d %4d %4d hborder %d\n"
" %4d %4d %4d %4d vborder %d\n"
" %chsync %cvsync\n",
(x[0] + (x[1] << 8)) / 100.0,
(x[12] + ((x[14] & 0xF0) << 4)),
(x[13] + ((x[14] & 0x0F) << 8)),
ha, hbl, hso, hspw, hborder, va, vbl, vso, vspw, vborder,
ha, ha + hso, ha + hso + hspw, ha + hbl, hborder,
va, va + vso, va + vso + vspw, va + vbl, vborder,
phsync, pvsync
);
/* XXX flag decode */
Expand Down

0 comments on commit 272f0da

Please sign in to comment.