From 1006663b6eaa55149e9a21aa8a34e41c85eb08ca Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sun, 18 Aug 2024 10:23:27 +0200 Subject: [PATCH] shm: align size to stride (#7383) calculate the size to the stride we got to better align it. --- src/protocols/core/Shm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/core/Shm.cpp b/src/protocols/core/Shm.cpp index 99459d9a4..9996a6072 100644 --- a/src/protocols/core/Shm.cpp +++ b/src/protocols/core/Shm.cpp @@ -63,7 +63,7 @@ Aquamarine::SSHMAttrs CWLSHMBuffer::shm() { } std::tuple CWLSHMBuffer::beginDataPtr(uint32_t flags) { - return {(uint8_t*)pool->data + offset, fmt, size.x * size.y * 4}; + return {(uint8_t*)pool->data + offset, fmt, stride * size.y}; } void CWLSHMBuffer::endDataPtr() {