From e98e1a44aaa04f45b5cee415a882ab2d79942b7f Mon Sep 17 00:00:00 2001 From: geni Date: Fri, 31 Dec 2021 15:40:00 +0200 Subject: Fix launcher proxy --- loader_launcher_proxy/dllmain.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'loader_launcher_proxy') 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(); -- cgit v1.2.3