From 221417c0ee58fc78e15d4bd7fad15c003c83402c Mon Sep 17 00:00:00 2001 From: Godzil Date: Fri, 6 Dec 2019 12:34:20 +0000 Subject: [PATCH] Temporary palette fix --- src/os/unix/graphics.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/os/unix/graphics.c b/src/os/unix/graphics.c index 94e84ca..33027be 100644 --- a/src/os/unix/graphics.c +++ b/src/os/unix/graphics.c @@ -158,6 +158,8 @@ void kbHandler(GLFWwindow *window, int key, int scan, int action, int mod) } keyArray[key].debounced |= (keyArray[key].lastState == GLFW_RELEASE) && (keyArray[key].curState == GLFW_PRESS); keyArray[key].window = window; + printf("key:%d, state:%d debounce:%d, laststate:%d\n", key, keyArray[key].curState, + keyArray[key].debounced, keyArray[key].lastState); } void sizeHandler(GLFWwindow *window, int xs, int ys) @@ -422,9 +424,9 @@ static uint32_t getColour(long color) { Palette *pal = &basicPalette[color]; uint8_t r, g, b, a; - r = pal->r; - b = pal->b; - g = pal->g; + r = pal->r << 2; + b = pal->b << 2; + g = pal->g << 2; a = 255;//pal->a; return (b << 24) | (g << 16) | (r << 8) | a; }