GUI: Fixed some GUI related start/stop crashes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4223 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-09-07 12:40:43 +00:00
parent 49601e0af2
commit 7e115dcb00
27 changed files with 424 additions and 190 deletions

View File

@ -26,6 +26,15 @@
namespace Common
{
int Thread::CurrentId()
{
#ifdef _WIN32
return GetCurrentThreadId();
#else
return 0;
#endif
}
#ifdef _WIN32
void InitThreading()
@ -81,14 +90,16 @@ Thread::~Thread()
WaitForDeath();
}
void Thread::WaitForDeath(const int _Wait)
DWORD Thread::WaitForDeath(const int iWait)
{
if (m_hThread)
{
WaitForSingleObject(m_hThread, _Wait);
DWORD Wait = WaitForSingleObject(m_hThread, iWait);
CloseHandle(m_hThread);
m_hThread = NULL;
return Wait;
}
return NULL;
}
void Thread::SetAffinity(int mask)