summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-07 03:21:01 +0100
committerLiam <byteslice@airmail.cc>2024-01-30 02:17:33 +0100
commit68303ed6016da0926df8b62e5a0c55c9b914f927 (patch)
tree35c805cffc86c668ae88641bd42358105ed6751a /src/core/hle/service/nvnflinger
parentam: return AppletDataBroker and use for frontend applets (diff)
downloadyuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.gz
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.bz2
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.lz
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.xz
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.tar.zst
yuzu-68303ed6016da0926df8b62e5a0c55c9b914f927.zip
Diffstat (limited to 'src/core/hle/service/nvnflinger')
-rw-r--r--src/core/hle/service/nvnflinger/nvnflinger.cpp10
-rw-r--r--src/core/hle/service/nvnflinger/nvnflinger.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp
index 71d6fdb0c..51133853c 100644
--- a/src/core/hle/service/nvnflinger/nvnflinger.cpp
+++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp
@@ -198,6 +198,16 @@ bool Nvnflinger::CloseLayer(u64 layer_id) {
return false;
}
+void Nvnflinger::SetLayerVisibility(u64 layer_id, bool visible) {
+ const auto lock_guard = Lock();
+
+ for (auto& display : displays) {
+ if (auto* layer = display.FindLayer(layer_id); layer) {
+ layer->SetVisibility(visible);
+ }
+ }
+}
+
void Nvnflinger::DestroyLayer(u64 layer_id) {
const auto lock_guard = Lock();
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.h b/src/core/hle/service/nvnflinger/nvnflinger.h
index a60e0ae6b..369439142 100644
--- a/src/core/hle/service/nvnflinger/nvnflinger.h
+++ b/src/core/hle/service/nvnflinger/nvnflinger.h
@@ -79,6 +79,9 @@ public:
/// Closes a layer on all displays for the given layer ID.
bool CloseLayer(u64 layer_id);
+ /// Makes a layer visible on all displays for the given layer ID.
+ void SetLayerVisibility(u64 layer_id, bool visible);
+
/// Destroys the given layer ID.
void DestroyLayer(u64 layer_id);