projects
/
gbajam22
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddf193a
)
fixed incorrect color in pc palette emulation
author
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 17 Oct 2022 17:55:25 +0000
(20:55 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 17 Oct 2022 17:55:25 +0000
(20:55 +0300)
src/pc/main.c
patch
|
blob
|
history
diff --git
a/src/pc/main.c
b/src/pc/main.c
index
cf6ffec
..
5f54f35
100644
(file)
--- a/
src/pc/main.c
+++ b/
src/pc/main.c
@@
-130,9
+130,9
@@
uint16_t get_input(void)
#define PACK_RGB32(r, g, b) \
((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff) | 0xff000000)
-#define UNPACK_R16(c) (((c) >> 9) & 0xf8)
-#define UNPACK_G16(c) (((c) >> 3) & 0xf8)
-#define UNPACK_B16(c) (((c) << 3) & 0xf8)
+#define UNPACK_R16(c) (((c) << 3) & 0xf8)
+#define UNPACK_G16(c) (((c) >> 2) & 0xf8)
+#define UNPACK_B16(c) (((c) >> 7) & 0xf8)
void present(int buf)
{