Merge pull request #8124 from unknownbrackets/ui-tweaks

Don't change the working dir on startup
This commit is contained in:
Henrik Rydgård committed 2015-10-31 10:37:00 +01:00
commit f470ed8c5c
1 file changed
+3 -13
+3 -13
View File
@@ -359,25 +359,15 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
EnableCrashingOnCrashes();
wchar_t modulePath[MAX_PATH];
GetModuleFileName(NULL, modulePath, MAX_PATH);
for (size_t i = wcslen(modulePath) - 1; i > 0; i--) {
if (modulePath[i] == '\\') {
modulePath[i] = 0;
break;
}
}
SetCurrentDirectory(modulePath);
// GetCurrentDirectory(MAX_PATH, modulePath); // for checking in the debugger
#ifndef _DEBUG
bool showLog = false;
#else
bool showLog = false;
#endif
VFSRegister("", new DirectoryAssetReader("assets/"));
VFSRegister("", new DirectoryAssetReader(""));
const std::string &exePath = File::GetExeDirectory();
VFSRegister("", new DirectoryAssetReader((exePath + "/assets/").c_str()));
VFSRegister("", new DirectoryAssetReader(exePath.c_str()));
wchar_t lcCountry[256];