diff --git a/data/win/launch/launch.cpp b/data/win/launch/launch.cpp index 688b53ec..87f04dfd 100644 --- a/data/win/launch/launch.cpp +++ b/data/win/launch/launch.cpp @@ -1,6 +1,7 @@ #include #include #include +#include using namespace std; @@ -217,6 +218,9 @@ wstring GetString(int id){ } int WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPTSTR args, int nCmdShow){ + wstring workingdirectory= ExecutablePath().substr(0, ExecutablePath().find_last_of(L"\\") ); + _wchdir(workingdirectory.c_str()); + wstring path = ExecutablePath(); path.resize(path.length() - 4); path.erase(0, path.find_last_of(L"\\") + 1);