fxlink: don't use <endian.h>

pull/9/head
Lephenixnoir 8 months ago
parent 90d5e723e0
commit aa362c15f6
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
  1. 3
      fxlink/protocol.c

@ -4,7 +4,6 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <endian.h>
//---
// 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;

Loading…
Cancel
Save