Add a DX11 video plugin.

Might or might not work for you, yet.
Anyway, read the soon to be created forum thread on this plugin before asking any questions.

Huge thanks to rodolfoosvaldobogado for helping me out in various areas.
Also, thanks to everyone on IRC who supported me during development ;)


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5680 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-06-13 19:50:06 +00:00
parent 20e3919033
commit 3ea2a1387c
45 changed files with 8016 additions and 1 deletions

View File

@ -0,0 +1,82 @@
#include "Thread.h"
namespace W32Util
{
// __________________________________________________________________________________________________
// Constructor
//
Thread::Thread ( DWORD (WINAPI * pFun) (void* arg), void* pArg)
{
_handle = CreateThread (
0, // Security attributes
0, // Stack size
pFun,
pArg,
CREATE_SUSPENDED,
&_tid);
}
// __________________________________________________________________________________________________
// Destructor
//
Thread::~Thread (void)
{
if (_handle != NULL)
{
if (CloseHandle (_handle) == FALSE)
{
Terminate();
}
}
}
// __________________________________________________________________________________________________
// Resume
//
void
Thread::Resume (void)
{
if (_handle != NULL)
ResumeThread (_handle);
}
// __________________________________________________________________________________________________
// WaitForDeath
//
void
Thread::WaitForDeath (void)
{
if (_handle != NULL)
WaitForSingleObject (_handle, 100);
}
// __________________________________________________________________________________________________
// Terminate
//
void
Thread::Terminate (void)
{
if (_handle != NULL)
TerminateThread (_handle, 0);
_handle = NULL;
}
// __________________________________________________________________________________________________
// SetPriority
//
void
Thread::SetPriority (int _nPriority)
{
if (_handle != NULL)
SetThreadPriority(_handle, _nPriority);
}
// __________________________________________________________________________________________________
// Suspend
//
void
Thread::Suspend (void)
{
if (_handle != NULL)
SuspendThread(_handle);
}
}