Permalink
Browse files

Merge pull request #189 from mondayx/patch-1

Update data/win/launch/launch.cpp
  • Loading branch information...
Brandon Benvie
Brandon Benvie committed Sep 21, 2012
2 parents b1b21ef + a548820 commit f585f7ccfa7d2b54d910dd21d280ae4ad40f8f06
Showing with 4 additions and 0 deletions.
  1. +4 −0 data/win/launch/launch.cpp
@@ -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);

0 comments on commit f585f7c

Please sign in to comment.