From 843d79cb643234b9ea3c4f758edd355d76c9d3d8 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 13 Sep 2023 17:45:03 +0800 Subject: [PATCH] fix wrong variable name, closes github #4 --- drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm.c b/drm.c index 97e5391..6deaef3 100644 --- a/drm.c +++ b/drm.c @@ -34,7 +34,7 @@ static void convert_bgra_to_rgba(const char *in, int width, int height, char *bu { memcpy(buff, in, width * height * BYTES_PER_PIXEL); for (int i = 0; i < width * height * BYTES_PER_PIXEL; i += BYTES_PER_PIXEL) { - uint32_t pixdata = htonl(*((uint32_t*)(kmsvnc->drm->kms_convert_buf + i))); + uint32_t pixdata = htonl(*((uint32_t*)(buff + i))); buff[i+0] = (pixdata & 0x0000ff00) >> 8; buff[i+2] = (pixdata & 0xff000000) >> 24; }