diff options
author | Liam <byteslice@airmail.cc> | 2024-01-22 18:40:50 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 962c82540c304f909957776908aabcd261f2a7ba (patch) | |
tree | 707ab34565e8309b5ede21acebf36975da7718e7 /src/core/hle/service/am/system_buffer_manager.cpp | |
parent | nvservices: unmap only on last container free (diff) | |
download | yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.gz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.bz2 yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.lz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.xz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.zst yuzu-962c82540c304f909957776908aabcd261f2a7ba.zip |
Diffstat (limited to 'src/core/hle/service/am/system_buffer_manager.cpp')
-rw-r--r-- | src/core/hle/service/am/system_buffer_manager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/am/system_buffer_manager.cpp b/src/core/hle/service/am/system_buffer_manager.cpp index 60a9afc9d..3cccc5388 100644 --- a/src/core/hle/service/am/system_buffer_manager.cpp +++ b/src/core/hle/service/am/system_buffer_manager.cpp @@ -17,11 +17,12 @@ SystemBufferManager::~SystemBufferManager() { // Clean up shared layers. if (m_buffer_sharing_enabled) { + m_nvnflinger->GetSystemBufferManager().Finalize(m_process); } } bool SystemBufferManager::Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel::KProcess* process, - AppletId applet_id) { + AppletId applet_id, LibraryAppletMode mode) { if (m_nvnflinger) { return m_buffer_sharing_enabled; } @@ -36,9 +37,14 @@ bool SystemBufferManager::Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel: return false; } + Nvnflinger::LayerBlending blending = Nvnflinger::LayerBlending::None; + if (mode == LibraryAppletMode::PartialForeground) { + blending = Nvnflinger::LayerBlending::Coverage; + } + const auto display_id = m_nvnflinger->OpenDisplay("Default").value(); const auto res = m_nvnflinger->GetSystemBufferManager().Initialize( - &m_system_shared_buffer_id, &m_system_shared_layer_id, display_id); + m_process, &m_system_shared_buffer_id, &m_system_shared_layer_id, display_id, blending); if (res.IsSuccess()) { m_buffer_sharing_enabled = true; |