WIP
This commit is contained in:
committed by
Jérôme Leclercq
parent
b379518479
commit
292ca60592
@@ -11,8 +11,16 @@ namespace Nz
|
||||
template<typename T>
|
||||
Plugin<T> PluginLoader::Load(bool activate)
|
||||
{
|
||||
#ifdef NAZARA_PLUGINS_STATIC
|
||||
std::unique_ptr<T> pluginInterface = PluginProvider<T>::Instantiate();
|
||||
if (activate && !pluginInterface->Activate())
|
||||
throw std::runtime_error("failed to activate plugin");
|
||||
|
||||
return Plugin<T>({}, std::move(pluginInterface), activate);
|
||||
#else
|
||||
GenericPlugin plugin = Load(Utf8Path(T::Filename), activate);
|
||||
return std::move(plugin).Cast<T>();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user