From 63d8768c309fa0c49421c26ff3e1f3db2f1bbb2f Mon Sep 17 00:00:00 2001 From: Thomas Aubry Date: Fri, 4 Dec 2020 17:40:45 +0100 Subject: [PATCH] :bug: #257 using same cfg attributes as glutin glutin is not using cfg(unix) so it's true for kiss3D but not for glutin and can lead to some issue. It's only in the gl_canvas.rs --- src/window/gl_canvas.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/window/gl_canvas.rs b/src/window/gl_canvas.rs index 31d51f227..8e0651308 100644 --- a/src/window/gl_canvas.rs +++ b/src/window/gl_canvas.rs @@ -35,7 +35,13 @@ impl AbstractCanvas for GLCanvas { canvas_setup: Option, out_events: Sender, ) -> 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() @@ -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()