aboutsummaryrefslogtreecommitdiff
path: root/loader_launcher_proxy/dllmain.cpp
diff options
context:
space:
mode:
authorp0358 <p0358@users.noreply.github.com>2021-12-31 22:25:40 +0100
committerGitHub <noreply@github.com>2021-12-31 22:25:40 +0100
commitdcba96bcc4b02639e859b0dcdc863391cb54684f (patch)
tree99d129460365774ae011d83b3765e7d9388c44a7 /loader_launcher_proxy/dllmain.cpp
parent4f7c3d02943a38941b79a638c5607b2b7f668956 (diff)
parentd658c0c8374f8491e062fabe031f79185169c414 (diff)
downloadNorthstarLauncher-dcba96bcc4b02639e859b0dcdc863391cb54684f.tar.gz
NorthstarLauncher-dcba96bcc4b02639e859b0dcdc863391cb54684f.zip
Merge pull request #1 from geniiii/p0358-refactor-fixes
Fixes, removal of fallback linear allocator
Diffstat (limited to 'loader_launcher_proxy/dllmain.cpp')
-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();