1
0
mirror of synced 2024-11-12 02:00:52 +01:00

sys: Allow multiple files to be opened through the command line

This commit is contained in:
WerWolv 2022-09-15 09:48:02 +02:00
parent 120e2bc300
commit 5462575f5c

View File

@ -52,11 +52,9 @@ int main(int argc, char **argv, char **envp) {
if (argc == 1)
; // No arguments provided
else if (argc == 2)
EventManager::post<RequestOpenFile>(argv[1]);
else {
hex::log::fatal("Usage: {} [<file_name>]", argv[0]);
return EXIT_FAILURE;
else if (argc >= 2) {
for (auto i = 1; i < argc; i++)
EventManager::post<RequestOpenFile>(argv[i]);
}
window.loop();