From cc3aa959265480e1990b10ee37ebf1c0ade3da64 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 27 Feb 2020 10:47:02 -0400 Subject: NVFlinger: Lock race condition between CPU, Host Timing, VSync. --- src/core/hle/service/nvflinger/nvflinger.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/hle/service/nvflinger/nvflinger.h') 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 +#include #include #include #include @@ -79,6 +80,10 @@ public: s64 GetNextTicks() const; + std::unique_lock 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 composition_event; + std::shared_ptr guard; + Core::System& system; }; -- cgit v1.2.3