Qt: Better fix for I/O viewer

This commit is contained in:
Vicki Pfau 2024-05-12 02:48:05 -07:00
parent 6e3a00e081
commit b723ed4764
1 changed files with 6 additions and 11 deletions

View File

@ -1687,19 +1687,14 @@ void IOViewer::bitFlipped() {
void IOViewer::writeback() { void IOViewer::writeback() {
{ {
CoreController::Interrupter interrupter(m_controller); CoreController::Interrupter interrupter(m_controller);
switch (m_controller->platform()) { mCore* core = m_controller->thread()->core;
#ifdef M_CORE_GB switch (m_width) {
case mPLATFORM_GB: case 0:
GBIOWrite(static_cast<GB*>(m_controller->thread()->core->board), m_register, m_value); core->busWrite8(core, m_base + m_register, m_value);
break; break;
#endif case 1:
#ifdef M_CORE_GBA core->busWrite16(core, m_base + m_register, m_value);
case mPLATFORM_GBA:
GBAIOWrite(static_cast<GBA*>(m_controller->thread()->core->board), m_register, m_value);
break; break;
#endif
case mPLATFORM_NONE:
return;
} }
} }
updateRegister(); updateRegister();