Fix compilation
This commit is contained in:
parent
90d86c6eb0
commit
175a98c4fc
|
|
@ -8,8 +8,9 @@
|
||||||
#define NAZARA_THREADIMPL_HPP
|
#define NAZARA_THREADIMPL_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
|
#include <Nazara/Core/String.hpp>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && !defined(_GNU_SOURCE)
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,12 @@ namespace Nz
|
||||||
|
|
||||||
ThreadImpl::ThreadImpl(Functor* functor)
|
ThreadImpl::ThreadImpl(Functor* functor)
|
||||||
{
|
{
|
||||||
m_handle = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, 0, &ThreadImpl::ThreadProc, functor, 0, &m_threadId));
|
unsigned int threadId;
|
||||||
|
m_handle = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, 0, &ThreadImpl::ThreadProc, functor, 0, &threadId));
|
||||||
if (!m_handle)
|
if (!m_handle)
|
||||||
NazaraInternalError("Failed to create thread: " + Error::GetLastSystemError());
|
NazaraInternalError("Failed to create thread: " + Error::GetLastSystemError());
|
||||||
|
|
||||||
|
m_threadId = threadId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadImpl::Detach()
|
void ThreadImpl::Detach()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue