summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/nvflinger.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-10-25 23:42:02 +0200
committerLiam <byteslice@airmail.cc>2022-10-27 14:27:38 +0200
commitcdb9fe978ff29b1de2256f0d0cece550195f3fef (patch)
tree0ae5fbd5632046b5f711bc9f302b0ede1f2cce88 /src/core/hle/service/nvflinger/nvflinger.cpp
parentMerge pull request #9125 from liamwhite/dummy-scheduler (diff)
downloadyuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar.gz
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar.bz2
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar.lz
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar.xz
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.tar.zst
yuzu-cdb9fe978ff29b1de2256f0d0cece550195f3fef.zip
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp13
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);