Skip to content

Commit

Permalink
🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
imagine-hussain committed Jun 27, 2024
1 parent 28fbb9e commit fff384b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use crate::{Cartridge, Clock, Cpu, Ppu, RcCell, Reset, WeakCell};
///
/// ## Memory Layout - CPU
///
///
///
/// | Range | Size | Description |
/// |-----------------|------|-----------------------------------------------|
/// | 0x0000 - 0x07FF | 2KB | Internal Cpu Ram |
Expand Down
3 changes: 2 additions & 1 deletion src/lib/egui/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl Gui {

let elapsed_time = self.startup_time.elapsed().as_secs_f32();
let elapsed_str = fstrings::f!("Elapsed Time: {elapsed_time:.4}s");

if tick_number % Self::FRAMERATE_UPDATE_INTERVAL == 0 {
self.update_framerate();
self.update_delta_time();
Expand Down Expand Up @@ -134,7 +135,7 @@ impl Gui {
fn update_framerate(&mut self) -> u32 {
let delta_time = self.last_frame.elapsed().as_millis();
self.framerate = match delta_time == 0 {
true => 69,
true => 0,
false => ((Self::FRAMERATE_UPDATE_INTERVAL as u128 * 1_000) / delta_time) as u32,
};
self.framerate
Expand Down

0 comments on commit fff384b

Please sign in to comment.