Skip to content

Commit 19526b1

Browse files
committed
updates
1 parent 2de2f06 commit 19526b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ impl Chip8Emulator {
345345
self.program_counter = addr;
346346
}
347347

348-
fn ret(&mut self) {
348+
const fn ret(&mut self) {
349349
// 00EE - RET
350350
// Return from a subroutine.
351351
// The interpreter sets the program counter to the address at the top of the stack, then subtracts 1 from the stack pointer.

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ impl App {
7272
while !self.exit {
7373
for _ in 0..10 {
7474
self.emulator.tick();
75+
self.calculate_points();
7576
}
7677
self.emulator.tick_timers();
77-
self.calculate_points();
7878
self.handle_events()?;
7979
terminal.draw(|frame| self.draw(frame))?;
8080
}
@@ -88,7 +88,7 @@ impl App {
8888
}
8989

9090
fn handle_events(&mut self) -> io::Result<()> {
91-
if event::poll(Duration::from_millis(10))? {
91+
if event::poll(Duration::from_millis(16))? {
9292
match event::read()? {
9393
Event::Key(key_event) => {
9494
let pressed = if key_event.kind == KeyEventKind::Press {

0 commit comments

Comments
 (0)