Skip to content

Commit

Permalink
Prevent launching when config or preview flags are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonyte committed Feb 17, 2025
1 parent 043eb2c commit 9e2c8da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ use nannou::image;
use nannou::image::{DynamicImage, GenericImageView};
use nannou::prelude::*;
use nannou::rand::{thread_rng, Rng};
use std::env;
use std::process::exit;

struct Model {
image: DynamicImage,
Expand All @@ -11,6 +13,11 @@ struct Model {
}

fn main() {
let flag = env::args().nth(1).unwrap_or_default();
if flag.starts_with("/c") || flag.starts_with("/p") {
println!("Configuration menu and in-window preview are not implemented");
exit(0);
}
nannou::app(model).update(update).run();
}

Expand Down

0 comments on commit 9e2c8da

Please sign in to comment.