Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeReV committed Nov 13, 2020
1 parent 2fef08c commit c8c4368
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,10 @@ fn run() -> Result<(), failure::Error> {

let ui = imgui.frame();

{
let temp_frames = &mut frames;

if temp_frames.len() == 100 {
temp_frames.pop_front();
}
temp_frames.push_back(ui.io().framerate);
if frames.len() == 100 {
frames.pop_front();
}
frames.push_back(ui.io().framerate);

let w = imgui::Window::new(imgui::im_str!("FPS"))
.opened(&mut opened)
Expand Down

0 comments on commit c8c4368

Please sign in to comment.