From ec31f82eda92bf94e96072d9dc4ad07b5eeed772 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Wed, 29 Oct 2014 19:12:33 -0400 Subject: [PATCH] Fix Cursor Issue When Using True Color This fixes an issue where, when using true color, the changeCursor function would not actually write the cursor to the target array. Fixes #407 --- include/display.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/display.js b/include/display.js index 8763fa4a..1006c366 100644 --- a/include/display.js +++ b/include/display.js @@ -713,6 +713,12 @@ var Display; cur.push(rgb[1]); // green cur.push(rgb[0]); // red cur.push(alpha); // alpha + } else { + idx = ((w0 * y) + x) * 4; + cur.push(pixels[idx + 2]); // blue + cur.push(pixels[idx + 1]); // green + cur.push(pixels[idx]); // red + cur.push(alpha); // alpha } } }