sys: Allow multiple files to be opened through the command line
This commit is contained in:
parent
120e2bc300
commit
5462575f5c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user