diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 21:43:00 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 21:43:00 -0300 |
commit | 8869bd97ec059ecebc89529b10b736f8fab9c001 (patch) | |
tree | 591c60f22424fed151d2321177a6b5950d4f81e8 | |
parent | 2375a56901bd0af66abd7a1b709a5ca25b33c5ca (diff) | |
download | PSP.git-8869bd97ec059ecebc89529b10b736f8fab9c001.tar.gz PSP.git-8869bd97ec059ecebc89529b10b736f8fab9c001.tar.xz PSP.git-8869bd97ec059ecebc89529b10b736f8fab9c001.zip |
Windows direct file open bugfix
-rw-r--r-- | Project/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 <wx/textfile.h> #include <wx/cmdline.h> -#include <wx/log.h> +#include <wx/msgout.h> #ifndef WX_PRECOMP #include <wx/wx.h> @@ -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); } } |