From bfcfa04013e3f2fae09bd74aa76efd468b6eec08 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 28 Feb 2022 22:45:54 -0300 Subject: [PATCH] Fix CMI8338 MPU/OPL windows being read-write --- src/sound/snd_cmi8x38.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sound/snd_cmi8x38.c b/src/sound/snd_cmi8x38.c index bd4ea4fe6..86f9e0129 100644 --- a/src/sound/snd_cmi8x38.c +++ b/src/sound/snd_cmi8x38.c @@ -495,16 +495,12 @@ cmi8x38_write(uint16_t addr, uint8_t val, void *priv) break; case 0x40 ... 0x4f: - if (dev->type == CMEDIA_CMI8338) - break; - else + if (dev->type != CMEDIA_CMI8338) mpu401_write(addr, val, dev->sb->mpu); return; case 0x50 ... 0x5f: - if (dev->type == CMEDIA_CMI8338) - break; - else + if (dev->type != CMEDIA_CMI8338) opl3_write(addr, val, &dev->sb->opl); return;