From b4404aa42f6e91dc1ffec30841b7c7869df20d91 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 23 Mar 2024 20:16:23 +0000 Subject: [PATCH] chore: remove fps_bench Former-commit-id: d1d2f4e32b45fdeb9c71b2ccb3f57d6bf6c05b41 Former-commit-id: 5b4f1052a6eb0b75036335c0d0a0e84c5cdf531e --- Cargo.toml | 1 - fps_bench/Cargo.toml | 9 --------- fps_bench/src/main.rs | 36 ------------------------------------ 3 files changed, 46 deletions(-) delete mode 100644 fps_bench/Cargo.toml delete mode 100644 fps_bench/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 2757cd4..78cf39c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,6 @@ members = [ "arm7tdmi", "utils", "app", - "fps_bench" ] resolver = "1" default-members = ["platform/rustboyadvance-sdl2"] diff --git a/fps_bench/Cargo.toml b/fps_bench/Cargo.toml deleted file mode 100644 index 85aaaf1..0000000 --- a/fps_bench/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "fps_bench" -version = "0.1.0" -authors = ["Michel Heily "] -edition = "2018" - -[dependencies] -rustboyadvance-core = {path = "../core/"} -rustboyadvance-utils = {path = "../utils/"} diff --git a/fps_bench/src/main.rs b/fps_bench/src/main.rs deleted file mode 100644 index 0b1bcc4..0000000 --- a/fps_bench/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::env; -use std::path::Path; - -use rustboyadvance_core::prelude::*; -use rustboyadvance_utils::FpsCounter; - -fn main() { - if env::args().count() < 3 { - eprintln!("usage: {} ", env::args().nth(0).unwrap()); - return; - } - - let bios_path = env::args().nth(1).expect("missing "); - let rom_path = env::args().nth(2).expect("missing "); - - let bios = read_bin_file(Path::new(&bios_path)).expect("failed to read bios file"); - let rom = read_bin_file(Path::new(&rom_path)).expect("failed to read rom file"); - - let gamepak = GamepakBuilder::new() - .take_buffer(rom.into_boxed_slice()) - .with_sram() - .without_backup_to_file() - .build() - .unwrap(); - - let mut gba = GameBoyAdvance::new(bios.into_boxed_slice(), gamepak, NullAudio::new()); - gba.skip_bios(); - - let mut fps_counter = FpsCounter::default(); - loop { - gba.frame(); - if let Some(fps) = fps_counter.tick() { - println!("FPS: {}", fps); - } - } -}