Skip to content

Commit f624edb

Browse files
committed
Fix running on the native target without the Linux Wayland platform
1 parent e57637a commit f624edb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

node-graph/graph-craft/src/wasm_application_io.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ impl ApplicationIo for WasmApplicationIo {
208208
fn create_window(&self) -> SurfaceHandle<Self::Surface> {
209209
log::trace!("Spawning window");
210210

211-
#[cfg(not(test))]
211+
#[cfg(all(not(test), target_os = "linux", feature = "wayland"))]
212212
use winit::platform::wayland::EventLoopBuilderExtWayland;
213213

214-
#[cfg(not(test))]
214+
#[cfg(all(not(test), target_os = "linux", feature = "wayland"))]
215215
let event_loop = winit::event_loop::EventLoopBuilder::new().with_any_thread(true).build().unwrap();
216-
217-
#[cfg(test)]
216+
#[cfg(not(all(not(test), target_os = "linux", feature = "wayland")))]
218217
let event_loop = winit::event_loop::EventLoop::new().unwrap();
218+
219219
let window = winit::window::WindowBuilder::new()
220220
.with_title("Graphite")
221221
.with_inner_size(winit::dpi::PhysicalSize::new(800, 600))

0 commit comments

Comments
 (0)