Skip to content

Commit

Permalink
Merge pull request #189 from mondayx/patch-1
Browse files Browse the repository at this point in the history
Update data/win/launch/launch.cpp
  • Loading branch information
Brandon Benvie committed Sep 21, 2012
2 parents b1b21ef + a548820 commit f585f7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/win/launch/launch.cpp
@@ -1,6 +1,7 @@
#include <windows.h>
#include <string>
#include <resource.h>
#include <direct.h>

using namespace std;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f585f7c

Please sign in to comment.