get $CGB_BOOTROM/$DMG_BOOTROM from env
This commit is contained in:
parent
6d0870d90d
commit
74dc5ccfb4
1 changed files with 11 additions and 2 deletions
|
@ -23,7 +23,7 @@ mod camera;
|
|||
mod debug;
|
||||
mod window;
|
||||
|
||||
/// Gameboy (DMG-A/B/C) emulator
|
||||
/// Gameboy (DMG/CGB) emulator
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
#[command(group(ArgGroup::new("saves").args(["save","no_save"])))]
|
||||
|
@ -128,7 +128,16 @@ impl EmulatorHandler {
|
|||
} else {
|
||||
SerialTarget::None
|
||||
})
|
||||
.with_bootrom(args.bootrom.map(RomFile::Path), args.show_bootrom)
|
||||
.with_bootrom(
|
||||
args.bootrom
|
||||
.or(if args.dmg {
|
||||
std::env::var("DMG_BOOTROM").ok()
|
||||
} else {
|
||||
std::env::var("CGB_BOOTROM").ok()
|
||||
})
|
||||
.map(RomFile::Path),
|
||||
args.show_bootrom,
|
||||
)
|
||||
.with_no_save(args.no_save)
|
||||
.with_tile_window(tile_window)
|
||||
.with_cgb_mode(!args.dmg);
|
||||
|
|
Loading…
Add table
Reference in a new issue