From 085ce4890da2f89165f56ce126d628866295dcde Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 12 Nov 2022 00:35:34 -0800 Subject: [PATCH] GBA: Fix resetting key IRQ state (fixes #2716) --- CHANGES | 1 + src/gba/gba.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 76b3b451f..5d17491d3 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Features: - Debugger: Add range watchpoints Emulation fixes: - GB Serialize: Don't write BGP/OBP when loading SCGB state (fixes mgba.io/i/2694) + - GBA: Fix resetting key IRQ state (fixes mgba.io/i/2716) - GBA Video: Ignore disabled backgrounds as OBJ blend target (fixes mgba.io/i/2489) Other fixes: - Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681) diff --git a/src/gba/gba.c b/src/gba/gba.c index de975855a..f40e85ace 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -213,6 +213,7 @@ void GBAReset(struct ARMCore* cpu) { gba->earlyExit = false; gba->dmaPC = 0; gba->biosStall = 0; + gba->keysLast = 0x400; if (gba->yankedRomSize) { gba->memory.romSize = gba->yankedRomSize; gba->memory.romMask = toPow2(gba->memory.romSize) - 1;