Qt: Fix crash when applying changes to GB I/O registers in I/O view

This commit is contained in:
Vicki Pfau 2024-05-11 21:40:56 -07:00
parent 16a565dc6b
commit b1c7c6d14a
2 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Emulation fixes:
- GBA GPIO: Fix gyro read-out start (fixes mgba.io/i/3141)
- GBA SIO: Fix MULTI mode SIOCNT bit 7 writes on secondary GBAs (fixes mgba.io/i/3110)
Other fixes:
- Qt: Fix crash when applying changes to GB I/O registers in I/O view
- Updater: Fix updating appimage across filesystems
Misc:
- Vita: Add imc0 and xmc0 mount point support

View File

@ -1689,7 +1689,20 @@ void IOViewer::bitFlipped() {
void IOViewer::writeback() {
{
CoreController::Interrupter interrupter(m_controller);
GBAIOWrite(static_cast<GBA*>(m_controller->thread()->core->board), m_register, m_value);
switch (m_controller->platform()) {
#ifdef M_CORE_GB
case mPLATFORM_GB:
GBIOWrite(static_cast<GB*>(m_controller->thread()->core->board), m_register, m_value);
break;
#endif
#ifdef M_CORE_GBA
case mPLATFORM_GBA:
GBAIOWrite(static_cast<GBA*>(m_controller->thread()->core->board), m_register, m_value);
break;
#endif
case mPLATFORM_NONE:
return;
}
}
updateRegister();
}