From 5d00d5191c5f76d0cd8a6b59890c7efbdbfc0c3e Mon Sep 17 00:00:00 2001 From: AnnsAnn Date: Fri, 14 Jun 2024 13:27:06 +0200 Subject: [PATCH] Fix non-inclusive loop --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 285f8e1..c1977f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,9 @@ use crate::cpu::registers::{Register16Bit, Register8Bit}; const TIME_PER_FRAME: f32 = 1000.0 / 30.0; const DUMP_GAMEBOY_DOCTOR_LOG: bool = true; +#[cfg(target_os = "linux")] +const WINDOWS: bool = false; +#[cfg(target_os = "windows")] const WINDOWS: bool = true; #[macroquad::main("GB Emulator")] @@ -126,7 +129,7 @@ async fn main() { cpu.poll_inputs(); cpu.blarg_print(); - for _ in 0..cpu_cycles_taken { + for _ in 0..=cpu_cycles_taken { ppu.step(&mut cpu, &mut final_image, &PALETTE); // Redraw UI at 30 frames per second