Fix running on the native target without the Linux Wayland platform
This commit is contained in:
parent
e57637aab1
commit
f624edb801
|
|
@ -208,14 +208,14 @@ impl ApplicationIo for WasmApplicationIo {
|
||||||
fn create_window(&self) -> SurfaceHandle<Self::Surface> {
|
fn create_window(&self) -> SurfaceHandle<Self::Surface> {
|
||||||
log::trace!("Spawning window");
|
log::trace!("Spawning window");
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(all(not(test), target_os = "linux", feature = "wayland"))]
|
||||||
use winit::platform::wayland::EventLoopBuilderExtWayland;
|
use winit::platform::wayland::EventLoopBuilderExtWayland;
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(all(not(test), target_os = "linux", feature = "wayland"))]
|
||||||
let event_loop = winit::event_loop::EventLoopBuilder::new().with_any_thread(true).build().unwrap();
|
let event_loop = winit::event_loop::EventLoopBuilder::new().with_any_thread(true).build().unwrap();
|
||||||
|
#[cfg(not(all(not(test), target_os = "linux", feature = "wayland")))]
|
||||||
#[cfg(test)]
|
|
||||||
let event_loop = winit::event_loop::EventLoop::new().unwrap();
|
let event_loop = winit::event_loop::EventLoop::new().unwrap();
|
||||||
|
|
||||||
let window = winit::window::WindowBuilder::new()
|
let window = winit::window::WindowBuilder::new()
|
||||||
.with_title("Graphite")
|
.with_title("Graphite")
|
||||||
.with_inner_size(winit::dpi::PhysicalSize::new(800, 600))
|
.with_inner_size(winit::dpi::PhysicalSize::new(800, 600))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue