diff --git a/src/options.cpp b/src/options.cpp index e70335e..a1f45e3 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -3,14 +3,14 @@ #include void print_usage() { - fmt::println("USAGE: bezos [-p PORT] [-h] -d deck.md"); + fmt::println("USAGE: bezos [-W width] [-H height] [-p PORT] [-h] -d deck.md"); } Options parse_options(int argc, char* argv[]) { int opt = 0; Options result; - while((opt = getopt(argc, argv, "hp:d:")) != -1) { + while((opt = getopt(argc, argv, "hp:d:W:H:")) != -1) { switch(opt) { case 'h': print_usage(); @@ -23,6 +23,12 @@ Options parse_options(int argc, char* argv[]) { result.deck_given=true; result.deck_file = optarg; break; + case 'W': + result.pres_size.x = std::stoi(optarg); + break; + case 'H': + result.pres_size.y = std::stoi(optarg); + break; default: print_usage(); return {.error=true};