No debugging unless the game is running

This commit is contained in:
2025-01-17 22:00:46 -05:00
parent f031bb17b2
commit 17d3811124
4 changed files with 54 additions and 14 deletions
+6 -3
View File
@@ -3,7 +3,7 @@
use std::{path::PathBuf, process, time::SystemTime};
use anyhow::Result;
use anyhow::{bail, Result};
use app::Application;
use clap::Parser;
use emulator::EmulatorBuilder;
@@ -95,10 +95,13 @@ fn main() -> Result<()> {
let args = Args::parse();
let (mut builder, client) = EmulatorBuilder::new();
if let Some(path) = args.rom {
builder = builder.with_rom(&path);
if let Some(path) = &args.rom {
builder = builder.with_rom(path);
}
if args.debug_port.is_some() {
if args.rom.is_none() {
bail!("to start debugging, please select a game.");
}
builder = builder.start_paused(true);
}