gsdx: Use composition insead of inheritance to support lock

To ease update to C++11
This commit is contained in:
Gregory Hainaut 2015-03-03 18:22:09 +01:00
parent 8deee6afbc
commit 9ad5933120
2 changed files with 5 additions and 4 deletions

View File

@ -386,7 +386,7 @@ GSCapture::~GSCapture()
bool GSCapture::BeginCapture(float fps)
{
GSAutoLock lock(this);
GSAutoLock lock(&m_lock);
ASSERT(fps != 0);
@ -481,7 +481,7 @@ bool GSCapture::BeginCapture(float fps)
bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba)
{
GSAutoLock lock(this);
GSAutoLock lock(&m_lock);
if(bits == NULL || pitch == 0)
{
@ -506,7 +506,7 @@ bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba)
bool GSCapture::EndCapture()
{
GSAutoLock lock(this);
GSAutoLock lock(&m_lock);
#ifdef _WINDOWS

View File

@ -28,8 +28,9 @@
#include "GSCaptureDlg.h"
#endif
class GSCapture : protected GSCritSec
class GSCapture
{
GSCritSec m_lock;
bool m_capturing;
GSVector2i m_size;