From 7f34e8bd083bdac9506e037b72dce35e467face1 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Fri, 13 Mar 2020 16:23:00 +0200 Subject: [PATCH] core/gpu/bugfix: Use correct bitmask when writing to DISPSTAT Accidently used 5 (0b0101) instead of 7 (0b0111) Former-commit-id: f690dd3f591bef10c5dd280d46be22cd339498a2 --- src/core/iodev.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iodev.rs b/src/core/iodev.rs index 7986d89..6391d43 100644 --- a/src/core/iodev.rs +++ b/src/core/iodev.rs @@ -121,7 +121,7 @@ impl Bus for IoDevices { let io_addr = addr + IO_BASE; match io_addr { REG_DISPCNT => io.gpu.dispcnt.0 = value, - REG_DISPSTAT => io.gpu.dispstat.0 = value | (io.gpu.dispstat.0 & 5), + REG_DISPSTAT => io.gpu.dispstat.0 = value | (io.gpu.dispstat.0 & 7), REG_BG0CNT => io.gpu.backgrounds[0].bgcnt.0 = value, REG_BG1CNT => io.gpu.backgrounds[1].bgcnt.0 = value, REG_BG2CNT => io.gpu.backgrounds[2].bgcnt.0 = value,