Skip to content

Commit

Permalink
Fix colours
Browse files Browse the repository at this point in the history
  • Loading branch information
aelred committed Sep 22, 2024
1 parent 7d33cb4 commit 99c26eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 99c26eb

Please sign in to comment.