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:
parent
7157c7e7b8
commit
df5eb66429
13 changed files with 23 additions and 25 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue