diff options
| author | bunnei <bunneidev@gmail.com> | 2020-01-04 00:45:06 -0500 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2020-01-04 00:45:06 -0500 |
| commit | 64c56315793d2b6dbf7a55f99d4bcc51929f03cb (patch) | |
| tree | 4cd4a922499783c6369a60068442dee51cdfffe3 /src/core/hle/service/nvflinger | |
| parent | 624a0f7f3f4100fc56e3d70603a30384a21e7dc6 (diff) | |
service: vi: Implement CloseLayer.
- Needed for Undertale.
Diffstat (limited to 'src/core/hle/service/nvflinger')
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 52623cf89..a58ea9c59 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -88,6 +88,12 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) { return layer_id; } +void NVFlinger::CloseLayer(u64 layer_id) { + for (auto& display : displays) { + display.CloseLayer(layer_id); + } +} + std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const { const auto* const layer = FindLayer(display_id, layer_id); diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index e3cc14bdc..57a21f33b 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -54,6 +54,9 @@ public: /// If an invalid display ID is specified, then an empty optional is returned. std::optional<u64> CreateLayer(u64 display_id); + /// Closes a layer on all displays for the given layer ID. + void CloseLayer(u64 layer_id); + /// Finds the buffer queue ID of the specified layer in the specified display. /// /// If an invalid display ID or layer ID is provided, then an empty optional is returned. |
