summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/nvflinger.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-27 15:47:02 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:18 +0200
commitcc3aa959265480e1990b10ee37ebf1c0ade3da64 (patch)
tree0188b3adeab5cb83362f296e6894d70b53cb86e0 /src/core/hle/service/nvflinger/nvflinger.h
parentSVC: Add locks to the memory management. (diff)
downloadyuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.gz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.bz2
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.lz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.xz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.zst
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h
index 57a21f33b..02c081494 100644
--- a/src/core/hle/service/nvflinger/nvflinger.h
+++ b/src/core/hle/service/nvflinger/nvflinger.h
@@ -5,6 +5,7 @@
#pragma once
#include <memory>
+#include <mutex>
#include <optional>
#include <string>
#include <string_view>
@@ -79,6 +80,10 @@ public:
s64 GetNextTicks() const;
+ std::unique_lock<std::mutex> Lock() {
+ return std::unique_lock{*guard};
+ }
+
private:
/// Finds the display identified by the specified ID.
VI::Display* FindDisplay(u64 display_id);
@@ -108,6 +113,8 @@ private:
/// Event that handles screen composition.
std::shared_ptr<Core::Timing::EventType> composition_event;
+ std::shared_ptr<std::mutex> guard;
+
Core::System& system;
};