Change --no-flush into --flush option

This commit is contained in:
timvisee
2023-12-29 18:49:11 +01:00
parent f8a89223c9
commit b945034f71
2 changed files with 7 additions and 7 deletions

View File

@@ -52,9 +52,9 @@ pub struct Arguments {
#[arg(short, long, alias = "bin")] #[arg(short, long, alias = "bin")]
binary: bool, binary: bool,
/// Do not flush socket after each pixel [default: on] /// Flush socket after each pixel [default: true]
#[arg(short, long)] #[arg(short, long, action = clap::ArgAction::Set, value_name = "ENABLED", default_value_t = true)]
no_flush: bool, flush: bool,
} }
/// CLI argument handler. /// CLI argument handler.
@@ -112,8 +112,8 @@ impl ArgHandler {
self.data.binary self.data.binary
} }
/// Whether to prevent flushing after each pixel. /// Whether to flush after each pixel.
pub fn no_flush(&self) -> bool { pub fn flush(&self) -> bool {
self.data.no_flush self.data.flush
} }
} }

View File

@@ -44,7 +44,7 @@ fn start(arg_handler: &ArgHandler) {
size, size,
arg_handler.offset(), arg_handler.offset(),
arg_handler.binary(), arg_handler.binary(),
!arg_handler.no_flush(), arg_handler.flush(),
); );
// Load the image manager // Load the image manager