From 3706cfe90833a2b2d385c600a291ee0a0c1d0109 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 8 Sep 2015 14:34:17 +0200 Subject: [PATCH] gsdx: always enable CXX11 mutex feature. ifdef was only useful for VS2010 --- plugins/GSdx/GS.cpp | 4 ---- plugins/GSdx/GSCapture.cpp | 12 ------------ plugins/GSdx/GSCapture.h | 7 ------- plugins/GSdx/GSRenderer.cpp | 4 ---- plugins/GSdx/GSRenderer.h | 4 ---- plugins/GSdx/stdafx.h | 5 ----- 6 files changed, 36 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 11b9783e27..7de29910e4 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -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 lock(s_gs->m_pGSsetTitle_Crit); -#else - GSAutoLock lock(&s_gs->m_pGSsetTitle_Crit); -#endif s.append(" | ").append(s_gs->m_GStitleInfoBuffer); diff --git a/plugins/GSdx/GSCapture.cpp b/plugins/GSdx/GSCapture.cpp index 6faa53e3b7..7e358e9a8c 100644 --- a/plugins/GSdx/GSCapture.cpp +++ b/plugins/GSdx/GSCapture.cpp @@ -393,11 +393,7 @@ GSCapture::~GSCapture() bool GSCapture::BeginCapture(float fps) { -#ifdef _CX11_ std::lock_guard 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 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 lock(m_lock); -#else - GSAutoLock lock(&m_lock); -#endif #ifdef _WINDOWS diff --git a/plugins/GSdx/GSCapture.h b/plugins/GSdx/GSCapture.h index f1908e299c..f98ee25cbe 100644 --- a/plugins/GSdx/GSCapture.h +++ b/plugins/GSdx/GSCapture.h @@ -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; diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index a246ad472a..b65fe533f4 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -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 lock(m_pGSsetTitle_Crit); -#else - GSAutoLock lock(&m_pGSsetTitle_Crit); -#endif strncpy(m_GStitleInfoBuffer, s.c_str(), countof(m_GStitleInfoBuffer) - 1); diff --git a/plugins/GSdx/GSRenderer.h b/plugins/GSdx/GSRenderer.h index 332a7aa0b5..6e8a513df6 100644 --- a/plugins/GSdx/GSRenderer.h +++ b/plugins/GSdx/GSRenderer.h @@ -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]; }; diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index aa9bfe2c9f..f771e2245e 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -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 #include #include -#ifdef _CX11_ #include #include -#endif -#if defined(__linux__) || defined(_CX11_) #include #include -#endif using namespace std;