diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-30 01:11:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 01:11:26 +0200 |
commit | c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb (patch) | |
tree | 0653781de68f88b7910b78e5c3d893b06e9dc37d /src/core/hle/service/nvflinger/nvflinger.cpp | |
parent | Merge pull request #9140 from vonchenplus/darw_index_bufferx_first_error (diff) | |
parent | nvnflinger: release queued handles immediately on disconnection (diff) | |
download | yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar.gz yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar.bz2 yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar.lz yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar.xz yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.tar.zst yuzu-c4d91488d9e7d1aadfadb6ef8e27fa4f1896a5cb.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index dad93b38e..c3af12c90 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -138,6 +138,19 @@ std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) { return itr->GetID(); } +bool NVFlinger::CloseDisplay(u64 display_id) { + const auto lock_guard = Lock(); + auto* const display = FindDisplay(display_id); + + if (display == nullptr) { + return false; + } + + display->Reset(); + + return true; +} + std::optional<u64> NVFlinger::CreateLayer(u64 display_id) { const auto lock_guard = Lock(); auto* const display = FindDisplay(display_id); |