From 75a302d1d240da2c338174e9c028c36a418704b8 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Sat, 29 Jul 2023 15:47:47 +0200 Subject: [PATCH] Merge video0/affine fixes from master --- video.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/video.cc b/video.cc index 51efa42..d419fe9 100644 --- a/video.cc +++ b/video.cc @@ -1911,10 +1911,13 @@ void update_scanline(void) render_scanline_window(screen_offset); } - affine_reference_x[0] += (s16)read_ioreg(REG_BG2PB); - affine_reference_y[0] += (s16)read_ioreg(REG_BG2PD); - affine_reference_x[1] += (s16)read_ioreg(REG_BG3PB); - affine_reference_y[1] += (s16)read_ioreg(REG_BG3PD); + // Mode 0 does not use any affine params at all. + if (video_mode) { + affine_reference_x[0] += (s16)read_ioreg(REG_BG2PB); + affine_reference_y[0] += (s16)read_ioreg(REG_BG2PD); + affine_reference_x[1] += (s16)read_ioreg(REG_BG3PB); + affine_reference_y[1] += (s16)read_ioreg(REG_BG3PD); + } }