1786004231
This commit is contained in:
@@ -36,8 +36,7 @@ impl Trekstor {
|
|||||||
|
|
||||||
pub fn update(&mut self, update: UpdateFn) {
|
pub fn update(&mut self, update: UpdateFn) {
|
||||||
loop {
|
loop {
|
||||||
self.input.handle_event();
|
self.input.next_loop();
|
||||||
|
|
||||||
self.last_time = self.current_time;
|
self.last_time = self.current_time;
|
||||||
self.current_time = Instant::now();
|
self.current_time = Instant::now();
|
||||||
let mut dt = self.current_time - self.last_time;
|
let mut dt = self.current_time - self.last_time;
|
||||||
@@ -48,7 +47,7 @@ impl Trekstor {
|
|||||||
|
|
||||||
while self.accumulator > self.update_timestep {
|
while self.accumulator > self.update_timestep {
|
||||||
println!("Frame");
|
println!("Frame");
|
||||||
self.input.next_loop();
|
self.input.handle_event();
|
||||||
|
|
||||||
if !update(&mut self.screen, &self.input) {
|
if !update(&mut self.screen, &self.input) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user