aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NorthstarLauncher/main.cpp2
-rw-r--r--loader_launcher_proxy/dllmain.cpp2
-rw-r--r--loader_wsock32_proxy/dllmain.cpp2
3 files changed, 6 insertions, 0 deletions
diff --git a/NorthstarLauncher/main.cpp b/NorthstarLauncher/main.cpp
index 078cbc4a..92c7de7a 100644
--- a/NorthstarLauncher/main.cpp
+++ b/NorthstarLauncher/main.cpp
@@ -334,6 +334,8 @@ int main(int argc, char* argv[])
return 1;
}
+ SetCurrentDirectoryW(exePath);
+
bool noOriginStartup = false;
bool dedicated = false;
bool nostubs = false;
diff --git a/loader_launcher_proxy/dllmain.cpp b/loader_launcher_proxy/dllmain.cpp
index a382bc97..06abb7b2 100644
--- a/loader_launcher_proxy/dllmain.cpp
+++ b/loader_launcher_proxy/dllmain.cpp
@@ -128,6 +128,8 @@ extern "C" __declspec(dllexport) int LauncherMain(HINSTANCE hInstance, HINSTANCE
return 1;
}
+ SetCurrentDirectoryW(exePath);
+
bool loadNorthstar = ShouldLoadNorthstar();
if (loadNorthstar)
diff --git a/loader_wsock32_proxy/dllmain.cpp b/loader_wsock32_proxy/dllmain.cpp
index 7feb278d..c5610042 100644
--- a/loader_wsock32_proxy/dllmain.cpp
+++ b/loader_wsock32_proxy/dllmain.cpp
@@ -39,6 +39,8 @@ BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID)
return true;
}
+ SetCurrentDirectoryW(exePath);
+
if (!ProvisionNorthstar()) // does not call InitialiseNorthstar yet, will do it on LauncherMain hook
return true;