usb writeback disable option

This commit is contained in:
Mateusz Faderewski 2023-06-30 00:58:47 +02:00
parent 885015ba75
commit 43b5c75953

View File

@ -157,6 +157,10 @@ struct DebugArgs {
/// Use EUC-JP encoding for text printing /// Use EUC-JP encoding for text printing
#[arg(long)] #[arg(long)]
euc_jp: bool, euc_jp: bool,
/// Do not enable save writeback via USB
#[arg(long)]
no_writeback: bool
} }
#[derive(Args)] #[derive(Args)]
@ -612,7 +616,9 @@ fn handle_debug_command(connection: Connection, args: &DebugArgs) -> Result<(),
.bright_blue() .bright_blue()
); );
} }
if !args.no_writeback {
sc64.set_save_writeback(true)?; sc64.set_save_writeback(true)?;
}
println!("{}: Started", "[Debug]".bold()); println!("{}: Started", "[Debug]".bold());
@ -639,7 +645,9 @@ fn handle_debug_command(connection: Connection, args: &DebugArgs) -> Result<(),
} }
} }
if !args.no_writeback {
sc64.set_save_writeback(false)?; sc64.set_save_writeback(false)?;
}
if args.isv.is_some() { if args.isv.is_some() {
sc64.configure_is_viewer_64(None)?; sc64.configure_is_viewer_64(None)?;
println!("{}: Stopped listening", "[IS-Viewer 64]".bold()); println!("{}: Stopped listening", "[IS-Viewer 64]".bold());