Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update data/win/launch/launch.cpp #189

Merged
1 commit merged into from Sep 21, 2012
Jump to file or symbol
Failed to load files and symbols.
+4 −0
Split
@@ -1,6 +1,7 @@
#include <windows.h>
#include <string>
#include <resource.h>
+#include <direct.h>
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);