1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-26 07:29:22 +00:00

check for saveState() on MAME

This commit is contained in:
Steven Hugg 2019-09-30 08:26:05 -05:00
parent 6753d9bf40
commit 2a41b6b1a1
2 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ function refreshWindowList() {
// add other tools
separate = true;
if (platform.disassemble) {
if (platform.disassemble && platform.saveState) {
addWindowItem("#disasm", "Disassembly", () => {
return new Views.DisassemblerView();
});

View File

@ -500,8 +500,8 @@ export class ListingView extends DisassemblerView implements ProjectView {
refresh(moveCursor: boolean) {
this.refreshListing();
if (!this.assemblyfile) return; // TODO?
var state = lastDebugState || platform.saveState(); // TODO?
if (!this.assemblyfile || !platform.saveState) return;
var state = lastDebugState || platform.saveState();
var pc = state.c ? (state.c.EPC || state.c.PC) : 0;
var asmtext = this.assemblyfile.text;
var disasmview = this.getDisasmView();