1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-01 13:50:30 +00:00

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

View File

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