From edf013952ca2d110f190dc8cd16e5529846656e4 Mon Sep 17 00:00:00 2001 From: uniboi <64006268+uniboi@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:14:46 +0100 Subject: Plugin interfaces (plugins v4) (#615) Replaces the current plugin api with source interfaces. - backwards compatible - no more json in binaries (wtf) - does not rely on structs from third party libraries (wtf) - actually initializes variables - no more basically unused classes The launcher exposes almost everything required by plugins in interfaces that allow for backwards compatibility. The only thing that's passed to a plugin directly is the northstar dll HWND and a struct of data that's different for each plugin. --- primedev/dllmain.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'primedev/dllmain.cpp') diff --git a/primedev/dllmain.cpp b/primedev/dllmain.cpp index a656dac7..c87c8bae 100644 --- a/primedev/dllmain.cpp +++ b/primedev/dllmain.cpp @@ -3,10 +3,10 @@ #include "core/memalloc.h" #include "core/vanilla.h" #include "config/profile.h" -#include "plugins/plugin_abi.h" #include "plugins/plugins.h" -#include "plugins/pluginbackend.h" +#include "plugins/pluginmanager.h" #include "util/version.h" +#include "util/wininfo.h" #include "squirrel/squirrel.h" #include "server/serverpresence.h" @@ -23,6 +23,8 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: + g_NorthstarModule = hModule; + break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: @@ -65,7 +67,6 @@ bool InitialiseNorthstar() g_pServerPresence = new ServerPresenceManager(); g_pPluginManager = new PluginManager(); - g_pPluginCommunicationhandler = new PluginCommunicationHandler(); g_pPluginManager->LoadPlugins(); InitialiseSquirrelManagers(); -- cgit v1.2.3