aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeni <me@geni.site>2021-12-31 15:40:00 +0200
committergeni <me@geni.site>2021-12-31 15:40:40 +0200
commite98e1a44aaa04f45b5cee415a882ab2d79942b7f (patch)
tree3ee91def4797f72d9d6969c83c0621b91d2b90d7
parent0a0cc706e7220a6927e10d333796c12442cb84c1 (diff)
downloadNorthstarLauncher-e98e1a44aaa04f45b5cee415a882ab2d79942b7f.tar.gz
NorthstarLauncher-e98e1a44aaa04f45b5cee415a882ab2d79942b7f.zip
Fix launcher proxy
-rw-r--r--loader_launcher_proxy/dllmain.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/loader_launcher_proxy/dllmain.cpp b/loader_launcher_proxy/dllmain.cpp
index 7a778208..9fddc8d4 100644
--- a/loader_launcher_proxy/dllmain.cpp
+++ b/loader_launcher_proxy/dllmain.cpp
@@ -119,6 +119,14 @@ extern "C" __declspec(dllexport) int LauncherMain(HINSTANCE hInstance, HINSTANCE
if (loadNorthstar)
{
+ swprintf_s(dllPath, L"%s\\bin\\x64_retail\\tier0.dll", exePath);
+ hTier0Module = LoadLibraryW(dllPath);
+ if (!hTier0Module)
+ {
+ LibraryLoadError(GetLastError(), L"tier0.dll", dllPath);
+ return 1;
+ }
+
if (!LoadNorthstar())
return 1;
}
@@ -131,16 +139,6 @@ extern "C" __declspec(dllexport) int LauncherMain(HINSTANCE hInstance, HINSTANCE
LibraryLoadError(GetLastError(), L"launcher.org.dll", dllPath);
return 1;
}
-
- // this makes zero sense given tier0.dll is already loaded via imports on launcher.dll, but we do it for full consistency with original launcher exe
- // and to also let load callbacks in Northstar work for tier0.dll
- swprintf_s(dllPath, L"%s\\bin\\x64_retail\\tier0.dll", exePath);
- hTier0Module = LoadLibraryW(dllPath);
- if (!hTier0Module)
- {
- LibraryLoadError(GetLastError(), L"tier0.dll", dllPath);
- return 1;
- }
}
auto LauncherMain = GetLauncherMain();