From 5462575f5c4ba5142512f85c482b88c1710ea8fe Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 15 Sep 2022 09:48:02 +0200 Subject: [PATCH] sys: Allow multiple files to be opened through the command line --- main/source/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main/source/main.cpp b/main/source/main.cpp index b4e93c48d..8b0a17081 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -52,11 +52,9 @@ int main(int argc, char **argv, char **envp) { if (argc == 1) ; // No arguments provided - else if (argc == 2) - EventManager::post(argv[1]); - else { - hex::log::fatal("Usage: {} []", argv[0]); - return EXIT_FAILURE; + else if (argc >= 2) { + for (auto i = 1; i < argc; i++) + EventManager::post(argv[i]); } window.loop();