mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-29 13:03:37 +01:00
fxlink: don't use <endian.h>
This commit is contained in:
parent
90d5e723e0
commit
aa362c15f6
1 changed files with 1 additions and 2 deletions
|
@ -4,7 +4,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <endian.h>
|
|
||||||
|
|
||||||
//---
|
//---
|
||||||
// Image format
|
// Image format
|
||||||
|
@ -36,7 +35,7 @@ static void decode_rgb565(void *pixels, int width, int height, int size,
|
||||||
uint16_t color = 0;
|
uint16_t color = 0;
|
||||||
if(input - pixels + 2 <= size) color = *(uint16_t *)input;
|
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+0] = (color >> 11) << 3;
|
||||||
row_pointers[y][3*x+1] = ((color >> 5) & 0x3f) << 2;
|
row_pointers[y][3*x+1] = ((color >> 5) & 0x3f) << 2;
|
||||||
|
|
Loading…
Reference in a new issue