From aa362c15f6beb4fc20c2e2243e15024d22d61219 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Wed, 16 Feb 2022 20:58:23 +0100 Subject: [PATCH] fxlink: don't use --- fxlink/protocol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fxlink/protocol.c b/fxlink/protocol.c index d67b5d5..e901007 100644 --- a/fxlink/protocol.c +++ b/fxlink/protocol.c @@ -4,7 +4,6 @@ #include #include #include -#include //--- // Image format @@ -36,7 +35,7 @@ static void decode_rgb565(void *pixels, int width, int height, int size, uint16_t color = 0; if(input - pixels + 2 <= size) color = *(uint16_t *)input; - color = be16toh(color); + color = ((color & 0xff00) >> 8) | ((color & 0x00ff) << 8); row_pointers[y][3*x+0] = (color >> 11) << 3; row_pointers[y][3*x+1] = ((color >> 5) & 0x3f) << 2;