mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #8530 from s-daveb/master
MacOS: Fixes configuration hang; bump MacOS SDK.
This commit is contained in:
@ -5,11 +5,7 @@
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#if __APPLE__
|
||||
#include <mutex>
|
||||
#else
|
||||
#include <shared_mutex>
|
||||
#endif
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
|
||||
@ -21,19 +17,10 @@ static Layers s_layers;
|
||||
static std::list<ConfigChangedCallback> s_callbacks;
|
||||
static u32 s_callback_guards = 0;
|
||||
|
||||
// Mac supports shared_mutex since 10.12 and we're targeting 10.10,
|
||||
// so only use unique locks there...
|
||||
#if __APPLE__
|
||||
static std::mutex s_layers_rw_lock;
|
||||
|
||||
using ReadLock = std::unique_lock<std::mutex>;
|
||||
using WriteLock = std::unique_lock<std::mutex>;
|
||||
#else
|
||||
static std::shared_mutex s_layers_rw_lock;
|
||||
|
||||
using ReadLock = std::shared_lock<std::shared_mutex>;
|
||||
using WriteLock = std::unique_lock<std::shared_mutex>;
|
||||
#endif
|
||||
|
||||
static void AddLayerInternal(std::shared_ptr<Layer> layer)
|
||||
{
|
||||
|
Reference in New Issue
Block a user