Debugger: Minor event viewer fixes
This commit is contained in:
parent
9f5be3f97c
commit
8c39c03311
5 changed files with 11 additions and 5 deletions
|
@ -190,7 +190,10 @@ void Debugger::ProcessEvent(EventType type)
|
|||
switch(type) {
|
||||
case EventType::Nmi: _eventManager->AddEvent(DebugEventType::Nmi); break;
|
||||
case EventType::Irq: _eventManager->AddEvent(DebugEventType::Irq); break;
|
||||
case EventType::StartFrame: _eventManager->ClearFrameEvents(); break;
|
||||
case EventType::StartFrame:
|
||||
_console->GetNotificationManager()->SendNotification(ConsoleNotificationType::EventViewerRefresh);
|
||||
_eventManager->ClearFrameEvents();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ void EventManager::TakeEventSnapshot(EventViewerDisplayOptions options)
|
|||
|
||||
_snapshot = _debugEvents;
|
||||
_snapshotScanline = scanline;
|
||||
if(options.ShowPreviousFrameEvents) {
|
||||
if(options.ShowPreviousFrameEvents && scanline != 0) {
|
||||
for(DebugEventInfo &evt : _prevDebugEvents) {
|
||||
uint32_t evtKey = (evt.Scanline << 9) + evt.Cycle;
|
||||
if(evtKey > key) {
|
||||
|
@ -174,13 +174,14 @@ void EventManager::GetDisplayBuffer(uint32_t *buffer, EventViewerDisplayOptions
|
|||
}
|
||||
|
||||
constexpr uint32_t nmiColor = 0xFF55FFFF;
|
||||
constexpr uint32_t currentScanlineColor = 0xFFFFFF55;
|
||||
int nmiScanline = (overscanMode ? 240 : 225) * 2 * 340 * 2;
|
||||
uint32_t scanlineOffset = _snapshotScanline * 2 * 340 * 2;
|
||||
for(int i = 0; i < 340 * 2; i++) {
|
||||
buffer[nmiScanline + i] = nmiColor;
|
||||
buffer[nmiScanline + 340 * 2 + i] = nmiColor;
|
||||
buffer[scanlineOffset + i] = nmiColor;
|
||||
buffer[scanlineOffset + 340 * 2 + i] = nmiColor;
|
||||
buffer[scanlineOffset + i] = currentScanlineColor;
|
||||
buffer[scanlineOffset + 340 * 2 + i] = currentScanlineColor;
|
||||
}
|
||||
|
||||
for(DebugEventInfo &evt : _snapshot) {
|
||||
|
|
|
@ -17,6 +17,7 @@ enum class ConsoleNotificationType
|
|||
EmulationStopped = 11,
|
||||
BeforeEmulationStop = 12,
|
||||
ViewerRefresh = 13,
|
||||
EventViewerRefresh = 14
|
||||
};
|
||||
|
||||
class INotificationListener
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Mesen.GUI.Debugger
|
|||
{
|
||||
switch(e.NotificationType) {
|
||||
case ConsoleNotificationType.CodeBreak:
|
||||
case ConsoleNotificationType.PpuFrameDone:
|
||||
case ConsoleNotificationType.EventViewerRefresh:
|
||||
ctrlPpuView.RefreshData();
|
||||
this.BeginInvoke((Action)(() => {
|
||||
ctrlPpuView.RefreshViewer();
|
||||
|
|
|
@ -61,5 +61,6 @@ namespace Mesen.GUI
|
|||
EmulationStopped = 11,
|
||||
BeforeEmulationStop = 12,
|
||||
ViewerRefresh = 13,
|
||||
EventViewerRefresh = 14,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue