fix: Allow unknown bit-depth on macOS (#4190)
It is unclear what values CGDisplayModeCopyPixelEncoding is allowed to return, so let's make sure to handle unknown cases.
This commit is contained in:
parent
3e50911adb
commit
04482d5a2e
4 changed files with 18 additions and 6 deletions
|
|
@ -11,8 +11,8 @@ use objc2_core_graphics::CGDirectDisplayID;
|
|||
|
||||
pub const IO16BitDirectPixels: &str = "-RRRRRGGGGGBBBBB";
|
||||
pub const IO32BitDirectPixels: &str = "--------RRRRRRRRGGGGGGGGBBBBBBBB";
|
||||
|
||||
pub const kIO30BitDirectPixels: &str = "--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB";
|
||||
pub const kIO64BitDirectPixels: &str = "-16R16G16B16";
|
||||
|
||||
// `CGDisplayCreateUUIDFromDisplayID` comes from the `ColorSync` framework.
|
||||
// However, that framework was only introduced "publicly" in macOS 10.13.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue