Changed DynLib internal

Fixes the "Assimp32.dll not found" bug


Former-commit-id: 662adba33c5d9cfbd23c8b0af0670626070baaa9
This commit is contained in:
Lynix
2014-01-12 10:33:03 +01:00
parent 6545b919c5
commit 9389e1ea05
7 changed files with 21 additions and 22 deletions

View File

@@ -61,18 +61,14 @@ bool NzDynLib::IsLoaded() const
return m_impl != nullptr;
}
bool NzDynLib::Load(const NzString& libraryPath, bool appendExtension)
bool NzDynLib::Load(const NzString& libraryPath)
{
NazaraLock(m_mutex)
Unload();
NzString path = libraryPath;
if (appendExtension && !path.EndsWith(NAZARA_DYNLIB_EXTENSION))
path += NAZARA_DYNLIB_EXTENSION;
std::unique_ptr<NzDynLibImpl> impl(new NzDynLibImpl(this));
if (!impl->Load(path, &m_lastError))
if (!impl->Load(libraryPath, &m_lastError))
{
NazaraError("Failed to load library: " + m_lastError);
return false;