diff options
| author | Liam <byteslice@airmail.cc> | 2022-10-23 05:45:45 -0400 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2022-10-23 05:45:45 -0400 |
| commit | 2d90a927c9f7652aa7e259ba57fa22ddbf8bed24 (patch) | |
| tree | 031c7e8278dfea30bbbecd8a971ee4c2fc31feee /src/core/hle/service/nvflinger/nvflinger.cpp | |
| parent | 0860fffd78e5c0a833bd0285d651a4615d29c4f4 (diff) | |
core: barrier service thread shutdown
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.cpp')
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index aa14d2cbc..dad93b38e 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -102,15 +102,19 @@ NVFlinger::~NVFlinger() { system.CoreTiming().UnscheduleEvent(single_composition_event, {}); } + ShutdownLayers(); + + if (nvdrv) { + nvdrv->Close(disp_fd); + } +} + +void NVFlinger::ShutdownLayers() { for (auto& display : displays) { for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { display.GetLayer(layer).Core().NotifyShutdown(); } } - - if (nvdrv) { - nvdrv->Close(disp_fd); - } } void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) { |
