summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-22 16:55:39 +0100
committerGitHub <noreply@github.com>2024-01-22 16:55:39 +0100
commit8bd10473d60503c7acddc399604a51b9c9947541 (patch)
treef713f84942681321fca27ba028e31d6c74a09013 /src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp
parentMerge pull request #12747 from t895/homescreen-widget (diff)
parentdevice_memory_manager: use unique_lock for update (diff)
downloadyuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.gz
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.bz2
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.lz
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.xz
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.tar.zst
yuzu-8bd10473d60503c7acddc399604a51b9c9947541.zip
Diffstat (limited to 'src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp')
-rw-r--r--src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp b/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp
index ce70946ec..ede2a1193 100644
--- a/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp
+++ b/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp
@@ -22,11 +22,13 @@ GraphicBuffer::GraphicBuffer(Service::Nvidia::NvCore::NvMap& nvmap,
: NvGraphicBuffer(GetBuffer(buffer)), m_nvmap(std::addressof(nvmap)) {
if (this->BufferId() > 0) {
m_nvmap->DuplicateHandle(this->BufferId(), true);
+ m_nvmap->PinHandle(this->BufferId(), false);
}
}
GraphicBuffer::~GraphicBuffer() {
if (m_nvmap != nullptr && this->BufferId() > 0) {
+ m_nvmap->UnpinHandle(this->BufferId());
m_nvmap->FreeHandle(this->BufferId(), true);
}
}