Skip to content

Commit

Permalink
Merge pull request sebcrozet#258 from ThomAub/macOSbug/broken0.28
Browse files Browse the repository at this point in the history
🐛 sebcrozet#257 using same cfg attributes as glutin
  • Loading branch information
sebcrozet authored Dec 7, 2020
2 parents 5a352f3 + 63d8768 commit 6274d50
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/window/gl_canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ impl AbstractCanvas for GLCanvas {
canvas_setup: Option<CanvasSetup>,
out_events: Sender<WindowEvent>,
) -> Self {
#[cfg(unix)]
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
let events = {
use glutin::platform::unix::EventLoopExtUnix;
EventLoop::new_any_thread()
Expand All @@ -45,7 +51,14 @@ impl AbstractCanvas for GLCanvas {
use glutin::platform::windows::EventLoopExtWindows;
EventLoop::new_any_thread()
};
#[cfg(not(any(unix, windows)))]
#[cfg(not(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
windows
)))]
let events = EventLoop::new();

let window = WindowBuilder::new()
Expand Down

0 comments on commit 6274d50

Please sign in to comment.