chore: remove fps_bench

Former-commit-id: d1d2f4e32b45fdeb9c71b2ccb3f57d6bf6c05b41
Former-commit-id: 5b4f1052a6eb0b75036335c0d0a0e84c5cdf531e
This commit is contained in:
Muhammad Nauman Raza 2024-03-23 20:16:23 +00:00
parent d88e8ae514
commit b4404aa42f
3 changed files with 0 additions and 46 deletions

View file

@ -4,7 +4,6 @@ members = [
"arm7tdmi", "arm7tdmi",
"utils", "utils",
"app", "app",
"fps_bench"
] ]
resolver = "1" resolver = "1"
default-members = ["platform/rustboyadvance-sdl2"] default-members = ["platform/rustboyadvance-sdl2"]

View file

@ -1,9 +0,0 @@
[package]
name = "fps_bench"
version = "0.1.0"
authors = ["Michel Heily <michelheily@gmail.com>"]
edition = "2018"
[dependencies]
rustboyadvance-core = {path = "../core/"}
rustboyadvance-utils = {path = "../utils/"}

View file

@ -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: {} <bios> <rom>", env::args().nth(0).unwrap());
return;
}
let bios_path = env::args().nth(1).expect("missing <bios>");
let rom_path = env::args().nth(2).expect("missing <rom>");
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);
}
}
}