make sure display + serial is updated if advanceFrame() throws

This commit is contained in:
Steven Hugg 2023-12-30 15:24:57 -05:00
parent b160fb2ef2
commit 949e216c69
1 changed files with 12 additions and 8 deletions

View File

@ -873,15 +873,19 @@ export abstract class BaseMachinePlatform<T extends Machine> extends BaseDebugPl
advance(novideo:boolean) {
let trap = this.getDebugCallback();
var steps = this.machine.advanceFrame(trap);
if (!novideo && this.video) {
this.video.updateFrame();
this.updateVideoDebugger();
try {
var steps = this.machine.advanceFrame(trap);
return steps;
} finally {
// in case EmuHalt is thrown...
if (!novideo && this.video) {
this.video.updateFrame();
this.updateVideoDebugger();
}
if (!novideo && this.serialVisualizer) {
this.serialVisualizer.refresh();
}
}
if (!novideo && this.serialVisualizer) {
this.serialVisualizer.refresh();
}
return steps;
}
updateVideoDebugger() {