diff --git a/card10-l0dable/src/framebuffer/mod.rs b/card10-l0dable/src/framebuffer/mod.rs index 91aeff532bc557b191408d34a62bf39d4e247e6d..26adeab28c4dd7feddbf105f1677ff075845af2b 100644 --- a/card10-l0dable/src/framebuffer/mod.rs +++ b/card10-l0dable/src/framebuffer/mod.rs @@ -81,14 +81,15 @@ impl<'d> Drawing for FrameBuffer<'d> { where T: IntoIterator>, { - for Pixel(coord, color) in item { + for Pixel(coord, Rgb565(color)) in item { let x = coord[0] as u16; let y = coord[1] as u16; if x >= Display::W || y >= Display::H { continue; } - self[(x, y)] = RawColor::rgb8(color.r(), color.g(), color.b()); + // Swap bytes + self[(x, y)] = RawColor([(color >> 8) as u8, color as u8]); } } }