diff options
author | Liam <byteslice@airmail.cc> | 2024-01-18 04:03:40 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-18 04:03:40 +0100 |
commit | e4bbb24dcf9048ac23e6c12f2ab5af1e988af764 (patch) | |
tree | ef5c985bcc765c02da9e443140de55228ed4134d /src/core/hle/service/nvnflinger/nvnflinger.cpp | |
parent | nvnflinger: ensure display abandonment considers all layers and future layers (diff) | |
download | yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.gz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.bz2 yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.lz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.xz yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.tar.zst yuzu-e4bbb24dcf9048ac23e6c12f2ab5af1e988af764.zip |
Diffstat (limited to 'src/core/hle/service/nvnflinger/nvnflinger.cpp')
-rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index e05ff66ff..af6591370 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp @@ -174,24 +174,28 @@ void Nvnflinger::CreateLayerAtId(VI::Display& display, u64 layer_id) { display.CreateLayer(layer_id, buffer_id, nvdrv->container); } -void Nvnflinger::OpenLayer(u64 layer_id) { +bool Nvnflinger::OpenLayer(u64 layer_id) { const auto lock_guard = Lock(); for (auto& display : displays) { if (auto* layer = display.FindLayer(layer_id); layer) { - layer->Open(); + return layer->Open(); } } + + return false; } -void Nvnflinger::CloseLayer(u64 layer_id) { +bool Nvnflinger::CloseLayer(u64 layer_id) { const auto lock_guard = Lock(); for (auto& display : displays) { if (auto* layer = display.FindLayer(layer_id); layer) { - layer->Close(); + return layer->Close(); } } + + return false; } void Nvnflinger::DestroyLayer(u64 layer_id) { |