Fixes
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Has been cancelled

This commit is contained in:
Florian RICHER 2025-05-28 13:41:13 +02:00
parent 09bfe6fb48
commit fbb1493b45
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
5 changed files with 68 additions and 76 deletions

View file

@ -19,7 +19,7 @@ use vulkano_util::context::VulkanoContext;
use vulkano_util::renderer::VulkanoWindowRenderer;
use vulkano_util::window::{VulkanoWindows, WindowDescriptor};
use winit::application::ApplicationHandler;
use winit::event::WindowEvent;
use winit::event::{DeviceEvent, WindowEvent};
use winit::event_loop::ActiveEventLoop;
use winit::window::WindowId;
@ -76,6 +76,8 @@ impl ApplicationHandler for App {
width: 800.0,
height: 600.0,
present_mode: PresentMode::Fifo,
cursor_visible: false,
cursor_locked: true,
..Default::default()
},
|_| {},
@ -101,6 +103,15 @@ impl ApplicationHandler for App {
.load_scene(Box::new(MainScene::default()));
}
fn device_event(
&mut self,
_event_loop: &ActiveEventLoop,
_device_id: winit::event::DeviceId,
event: winit::event::DeviceEvent,
) {
self.input_manager.process_device_event(&event);
}
fn window_event(&mut self, event_loop: &ActiveEventLoop, id: WindowId, event: WindowEvent) {
let renderer = Arc::get_mut(&mut self.vulkano_windows)
.unwrap()