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

View File

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