mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Standardize on just one mutex implementation.
This commit is contained in:
1 parent
955b0fb9db
commit
da03b80c97
8 files changed
+42
-40
No files matched your search
+6
-5
@@ -15,13 +15,14 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/mutex.h"
|
||||
#include "base/timeutil.h"
|
||||
#include "base/NativeApp.h"
|
||||
#include "i18n/i18n.h"
|
||||
|
||||
#include "Common/StdMutex.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
|
||||
@@ -206,7 +207,7 @@ namespace SaveState
|
||||
|
||||
static bool needsProcess = false;
|
||||
static std::vector<Operation> pending;
|
||||
static std::recursive_mutex mutex;
|
||||
static recursive_mutex mutex;
|
||||
static bool hasLoadedState = false;
|
||||
|
||||
// TODO: Should this be configurable?
|
||||
@@ -250,7 +251,7 @@ namespace SaveState
|
||||
|
||||
void Enqueue(SaveState::Operation op)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex);
|
||||
lock_guard guard(mutex);
|
||||
pending.push_back(op);
|
||||
|
||||
// Don't actually run it until next frame.
|
||||
@@ -486,7 +487,7 @@ namespace SaveState
|
||||
|
||||
std::vector<Operation> Flush()
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex);
|
||||
lock_guard guard(mutex);
|
||||
std::vector<Operation> copy = pending;
|
||||
pending.clear();
|
||||
|
||||
@@ -670,7 +671,7 @@ namespace SaveState
|
||||
// Make sure there's a directory for save slots
|
||||
pspFileSystem.MkDir("ms0:/PSP/PPSSPP_STATE");
|
||||
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex);
|
||||
lock_guard guard(mutex);
|
||||
rewindStates.Clear();
|
||||
|
||||
hasLoadedState = false;
|
||||
|
||||
Reference in new issue
Block a user