Merge remote-tracking branch 'origin/3D-Engine'

Former-commit-id: 1781615fc780accbe6c11d55fd896038d97ffec9
This commit is contained in:
Lynix
2012-11-29 10:11:30 +01:00
27 changed files with 831 additions and 333 deletions

View File

@@ -20,7 +20,7 @@ void NzError(nzErrorType type, const NzString& error, unsigned int line, const c
#if NAZARA_CORE_EXIT_ON_ASSERT_FAILURE
if (type == nzErrorType_AssertFailed)
exit(EXIT_FAILURE);
std::exit(EXIT_FAILURE);
#endif
}
@@ -56,7 +56,7 @@ NzString NzGetLastSystemError(unsigned int code)
return error;
#elif defined(NAZARA_PLATFORM_POSIX)
return strerror(code);
return std::strerror(code);
#else
#error GetLastSystemError is not implemented on this platform

View File

@@ -6,6 +6,8 @@
#include <Nazara/Core/Config.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/ResourceListener.hpp>
#include <Nazara/Utility/VertexDeclaration.hpp>
#include <typeinfo>
#include <Nazara/Core/Debug.hpp>
NzResource::NzResource(bool persistent) :
@@ -111,13 +113,13 @@ void NzResource::RemoveResourceReference() const
}
}
void NzResource::SetPersistent(bool persistent)
void NzResource::SetPersistent(bool persistent, bool checkReferenceCount)
{
NazaraMutexLock(m_mutex);
m_resourcePersistent = persistent;
if (!persistent && m_resourceReferenceCount == 0)
if (checkReferenceCount && !persistent && m_resourceReferenceCount == 0)
{
NazaraMutexUnlock(m_mutex);
delete this;