gsdx: always enable CXX11 mutex feature.

ifdef was only useful for VS2010
This commit is contained in:
Gregory Hainaut 2015-09-08 14:34:17 +02:00
parent ca9b5ce11d
commit 3706cfe908
6 changed files with 0 additions and 36 deletions

View File

@ -904,11 +904,7 @@ EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
// TODO: this gets called from a different thread concurrently with GSOpen (on linux)
if (gsopen_done && s_gs != NULL && s_gs->m_GStitleInfoBuffer[0])
{
#ifdef _CX11_
std::lock_guard<std::mutex> lock(s_gs->m_pGSsetTitle_Crit);
#else
GSAutoLock lock(&s_gs->m_pGSsetTitle_Crit);
#endif
s.append(" | ").append(s_gs->m_GStitleInfoBuffer);

View File

@ -393,11 +393,7 @@ GSCapture::~GSCapture()
bool GSCapture::BeginCapture(float fps)
{
#ifdef _CX11_
std::lock_guard<std::recursive_mutex> lock(m_lock);
#else
GSAutoLock lock(&m_lock);
#endif
ASSERT(fps != 0);
@ -508,11 +504,7 @@ bool GSCapture::BeginCapture(float fps)
bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba)
{
#ifdef _CX11_
std::lock_guard<std::recursive_mutex> lock(m_lock);
#else
GSAutoLock lock(&m_lock);
#endif
if(bits == NULL || pitch == 0)
{
@ -545,11 +537,7 @@ bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba)
bool GSCapture::EndCapture()
{
#ifdef _CX11_
std::lock_guard<std::recursive_mutex> lock(m_lock);
#else
GSAutoLock lock(&m_lock);
#endif
#ifdef _WINDOWS

View File

@ -22,9 +22,6 @@
#pragma once
#include "GSVector.h"
#ifndef _CX11_
#include "GSThread.h"
#endif
#include "GSPng.h"
#ifdef _WINDOWS
@ -33,11 +30,7 @@
class GSCapture
{
#ifdef _CX11_
std::recursive_mutex m_lock;
#else
GSCritSec m_lock;
#endif
bool m_capturing;
GSVector2i m_size;
uint64 m_frame;

View File

@ -409,11 +409,7 @@ void GSRenderer::VSync(int field)
// be noticeable). Besides, these locks are extremely short -- overhead of conditional
// is way more expensive than just waiting for the CriticalSection in 1 of 10,000,000 tries. --air
#ifdef _CX11_
std::lock_guard<std::mutex> lock(m_pGSsetTitle_Crit);
#else
GSAutoLock lock(&m_pGSsetTitle_Crit);
#endif
strncpy(m_GStitleInfoBuffer, s.c_str(), countof(m_GStitleInfoBuffer) - 1);

View File

@ -78,11 +78,7 @@ public:
virtual void EndCapture();
public:
#ifdef _CX11_
std::mutex m_pGSsetTitle_Crit;
#else
GSCritSec m_pGSsetTitle_Crit;
#endif
char m_GStitleInfoBuffer[128];
};

View File

@ -62,7 +62,6 @@
// Require at least Visual Studio 2012
#if defined(__linux__) || (defined(_MSC_VER) && (_MSC_VER >= 1700))
#define _CX11_
#define ENABLE_BOOST // queue is from boost but it doesn't require a full boost install
#endif
@ -102,14 +101,10 @@ typedef uint32 uptr;
#include <set>
#include <queue>
#include <algorithm>
#ifdef _CX11_
#include <thread>
#include <atomic>
#endif
#if defined(__linux__) || defined(_CX11_)
#include <mutex>
#include <condition_variable>
#endif
using namespace std;