This commit is contained in:
Quaternions 2025-01-11 01:50:06 -08:00
parent 9095215cad
commit b58ebb2775

View File

@ -64,6 +64,7 @@ impl BufferState{
} }
}, },
BufferState::Buffered(time,mouse_state)=>{ BufferState::Buffered(time,mouse_state)=>{
// TODO: deduplicate code with above case
let timeout=*time+MOUSE_TIMEOUT; let timeout=*time+MOUSE_TIMEOUT;
if timeout<ins.time{ if timeout<ins.time{
// duplicate the current mouse // duplicate the current mouse
@ -189,6 +190,7 @@ impl MouseInterpolator{
}, },
} }
} }
// include timestamp and implement InstructionConsumer?
pub fn pop_buffered_instruction(&mut self,ins:StepInstruction)->Option<TimedInstruction<PhysicsInputInstruction,PhysicsTimeInner>>{ pub fn pop_buffered_instruction(&mut self,ins:StepInstruction)->Option<TimedInstruction<PhysicsInputInstruction,PhysicsTimeInner>>{
match ins{ match ins{
// could check if self.is_first_ready() // could check if self.is_first_ready()