aboutsummaryrefslogtreecommitdiff
path: root/primedev/plugins
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2024-06-15 12:39:35 +0200
committerGitHub <noreply@github.com>2024-06-15 12:39:35 +0200
commitd8d861c3db5e33870c41864c3f16ead17732935a (patch)
tree59f91a79feca0e49a92b653e8734224738ea4d37 /primedev/plugins
parenta06319c974342c41294fef601a8a873a3e488bfc (diff)
downloadNorthstarLauncher-d8d861c3db5e33870c41864c3f16ead17732935a.tar.gz
NorthstarLauncher-d8d861c3db5e33870c41864c3f16ead17732935a.zip
Assign `CreateInterface` member instead of creating a new variable (#705)v1.24.7-rc2v1.24.7-rc1
Assign CreateInterface member instead of creating a new variable. This fixes valid Plugins failing to load.
Diffstat (limited to 'primedev/plugins')
-rw-r--r--primedev/plugins/plugins.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/primedev/plugins/plugins.cpp b/primedev/plugins/plugins.cpp
index ae6fd0cb..03dd2c9e 100644
--- a/primedev/plugins/plugins.cpp
+++ b/primedev/plugins/plugins.cpp
@@ -45,15 +45,15 @@ Plugin::Plugin(std::string path) : m_location(path)
m_initData = {.pluginHandle = m_handle};
- CreateInterfaceFn CreatePluginInterface = (CreateInterfaceFn)GetProcAddress(m_handle, "CreateInterface");
+ m_pCreateInterface = (CreateInterfaceFn)GetProcAddress(m_handle, "CreateInterface");
- if (!CreatePluginInterface)
+ if (!m_pCreateInterface)
{
NS::log::PLUGINSYS->error("Plugin at '{}' does not expose CreateInterface()", path);
return;
}
- m_pluginId = (IPluginId*)CreatePluginInterface(PLUGIN_ID_VERSION, 0);
+ m_pluginId = (IPluginId*)m_pCreateInterface(PLUGIN_ID_VERSION, 0);
if (!m_pluginId)
{
@@ -97,7 +97,7 @@ Plugin::Plugin(std::string path) : m_location(path)
return;
}
- m_callbacks = (IPluginCallbacks*)CreatePluginInterface("PluginCallbacks001", 0);
+ m_callbacks = (IPluginCallbacks*)m_pCreateInterface("PluginCallbacks001", 0);
if (!m_callbacks)
{