From ae833b04ffd726a0c80d6d2282123b57d48c8b19 Mon Sep 17 00:00:00 2001 From: klemek Date: Sat, 8 Nov 2025 12:30:04 +0100 Subject: [PATCH] refactor: update args --- README.md | 8 ++++---- src/args.c | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d5b4dc7..2342e83 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ When running, the following keybindings are available: ### CLI arguments ```txt -usage: forge [-h] [-v] [-hr] [-s=SCREEN] [-m=SCREEN] [-mo] [-p=PROJECT_PATH] [-c=CFG_FILE] [-sf=STATE_PATH] [-ls / -nls] [-ss / -nss] [-is=SIZE] [-v=FILE] [-vs=SIZE] [-t=TEMPO] [--demo] [-w] +usage: forge [-h] [-v] [-hr] [-s=SCREEN] [-m=SCREEN] [-mo] [-p=PROJECT_PATH] [-c=CFG_FILE] [-sf=STATE_PATH] [-ls / -nls] [-ss / -nss] [-is=SIZE] [-v=FILE] [-vs=SIZE] [-t=TEMPO] [-d] [-w] [-tm] [-tf] Fusion Of Real-time Generative Effects. @@ -123,10 +123,10 @@ options: -v, --video-in path to video capture device (multiple allowed) -vs, --video-size video capture desired height (default: internal texture height) -t, --tempo base tempo (default: 60) - --demo demonstration mode (assume --no-save-state and --no-load-state) + -d, --demo demonstration mode (assume --no-save-state and --no-load-state) -w, --windowed not fullscreen - --trace-midi print midi code and values - --trace-fps print fps status of subsystems + -tm, --trace-midi print midi code and values + -tf, --trace-fps print fps status of subsystems ``` ## Default Project diff --git a/src/args.c b/src/args.c index 50c1828..f455b54 100644 --- a/src/args.c +++ b/src/args.c @@ -29,8 +29,10 @@ static void print_help(int status_code) { "[-v=FILE] " "[-vs=SIZE] " "[-t=TEMPO] " - "[--demo] " + "[-d] " "[-w] " + "[-tm] " + "[-tf] " "\n\n" "Fusion Of Real-time Generative Effects.\n\n" "options:\n" @@ -56,11 +58,11 @@ static void print_help(int status_code) { " -vs, --video-size video capture desired height (default: " "internal texture height)\n" " -t, --tempo base tempo (default: 60)\n" - " --demo demonstration mode (assume --no-save-state " + " -d, --demo demonstration mode (assume --no-save-state " "and --no-load-state)\n" " -w, --windowed not fullscreen\n" - " --trace-midi print midi code and values\n" - " --trace-fps print fps status of subsystems\n"); + " -tm, --trace-midi print midi code and values\n" + " -tf, --trace-fps print fps status of subsystems\n"); exit(status_code); } @@ -169,15 +171,15 @@ Parameters args_parse(int argc, char **argv) { } else if (is_arg(arg, "-mo") || is_arg(arg, "--monitor-only")) { params.output = false; params.monitor = true; - } else if (is_arg(arg, "--demo")) { + } else if (is_arg(arg, "-d") || is_arg(arg, "--demo")) { params.demo = true; params.load_state = false; params.save_state = false; } else if (is_arg(arg, "-w") || is_arg(arg, "--windowed")) { params.windowed = true; - } else if (is_arg(arg, "--trace-midi")) { + } else if (is_arg(arg, "-tm") || is_arg(arg, "--trace-midi")) { params.trace_midi = true; - } else if (is_arg(arg, "--trace-fps")) { + } else if (is_arg(arg, "-tf") || is_arg(arg, "--trace-fps")) { params.trace_fps = true; } else { invalid_arg(arg);