EDID: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m Bot: Replace deprecated source tag with syntaxhighlight
m Bot: Replace deprecated source tag with syntaxhighlight
 
Line 291: Line 291:
== Get preferred resolution ==
== Get preferred resolution ==


<source lang="c">
<syntaxhighlight lang="c">
void get_preferred_resolution(uint8_t *edid, int *x, int *y) {
void get_preferred_resolution(uint8_t *edid, int *x, int *y) {
*x = edid[0x38] | ((int) (edid[0x3A] & 0xF0) << 4);
*x = edid[0x38] | ((int) (edid[0x3A] & 0xF0) << 4);
*y = edid[0x3B] | ((int) (edid[0x3D] & 0xF0) << 4);
*y = edid[0x3B] | ((int) (edid[0x3D] & 0xF0) << 4);
}
}
</syntaxhighlight>
</source>


== See Also ==
== See Also ==