From 8869bd97ec059ecebc89529b10b736f8fab9c001 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 16 Oct 2019 21:43:00 -0300 Subject: Windows direct file open bugfix --- Project/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Project') diff --git a/Project/main.cpp b/Project/main.cpp index 0020a50..e064ab5 100644 --- a/Project/main.cpp +++ b/Project/main.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #ifndef WX_PRECOMP #include @@ -131,13 +131,14 @@ class MainApp : public wxApp // Load command line attributes. This is used to directly open saved files (.psp). wxCmdLineParser cmdLineParser(wxApp::argc, wxApp::argv); //cmdLineParser.SetDesc(cmdLineDesc); + cmdLineParser.AddParam("", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); cmdLineParser.AddSwitch("t", "test", "Run PSP-UFU tests"); if(cmdLineParser.Parse() == 0) { wxCmdLineArgs args = cmdLineParser.GetArguments(); for(auto it = args.begin(), itEnd = args.end(); it != itEnd; ++it) { if(it->GetKind() == wxCMD_LINE_PARAM) { openFilePath = it->GetStrVal();} else if(it->GetShortName() == "t") { - wxLogMessage("Test OK!"); + wxMessageOutput::Get()->Printf("Test OK!"); exit(0); } } -- cgit