Merge branch 'master' into gh-pages
This commit is contained in:
commit
926b8e5e0f
9 changed files with 52 additions and 38 deletions
|
|
@ -351,6 +351,7 @@ MarkOut.aHTMLEntities = {
|
|||
* 'messages' (eg, "disk")
|
||||
* 'autopower' (eg, true)
|
||||
* 'autostart' (eg, true)
|
||||
* 'resume' (eg, "0", "1", "2", "3", or "state.json")
|
||||
*
|
||||
* and any other string-based property you wish to pass through to PCjs (via the embedPC() sParms parameter).
|
||||
*
|
||||
|
|
|
|||
|
|
@ -194,7 +194,20 @@ class ComputerPDP11 extends Component {
|
|||
if (component.initBus) component.initBus(this, this.bus, this.cpu, this.dbg);
|
||||
}
|
||||
|
||||
this.resume = /** @type {number} */ (this.getMachineParm('resume', parmsComputer, Str.TYPES.NUMBER, ComputerPDP11.RESUME_NONE));
|
||||
var sStatePath = null;
|
||||
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.
|
||||
*/
|
||||
if (sResume.length > 1) {
|
||||
sStatePath = this.sResumePath = sResume;
|
||||
} else {
|
||||
this.resume = parseInt(sResume, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The Computer 'state' property allows a state file to be specified independent of the 'resume' feature;
|
||||
|
|
@ -210,7 +223,7 @@ class ComputerPDP11 extends Component {
|
|||
* OVERRIDES everything; it overrides any 'state' Computer parameter AND it disables resume of any saved state in
|
||||
* localStorage (in other words, it prevents fAllowResume from being true, and forcing resume off).
|
||||
*/
|
||||
var fAllowResume, sStatePath = null;
|
||||
var fAllowResume;
|
||||
var sState = this.getMachineParm('state') || (fAllowResume = true) && parmsComputer['state'];
|
||||
|
||||
if (sState) {
|
||||
|
|
|
|||
|
|
@ -1376,7 +1376,7 @@
|
|||
<xsl:call-template name="component">
|
||||
<xsl:with-param name="machine" select="$machine"/>
|
||||
<xsl:with-param name="class">computer</xsl:with-param>
|
||||
<xsl:with-param name="parms">,autoPower:<xsl:value-of select="$autoPower"/>,busWidth:<xsl:value-of select="$busWidth"/>,resume:<xsl:value-of select="$resume"/>,state:'<xsl:value-of select="$state"/>'</xsl:with-param>
|
||||
<xsl:with-param name="parms">,autoPower:<xsl:value-of select="$autoPower"/>,busWidth:<xsl:value-of select="$busWidth"/>,resume:'<xsl:value-of select="$resume"/>',state:'<xsl:value-of select="$state"/>'</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue