From 99c26eb2106ec3aaf4f056a2465cc14f5e26955f Mon Sep 17 00:00:00 2001 From: Felix Chapman Date: Sun, 22 Sep 2024 17:42:19 +0100 Subject: [PATCH] Fix colours --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3effa19..03b1458 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,9 +99,9 @@ impl NESDisplay for BufferDisplay { let offset = (self.y * WIDTH as usize + self.x) * 4; if offset + 3 < self.buffer.len() { let (r, g, b) = color.to_rgb(); - self.buffer[offset] = b; + self.buffer[offset] = r; self.buffer[offset + 1] = g; - self.buffer[offset + 2] = r; + self.buffer[offset + 2] = b; self.buffer[offset + 3] = 0xFF; }