From 6e6f4be709fa3b3f9bd1c47534e2670cfdc6fca6 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Sat, 10 Apr 2021 09:13:05 -0600 Subject: [PATCH] fix color constructor, part of https://github.com/rust-console/gba/issues/129 --- src/mmio_types/color.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mmio_types/color.rs b/src/mmio_types/color.rs index 46d4d1d..8e24358 100644 --- a/src/mmio_types/color.rs +++ b/src/mmio_types/color.rs @@ -14,6 +14,6 @@ impl Color { let r = red as u16; let g = green as u16; let b = blue as u16; - Self(b << 10 | g << 15 | r) + Self(b << 10 | g << 5 | r) } }