Skip to content

Commit

Permalink
Allow demo to link on macOS
Browse files Browse the repository at this point in the history
This is a work around for rust-windowing/winit#2078
  • Loading branch information
thomcc committed Dec 5, 2021
1 parent 2322b76 commit c7bda3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,8 @@ fn y8_to_rgba8(y8: u8) -> RGBA8 {
fn rgb8_to_rgba8(rgb8: RGB8) -> RGBA8 {
RGBA8 { r: rgb8.r, g: rgb8.g, b: rgb8.b, a: 0xFF }
}

// Work around for https://github.com/rust-windowing/winit/pull/2078
#[cfg(target_os = "macos")]
#[link(name = "ColorSync", kind = "framework")]
extern "C" {}

0 comments on commit c7bda3f

Please sign in to comment.