Skip to content

Commit

Permalink
Print the correct VIC number next to the mode
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
  • Loading branch information
thos authored and Damien Lespiau committed Sep 27, 2013
1 parent 07b3bcc commit bfe77ed
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 @@ -715,10 +715,11 @@ cea_video_block(unsigned char *x)
unsigned char vic = x[i] & 0x7f;
unsigned char native = x[i] & 0x80;
const char *mode;
int index;

vic--;
if (vic < ARRAY_SIZE(edid_cea_modes))
mode = edid_cea_modes[vic];
index = vic - 1;
if (index < ARRAY_SIZE(edid_cea_modes))
mode = edid_cea_modes[index];
else
mode = "Unknown mode";

Expand Down

0 comments on commit bfe77ed

Please sign in to comment.