mirror of
https://github.com/R2Northstar/NorthstarLauncher
synced 2026-08-23 20:26:04 -04:00
Assign CreateInterface member instead of creating a new variable (#705)
Assign CreateInterface member instead of creating a new variable. This fixes valid Plugins failing to load.
This commit is contained in:
parent
a06319c974
commit
d8d861c3db
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue