fix wrong variable name, closes github #4

This commit is contained in:
JerryXiao 2023-09-13 17:45:03 +08:00
parent 035ae36dad
commit 843d79cb64
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

2
drm.c
View file

@ -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;
}