From 549e50dfa727e95c0973ff7b78c84f95b6045a9d Mon Sep 17 00:00:00 2001 From: icex2 Date: Wed, 19 Feb 2025 19:48:30 +0100 Subject: [PATCH] fix: Missing closing bracket Fix mistake that happened during conflict resolution before the merge. --- src/main/d3d9-monitor-check/main.c | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/main/d3d9-monitor-check/main.c diff --git a/src/main/d3d9-monitor-check/main.c b/src/main/d3d9-monitor-check/main.c new file mode 100644 index 0000000..4866986 --- /dev/null +++ b/src/main/d3d9-monitor-check/main.c @@ -0,0 +1,41 @@ +#include + +#include "d3d9-monitor-check/cmdline.h" +#include "d3d9-monitor-check/interactive.h" +#include "d3d9-monitor-check/print-console.h" + +static void _print_synopsis() +{ + printfln_err("D3D9 monitor check tool"); + printfln_err(""); + printfln_err("A versatile tool for running various (music game relevant) monitor tests using the D3D9 rendering API"); + printfln_err(""); + printfln_err("Available commands:"); + printfln_err(" cmdline: Run the tool in command line mode"); + printfln_err(" interactive: Run the tool in interactive mode"); +} + +int main(int argc, char **argv) +{ + const char *command; + bool success; + + if (argc < 2) { + _print_synopsis(); + printfln_err("ERROR: Insufficient arguments"); + return 1; + } + + command = argv[1]; + + if (!strcmp(command, "cmdline")) { + success = cmdline_main(argc - 2, argv + 2); + } else if (!strcmp(command, "interactive")) { + success = interactive_main(argc - 2, argv + 2); + } else { + _print_synopsis(); + success = false; + } + + return success ? 0 : 1; +} \ No newline at end of file -- 2.54.0