Debugger: Fixed PC value for event viewer tooltips

This commit is contained in:
Sour 2019-03-25 23:48:20 -04:00
parent d45169a217
commit c7326e626f

View file

@ -22,7 +22,9 @@ void EventManager::AddEvent(DebugEventType type, MemoryOperationInfo &operation,
evt.Scanline = _ppu->GetScanline();
evt.Cycle = _ppu->GetCycle();
evt.BreakpointId = breakpointId;
evt.ProgramCounter = _cpu->GetState().PC;
CpuState state = _cpu->GetState();
evt.ProgramCounter = (state.K << 16) | state.PC;
_debugEvents.push_back(evt);
}
@ -33,7 +35,10 @@ void EventManager::AddEvent(DebugEventType type)
evt.Type = type;
evt.Scanline = _ppu->GetScanline();
evt.Cycle = _ppu->GetCycle();
evt.ProgramCounter = _cpu->GetState().PC;
CpuState state = _cpu->GetState();
evt.ProgramCounter = (state.K << 16) | state.PC;
_debugEvents.push_back(evt);
}