From 28eb475fc2ce9605887ae63ee48ba0f01a07c065 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 10 Jan 2016 19:47:09 -0800 Subject: [PATCH] Actually use the list of filenames in AegisubApp::OpenFiles() --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e56e3a437..193efaf85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -317,7 +317,8 @@ bool AegisubApp::OnInit() { // Get parameter subs StartupLog("Parse command line"); - OpenFiles(argv.GetArguments()); + auto const& args = argv.GetArguments(); + OpenFiles(wxArrayStringsAdapter(args.size() - 1, &args[1])); } catch (agi::Exception const& e) { wxMessageBox(to_wx(e.GetMessage()), "Fatal error while initializing"); @@ -478,8 +479,8 @@ void AegisubApp::MacOpenFiles(wxArrayString const& filenames) { void AegisubApp::OpenFiles(wxArrayStringsAdapter filenames) { std::vector files; - for (int i = 1; i < argc; ++i) - files.push_back(from_wx(argv[i])); + for (int i = 0; i < filenames.GetCount(); ++i) + files.push_back(from_wx(filenames[i])); if (!files.empty()) frames[0]->context->project->LoadList(files); }