Fix GLFont get exe path

This commit is contained in:
vsonnier 2016-06-12 18:41:59 +02:00
parent 55ca1c465a
commit 8960d49f84

View File

@ -7,9 +7,10 @@
static std::wstring getExePath(void)
{
wxString exePath = wxStandardPaths::Get().GetExecutablePath();
//get the dir path of the executable
wxFileName exePath = wxFileName(wxStandardPaths::Get().GetExecutablePath());
return std::wstring(exePath.ToStdWstring());
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;