From 19a8f03ad59abacb3fae60f7ba6d5d358e779c29 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 10 Dec 2020 15:32:52 -0800 Subject: hle: service: nvflinger: Refactor locking and interfaces. --- src/core/hle/service/nvflinger/nvflinger.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (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 1ebe949c0..ce1347d6d 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -75,10 +75,7 @@ public: [[nodiscard]] std::shared_ptr FindVsyncEvent(u64 display_id) const; /// Obtains a buffer queue identified by the ID. - [[nodiscard]] BufferQueue& FindBufferQueue(u32 id); - - /// Obtains a buffer queue identified by the ID. - [[nodiscard]] const BufferQueue& FindBufferQueue(u32 id) const; + [[nodiscard]] BufferQueue* FindBufferQueue(u32 id); /// Performs a composition request to the emulated nvidia GPU and triggers the vsync events when /// finished. @@ -86,11 +83,11 @@ public: [[nodiscard]] s64 GetNextTicks() const; +private: [[nodiscard]] std::unique_lock Lock() const { return std::unique_lock{*guard}; } -private: /// Finds the display identified by the specified ID. [[nodiscard]] VI::Display* FindDisplay(u64 display_id); -- cgit v1.2.3