From a7ca8e5c1a709b1ca70b173d4f610cf5fe3f8aba Mon Sep 17 00:00:00 2001 From: Pierre Ossman <ossman@cendio.se> Date: Mon, 20 Feb 2017 16:44:54 +0100 Subject: [PATCH] Fix wrong colours on local cursor The RGB order was backwards compared to the pixel format we've requested, resulting in the red and blue channels getting swapped. --- core/display.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/display.js b/core/display.js index 57e07d5..f7c437b 100644 --- a/core/display.js +++ b/core/display.js @@ -841,9 +841,9 @@ cur.push(alpha); // alpha } else { idx = ((w0 * y) + x) * 4; - cur.push(pixels[idx + 2]); // blue + cur.push(pixels[idx]); // blue cur.push(pixels[idx + 1]); // green - cur.push(pixels[idx]); // red + cur.push(pixels[idx + 2]); // red cur.push(alpha); // alpha } } -- GitLab