clean up window

This commit is contained in:
2026-02-20 11:09:35 -08:00
parent db634247ac
commit e4f6f8490d

View File

@@ -1,6 +1,5 @@
use strafesnet_common::instruction::TimedInstruction;
use strafesnet_common::session::Time as SessionTime;
use strafesnet_common::physics::{MiscInstruction,SetControlInstruction};
use crate::file::LoadFormat;
use crate::player::{PlayerWorker,Instruction as PhysicsWorkerInstruction,SessionControlInstruction};
@@ -12,7 +11,6 @@ pub enum Instruction{
//holds thread handles to dispatch to
pub struct WindowContext<'a>{
simulation_paused:bool,
screen_size:glam::UVec2,
window:&'a winit::window::Window,
physics_thread:PlayerWorker<'a>,
}
@@ -101,7 +99,7 @@ impl WindowContext<'_>{
}
}
fn device_event(&mut self,time:SessionTime,event:winit::event::DeviceEvent){
fn device_event(&mut self,_time:SessionTime,_event:winit::event::DeviceEvent){
}
pub fn send(&mut self,ins:TimedInstruction<Instruction,SessionTime>){
@@ -122,12 +120,9 @@ impl WindowContext<'_>{
surface:wgpu::Surface<'a>,
config:wgpu::SurfaceConfiguration,
)->WindowContext<'a>{
let screen_size=glam::uvec2(config.width,config.height);
let graphics=strafesnet_roblox_bot_player::graphics::Graphics::new(device,queue,config);
WindowContext{
simulation_paused:false,
//make sure to update this!!!!!
screen_size,
window,
physics_thread:crate::player::PlayerWorker::new(
surface,