From 03a4a60db29171d4c328ed3d79ec32637d14212a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 23 Oct 2023 18:46:59 -0700 Subject: [PATCH] red underlines --- src/run.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/run.rs b/src/run.rs index dc3e2c9..6c56ee3 100644 --- a/src/run.rs +++ b/src/run.rs @@ -11,8 +11,8 @@ pub enum RunInstruction{ pub struct RunState{ manual_mouse_lock:bool, - mouse:std::sync::Arc>, - user_settings:settings::UserSettings, + mouse:std::sync::Arc>, + user_settings:crate::settings::UserSettings, //Ideally the graphics thread worker description is: /* WorkerDescription{ @@ -21,14 +21,14 @@ pub struct RunState{ } */ //up to three frames in flight, dropping new frame requests when all three are busy, and dropping output frames when one renders out of order - graphics_thread:worker::INWorker, - physics_thread:worker::QNWorker>, + graphics_thread:crate::worker::INWorker, + physics_thread:crate::worker::QNWorker>, } impl RunState { fn init() -> Self { //wee - let user_settings=settings::read_user_settings(); + let user_settings=crate::settings::read_user_settings(); let mut graphics=GraphicsState::new(); @@ -44,7 +44,7 @@ impl RunState { //3. forget - let mut state=RunState{ + let mut state=Self{ manual_mouse_lock:false, mouse:physics::MouseState::default(), user_settings, @@ -61,7 +61,7 @@ impl RunState { return state; } - fn window_event(&mut self, window: &winit::window::Window, event: winit::event::WindowEvent) { + fn window_event(&mut self, time:crate::integer::Time, event: winit::event::WindowEvent) { match event { winit::event::WindowEvent::DroppedFile(path)=>{ std::thread::spawn(move ||{ @@ -156,7 +156,7 @@ impl RunState { } } - fn device_event(&mut self, window: &winit::window::Window, event: winit::event::DeviceEvent) { + fn device_event(&mut self, time:crate::integer::Time, event: winit::event::DeviceEvent) { match event { winit::event::DeviceEvent::MouseMotion { delta,//these (f64,f64) are integers on my machine @@ -196,10 +196,10 @@ impl RunState { crate::worker::QNWorker::new(move |ins:TimedInstruction|{ match ins.instruction{ RunInstruction::WindowEvent(window_event)=>{ - self.window_event(window_event); + self.window_event(ins.time,window_event); }, RunInstruction::DeviceEvent(device_event)=>{ - self.device_event(device_event); + self.device_event(ins.time,device_event); }, RunInstruction::Resize(size)=>{ graphics_context.config.width=size.width.max(1);