mirror of https://github.com/mgba-emu/mgba.git
GBA Hardware: Fix crash if a savestate lies about game hardware
This commit is contained in:
parent
93122df1f4
commit
422c3a25b8
1
CHANGES
1
CHANGES
|
@ -46,6 +46,7 @@ Bugfixes:
|
|||
- Qt: Ensure CLI backend is attached when submitting commands (fixes mgba.io/i/662)
|
||||
- Core: Fix crash with rewind if savestates shrink
|
||||
- Test: Fix crash when loading invalid file
|
||||
- GBA Hardware: Fix crash if a savestate lies about game hardware
|
||||
Misc:
|
||||
- SDL: Remove scancode key input
|
||||
- GBA Video: Clean up unused timers
|
||||
|
|
|
@ -76,6 +76,8 @@ static void GBAInit(void* cpu, struct mCPUComponent* component) {
|
|||
gba->sio.p = gba;
|
||||
GBASIOInit(&gba->sio);
|
||||
|
||||
GBAHardwareInit(&gba->memory.hw, NULL);
|
||||
|
||||
gba->springIRQ = 0;
|
||||
gba->keySource = 0;
|
||||
gba->rotationSource = 0;
|
||||
|
|
|
@ -77,6 +77,9 @@ void GBAHardwareClear(struct GBACartridgeHardware* hw) {
|
|||
}
|
||||
|
||||
void GBAHardwareGPIOWrite(struct GBACartridgeHardware* hw, uint32_t address, uint16_t value) {
|
||||
if (!hw->gpioBase) {
|
||||
return;
|
||||
}
|
||||
switch (address) {
|
||||
case GPIO_REG_DATA:
|
||||
hw->pinState &= ~hw->direction;
|
||||
|
|
Loading…
Reference in New Issue