From 2c2834ca26bf4d2b9f6a588c9aa53a8b36510bd6 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sat, 27 Aug 2016 05:25:59 +0300 Subject: [PATCH] I cancelled the pixel doubling which was left over by the RPi ultra-highres implementation. --- src/tunnel.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/tunnel.c b/src/tunnel.c index 4662420..ee6758e 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -64,7 +64,7 @@ static int init(void) unsigned char *fog; float aspect = (float)fb_width / (float)fb_height; - xsz = fb_width / 2; + xsz = fb_width; ysz = fb_height; vxsz = xsz * VSCALE; vysz = ysz * VSCALE; @@ -222,13 +222,15 @@ static void draw_tunnel_range(unsigned short *pix, int xoffs, int yoffs, int sta unsigned int *pixels = (unsigned int*)pix + starty * (fb_width >> 1); for(i=0; i>1); j++) { unsigned int col; - int r, g, b; + int r, g, b, idx = j << 1; - tunnel_color(&r, &g, &b, toffs, tmap[j], fog[j]); + tunnel_color(&r, &g, &b, toffs, tmap[idx], fog[idx]); col = PACK_RGB16(r, g, b); - *pixels++ = (col << 16) | col; + tunnel_color(&r, &g, &b, toffs, tmap[idx + 1], fog[idx + 1]); + col |= PACK_RGB16(r, g, b) << 16; + *pixels++ = col; } tmap += vxsz; fog += vxsz; -- 1.7.10.4