Dear Lazyweb, anyone know how to get the EDID of an NSScreen? CGDisplayIOServicePort now always returns NULL. "ioreg -lw0" shows them, but I don't know how to map an NSScreenNumber to whatever IOKit nonsense corresponds to that.
Tags: , , ,

2 Responses:

  1. Steve says:

    FWIW, you can pass the NSScreenNumber to CGDisplaySerialNumber() + CGDisplayVendorNumber() + CGDisplayModelNumber(), then iterate through IOServiceMatching("IOMobileFramebuffer") to find the IORegistryEntry that matches the serial/vendor/model, and extract some of the EDID info from that.  See https://github.com/vuo/vuo/blob/385c2117b09b15b73e9c61b2dcfe2615907667ce/library/VuoScreenCommon.mm#L116-L165 for example.