Instead of hard-coding the 'resume' setting inside individual machine files, we now support a 'resume' setting inside a page's machine properties

This commit is contained in:
Jeff Parsons 2017-01-28 23:39:03 -08:00 committed by Jeff Parsons
commit df5eb66429
13 changed files with 23 additions and 25 deletions

View file

@ -206,12 +206,10 @@ class Computer8080 extends Component {
}
var sStatePath = null;
var sResume = parmsComputer['resume'];
var sResume = this.getMachineParm('resume', parmsComputer);
if (sResume !== undefined) {
/*
* DEPRECATE: This goofiness is a holdover from when the 'resume' property was a string (either a
* single-digit string or a path); now it's always a number, so it never has a 'length' property and
* the call to parseInt() is unnecessary.
* Decide whether the 'resume' property is a number or the path of a state file to resume.
*/
if (sResume.length > 1) {
sStatePath = this.sResumePath = sResume;

View file

@ -231,9 +231,7 @@ function Computer(parmsComputer, parmsMachine, fSuspended) {
var sResume = parmsComputer['resume'];
if (sResume !== undefined) {
/*
* DEPRECATE: This goofiness is a holdover from when the 'resume' property was a string (either a
* single-digit string or a path); now it's always a number, so it never has a 'length' property and
* the call to parseInt() is unnecessary.
* Decide whether the 'resume' property is a number or the path of a state file to resume.
*/
if (sResume.length > 1) {
sStatePath = this.sResumePath = sResume;

View file

@ -195,12 +195,10 @@ class ComputerPDP11 extends Component {
}
var sStatePath = null;
var sResume = this.getMachineParm('resume', parmsComputer);
var sResume = /** @type {string} */ (this.getMachineParm('resume', parmsComputer));
if (sResume !== undefined) {
/*
* DEPRECATE: This goofiness is a holdover from when the 'resume' property was a string (either a
* single-digit string or a path); now it's always a number, so it never has a 'length' property and
* the call to parseInt() is unnecessary.
* Decide whether the 'resume' property is a number or the path of a state file to resume.
*/
if (sResume.length > 1) {
sStatePath = this.sResumePath = sResume;