Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
1 commit merged into from Sep 21, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/win/launch/launch.cpp
@@ -1,6 +1,7 @@
#include <windows.h> #include <windows.h>
#include <string> #include <string>
#include <resource.h> #include <resource.h>
#include <direct.h>


using namespace std; 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){ 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(); wstring path = ExecutablePath();
path.resize(path.length() - 4); path.resize(path.length() - 4);
path.erase(0, path.find_last_of(L"\\") + 1); path.erase(0, path.find_last_of(L"\\") + 1);
Expand Down