From 2116621672d90b39e2c2d69ede2d3da4e2bb51c3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 24 Oct 2023 21:05:02 -0700 Subject: [PATCH] no print in event loop!!!!!! --- src/graphics_worker.rs | 1 + src/setup.rs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics_worker.rs b/src/graphics_worker.rs index d4bdae2..f26f86b 100644 --- a/src/graphics_worker.rs +++ b/src/graphics_worker.rs @@ -24,6 +24,7 @@ pub fn new<'a>( crate::compat_worker::INWorker::new(move |ins:Instruction|{ match ins{ Instruction::Resize(size,user_settings)=>{ + println!("Resizing to {:?}",size); config.width=size.width.max(1); config.height=size.height.max(1); surface.configure(&device,&config); diff --git a/src/setup.rs b/src/setup.rs index 0905289..ddf5614 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -234,7 +234,7 @@ impl SetupContextSetup{ //the thread that spawns the physics thread let mut run_thread=run.into_worker(setup_context); - println!("Entering render loop..."); + println!("Entering event loop..."); let root_time=std::time::Instant::now(); event_loop.run(move |event,elwt|{ let time=crate::integer::Time::from_nanos(root_time.elapsed().as_nanos() as i64); @@ -257,7 +257,6 @@ impl SetupContextSetup{ winit::event::WindowEvent::Resized(size),//ignoring scale factor changed for now because mutex bruh window_id:_, } => { - println!("Resizing to {:?}",size); run_thread.send(TimedInstruction{time,instruction:RunInstruction::Resize(size)}).unwrap(); } winit::event::Event::WindowEvent{event,..}=>match event{