aboutsummaryrefslogtreecommitdiff
path: root/NorthstarLauncher/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarLauncher/main.cpp')
-rw-r--r--NorthstarLauncher/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/NorthstarLauncher/main.cpp b/NorthstarLauncher/main.cpp
index dd3b68f5..17128e5b 100644
--- a/NorthstarLauncher/main.cpp
+++ b/NorthstarLauncher/main.cpp
@@ -27,6 +27,8 @@ HMODULE hTier0Module;
wchar_t exePath[4096];
wchar_t buffer[8192];
+bool noLoadPlugins = false;
+
DWORD GetProcessByName(std::wstring processName)
{
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
@@ -290,6 +292,19 @@ bool LoadNorthstar()
}
((bool (*)())Hook_Init)();
+ FARPROC LoadPlugins = nullptr;
+ if (!noLoadPlugins)
+ {
+ LoadPlugins = GetProcAddress(hHookModule, "LoadPlugins");
+ if (!hHookModule || LoadPlugins == nullptr)
+ {
+ std::cout << "Failed to get function pointer to LoadPlugins of Northstar.dll" << std::endl;
+ LibraryLoadError(GetLastError(), L"Northstar.dll", buffer);
+ return false;
+ }
+ ((bool (*)())LoadPlugins)();
+ }
+
return true;
}
@@ -341,6 +356,8 @@ int main(int argc, char* argv[])
dedicated = true;
else if (!strcmp(argv[i], "-nostubs"))
nostubs = true;
+ else if (!strcmp(argv[i], "-noplugins"))
+ noLoadPlugins = true;
if (!noOriginStartup && !dedicated)
{