Modified DynLib/PluginManager interface

Former-commit-id: 2dae56cad852a46c9bac828cc7775a4da42c96cf
This commit is contained in:
Lynix
2014-01-05 15:30:27 +01:00
parent 3625713914
commit 3dd8b8fce1
6 changed files with 30 additions and 34 deletions

View File

@@ -58,10 +58,10 @@ bool NzPluginManager::Mount(nzPlugin plugin)
return Mount(s_pluginFiles[plugin]);
}
bool NzPluginManager::Mount(const NzString& pluginPath)
bool NzPluginManager::Mount(const NzString& pluginPath, bool appendExtension)
{
NzString path = pluginPath;
if (!path.EndsWith(NAZARA_DYNLIB_EXTENSION))
if (appendExtension && !path.EndsWith(NAZARA_DYNLIB_EXTENSION))
path += NAZARA_DYNLIB_EXTENSION;
bool exists = false;
@@ -93,8 +93,8 @@ bool NzPluginManager::Mount(const NzString& pluginPath)
return false;
}
std::unique_ptr<NzDynLib> library(new NzDynLib(path));
if (!library->Load())
std::unique_ptr<NzDynLib> library(new NzDynLib);
if (!library->Load(path, false))
{
NazaraError("Failed to load plugin");
return false;