Add support for binary pixels PB

This commit is contained in:
timvisee
2023-12-28 18:57:45 +01:00
parent bf9819e7d8
commit a9a2895b62
5 changed files with 91 additions and 38 deletions

View File

@@ -32,8 +32,8 @@ fn start<'a>(arg_handler: &ArgHandler<'a>) {
println!("Starting... (use CTRL+C to stop)");
// Gather facts about the host
let screen_size = gather_host_facts(&arg_handler)
.expect("Failed to gather facts about pixelflut server");
let screen_size =
gather_host_facts(&arg_handler).expect("Failed to gather facts about pixelflut server");
// Determine the size to use
let size = arg_handler.size(Some(screen_size));
@@ -44,6 +44,7 @@ fn start<'a>(arg_handler: &ArgHandler<'a>) {
arg_handler.count(),
size,
arg_handler.offset(),
arg_handler.binary(),
);
// Load the image manager
@@ -56,7 +57,7 @@ fn start<'a>(arg_handler: &ArgHandler<'a>) {
/// Gather important facts about the host.
fn gather_host_facts(arg_handler: &ArgHandler) -> Result<(u32, u32), Error> {
// Set up a client, and get the screen size
let size = Client::connect(arg_handler.host().to_string())?.read_screen_size()?;
let size = Client::connect(arg_handler.host().to_string(), false)?.read_screen_size()?;
// Print status
println!("Gathered screen size: {}x{}", size.0, size.1);