Support Windows
This commit is contained in:
+5
-1
@@ -81,13 +81,14 @@ use vulkano::{
|
||||
future::{FenceSignalFuture, NowFuture},
|
||||
},
|
||||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
use winit::platform::x11::EventLoopBuilderExtX11;
|
||||
use winit::{
|
||||
application::ApplicationHandler,
|
||||
dpi::PhysicalSize,
|
||||
event::{DeviceEvent, ElementState, MouseButton, WindowEvent},
|
||||
event_loop::{ActiveEventLoop, EventLoop},
|
||||
keyboard::{KeyCode, PhysicalKey},
|
||||
platform::x11::EventLoopBuilderExtX11,
|
||||
window::Window,
|
||||
};
|
||||
|
||||
@@ -127,7 +128,10 @@ fn main() -> Result<(), impl Error> {
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let event_loop = EventLoop::builder().with_x11().build().unwrap();
|
||||
#[cfg(target_os = "windows")]
|
||||
let event_loop = EventLoop::builder().build().unwrap();
|
||||
let mut app = App::new(&event_loop);
|
||||
|
||||
event_loop.run_app(&mut app)
|
||||
|
||||
Reference in New Issue
Block a user