1786007088

This commit is contained in:
2026-08-06 11:04:48 +02:00
parent 2bb6bbe15c
commit 65ff70c4e6

View File

@@ -40,7 +40,6 @@ impl<S> Trekstor<S> {
pub fn update(&mut self, update: UpdateFn<S>) {
loop {
self.ctx.input.handle_event();
self.current_time = Instant::now();
let dt = self.current_time - self.last_time;
self.last_time = self.current_time;
@@ -49,6 +48,7 @@ impl<S> Trekstor<S> {
sleep(self.update_timestep - dt);
}
self.ctx.input.handle_event();
if !update(&mut self.ctx, &mut self.state) {
return;
}