From 8960d49f84cae0745fa5344749fc263406f6363e Mon Sep 17 00:00:00 2001 From: vsonnier Date: Sun, 12 Jun 2016 18:41:59 +0200 Subject: [PATCH] Fix GLFont get exe path --- src/util/GLFont.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/GLFont.cpp b/src/util/GLFont.cpp index 7292437..1e76895 100644 --- a/src/util/GLFont.cpp +++ b/src/util/GLFont.cpp @@ -7,9 +7,10 @@ static std::wstring getExePath(void) { - wxString exePath = wxStandardPaths::Get().GetExecutablePath(); - - return std::wstring(exePath.ToStdWstring()); + //get the dir path of the executable + wxFileName exePath = wxFileName(wxStandardPaths::Get().GetExecutablePath()); + + return std::wstring(exePath.GetPath().ToStdWstring()); } #ifndef RES_FOLDER @@ -168,7 +169,7 @@ std::wstring GLFont::getParamValue(std::wstring param_str) { void GLFont::loadFont(const std::wstring& fontFile) { - std::string resourceFolder = RES_FOLDER; + wxString resourceFolder = RES_FOLDER; #ifdef WIN32 resourceFolder = getExePath() + L"/" + resourceFolder;