No debugging unless the game is running
This commit is contained in:
+6
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user