From 11219dab7e627eaac57575ee67e3214290143eb8 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Thu, 21 Nov 2019 17:46:51 +0200 Subject: [PATCH] tmpfix: Reset scanline in scanline_aff_bg placeholder Former-commit-id: a4f910210bfa186611d771202a4ef96e97fe75b7 --- src/core/gpu/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/gpu/mod.rs b/src/core/gpu/mod.rs index 8cce927..ad37cb8 100644 --- a/src/core/gpu/mod.rs +++ b/src/core/gpu/mod.rs @@ -136,7 +136,7 @@ impl std::ops::IndexMut for Scanline { } #[derive(Debug, Default, Copy, Clone)] -pub struct Bg { +pub struct Background { pub bgcnt: BgControl, pub bgvofs: u16, pub bghofs: u16, @@ -210,7 +210,7 @@ pub struct Gpu { pub dispcnt: DisplayControl, pub dispstat: DisplayStatus, - pub bg: [Bg; 4], + pub bg: [Background; 4], pub bg_aff: [BgAffine; 2], pub win0: Window, @@ -233,7 +233,7 @@ impl Gpu { Gpu { dispcnt: DisplayControl(0x80), dispstat: DisplayStatus(0), - bg: [Bg::default(); 4], + bg: [Background::default(); 4], bg_aff: [BgAffine::default(); 2], win0: Window::default(), win1: Window::default(), @@ -371,6 +371,7 @@ impl Gpu { fn scanline_aff_bg(&mut self, bg: usize, sb: &mut SysBus) { // TODO + self.bg[bg].line = Scanline::default(); } fn scanline_mode3(&mut self, bg: usize, sb: &mut SysBus) {