From 10c0b9131c304ee3b8846e1aec455866b0b5defc Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Mon, 20 Sep 2021 21:57:56 +0000 Subject: [PATCH] fb: Fix mapped gbm buffer stride --- src/fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fb.c b/src/fb.c index 695a28e..e11bb5a 100644 --- a/src/fb.c +++ b/src/fb.c @@ -222,7 +222,7 @@ int nvnc_fb_map(struct nvnc_fb* fb) uint32_t stride = 0; fb->addr = gbm_bo_map(fb->bo, 0, 0, fb->width, fb->height, GBM_BO_TRANSFER_READ, &stride, &fb->bo_map_handle); - fb->stride = stride; + fb->stride = stride / nvnc_fb_get_pixel_size(fb); if (fb->addr) return 0;