Made NzThread interface mimic std::thread one

Hopefully fixed the threaded window bug


Former-commit-id: 6dc3ca2a8bee1da591a9b97d202d4b73b10be8eb
This commit is contained in:
Lynix
2012-11-29 16:51:01 +01:00
parent a2eb55e74a
commit cbc98ce3f0
7 changed files with 155 additions and 140 deletions

View File

@@ -123,12 +123,11 @@ bool NzWindowImpl::Create(NzVideoMode mode, const NzString& title, nzUInt32 styl
#if NAZARA_UTILITY_THREADED_WINDOW
NzMutex mutex;
NzConditionVariable condition;
m_thread = new NzThread(WindowThread, &m_handle, win32StyleEx, wtitle, win32Style, x, y, width, height, this, &mutex, &condition);
m_threadActive = true;
// On attend que la fenêtre soit créée
mutex.Lock();
m_thread->Launch();
m_thread = new NzThread(WindowThread, &m_handle, win32StyleEx, wtitle, win32Style, x, y, width, height, this, &mutex, &condition);
condition.Wait(&mutex);
mutex.Unlock();
#else