Open andrews05 opened 1 year ago
Just FYI, I've put together a more detailed version of the private struct for display mode descriptions.
typedef struct CGSDisplayModeDescription { uint32_t ioDisplayModeID_alt; // Should be the same as ioDisplayMode uint32_t ioFlags_alt; // Mostly the same but slightly different to ioFlags uint32_t width; uint32_t height; uint32_t maxDepthIndex; uint32_t bytesPerRow; uint32_t bitsPerPixel; uint32_t bitsPerSample; uint32_t samplesPerPixel; uint32_t refreshRate; uint32_t unknown[2]; char pixelEncoding[64]; uint32_t unknown2[19]; uint32_t refreshRate_fixed; // 16.16 fixed fraction uint32_t ioFlags; uint32_t ioDisplayModeID; uint32_t pixelWidth; uint32_t pixelHeight; float backingScaleFactor; } CGSDisplayModeDescription;
The following documents were helpful references for this: https://developer.apple.com/documentation/coregraphics/cgdisplaymode https://developer.apple.com/documentation/coregraphics/quartz_display_services/display_mode_standard_properties https://github.com/aosm/IOGraphics/blob/ae89a5073a37ffd77cfb964921e05fc90810dbb8/IOGraphicsFamily/IOKit/graphics/IOGraphicsTypes.h#L128
Just FYI, I've put together a more detailed version of the private struct for display mode descriptions.
The following documents were helpful references for this: https://developer.apple.com/documentation/coregraphics/cgdisplaymode https://developer.apple.com/documentation/coregraphics/quartz_display_services/display_mode_standard_properties https://github.com/aosm/IOGraphics/blob/ae89a5073a37ffd77cfb964921e05fc90810dbb8/IOGraphicsFamily/IOKit/graphics/IOGraphicsTypes.h#L128