aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/vi/vi.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-31 10:25:28 -0600
committerGitHub <noreply@github.com>2024-01-31 10:25:28 -0600
commit7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c (patch)
tree24b2ed412f2683c8460839778ea7761d052bc38f /src/core/hle/service/vi/vi.cpp
parent12e5293c73ce9965a6f73a8861d8b84f3f4ed615 (diff)
parent817d916233adcfb26814fde677e71d9825ce614c (diff)
Merge pull request #12760 from liamwhite/mp-am
am: rewrite for multiprocess support
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r--src/core/hle/service/vi/vi.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 1f3d82c57..73058db9a 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -535,6 +535,12 @@ public:
RegisterHandlers(functions);
}
+ ~IApplicationDisplayService() {
+ for (const auto layer_id : stray_layer_ids) {
+ nvnflinger.DestroyLayer(layer_id);
+ }
+ }
+
private:
enum class ConvertedScaleMode : u64 {
Freeze = 0,
@@ -770,6 +776,7 @@ private:
return;
}
+ stray_layer_ids.push_back(*layer_id);
const auto buffer_queue_id = nvnflinger.FindBufferQueueId(display_id, *layer_id);
if (!buffer_queue_id) {
LOG_ERROR(Service_VI, "Buffer queue id not found! display_id={}", display_id);
@@ -916,6 +923,7 @@ private:
Nvnflinger::Nvnflinger& nvnflinger;
Nvnflinger::HosBinderDriverServer& hos_binder_driver_server;
+ std::vector<u64> stray_layer_ids;
bool vsync_event_fetched{false};
};