From 43b5c759539b7655d136c4766176c140c24e774b Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 30 Jun 2023 00:58:47 +0200 Subject: [PATCH] usb writeback disable option --- sw/deployer/src/main.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sw/deployer/src/main.rs b/sw/deployer/src/main.rs index 138b7ef..07af7a6 100644 --- a/sw/deployer/src/main.rs +++ b/sw/deployer/src/main.rs @@ -157,6 +157,10 @@ struct DebugArgs { /// Use EUC-JP encoding for text printing #[arg(long)] euc_jp: bool, + + /// Do not enable save writeback via USB + #[arg(long)] + no_writeback: bool } #[derive(Args)] @@ -612,7 +616,9 @@ fn handle_debug_command(connection: Connection, args: &DebugArgs) -> Result<(), .bright_blue() ); } - sc64.set_save_writeback(true)?; + if !args.no_writeback { + sc64.set_save_writeback(true)?; + } println!("{}: Started", "[Debug]".bold()); @@ -639,7 +645,9 @@ fn handle_debug_command(connection: Connection, args: &DebugArgs) -> Result<(), } } - sc64.set_save_writeback(false)?; + if !args.no_writeback { + sc64.set_save_writeback(false)?; + } if args.isv.is_some() { sc64.configure_is_viewer_64(None)?; println!("{}: Stopped listening", "[IS-Viewer 64]".bold());