From e3286a98729d9444b306d83fa54870f60f061251 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:13:10 -0300 Subject: [PATCH] feat(cli): Add option to skip BIOS --- src/main.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index e723949..5d1930b 100644 --- a/src/main.zig +++ b/src/main.zig @@ -20,8 +20,9 @@ pub const log_level = if (builtin.mode != .Debug) .info else std.log.default_lev // CLI Arguments + Help Text const params = clap.parseParamsComptime( \\-h, --help Display this help and exit. + \\-s, --skip Skip BIOS. \\-b, --bios Optional path to a GBA BIOS ROM. - \\ Path to the GBA GamePak ROM + \\ Path to the GBA GamePak ROM. \\ ); @@ -64,7 +65,9 @@ pub fn main() anyerror!void { try bus.init(allocator, &scheduler, &cpu, paths); defer bus.deinit(); - if (paths.bios == null) cpu.fastBoot(); + if (result.args.skip or paths.bios == null) { + cpu.fastBoot(); + } var gui = Gui.init(&bus.pak.title, &bus.apu, width, height); defer gui.deinit();