This commit is contained in:
Alex Janka 2023-04-25 10:08:41 +10:00
parent 01dcbbcd53
commit f1e5960484

View file

@ -126,11 +126,8 @@ where
R: Renderer<ColourFormat>, R: Renderer<ColourFormat>,
{ {
pub fn new(cgb: bool, window: R, tile_window_renderer: Option<R>) -> Self { pub fn new(cgb: bool, window: R, tile_window_renderer: Option<R>) -> Self {
let tile_window = if let Some(mut tile_window_renderer) = tile_window_renderer { let tile_window = tile_window_renderer
Some(TileWindow::new(tile_window_renderer, cgb)) .map(|tile_window_renderer| TileWindow::new(tile_window_renderer, cgb));
} else {
None
};
let buffer = vec![ColourInner::Error.rgb_bytes(None, false).into(); WIDTH * HEIGHT]; let buffer = vec![ColourInner::Error.rgb_bytes(None, false).into(); WIDTH * HEIGHT];
Self { Self {