Allow a machine's 'resume' property to be set by the web page, not just the machine file

This commit is contained in:
Jeff Parsons 2017-01-28 23:24:09 -08:00 committed by Jeff Parsons
commit 82a8b81b3e

View file

@ -24,6 +24,7 @@ The following optional machine properties will be added to the 'parms' property:
'autoPower' (eg, true)
'autoStart' (eg, true)
'drives' (eg, '[{name:"68Mb Hard Disk",type:4,path:"http://archive.pcjs.org/disks/pc/fixed/68mb/win95.json"}]')
'resume' (eg, "1")
'state' (eg, "state.json")
'messages' (eg, "fault")
'connection' (eg, "serialPort->vt100a.serialPort")
@ -100,7 +101,7 @@ of our Markdown or XML documents. Examples: 'automount' becomes 'autoMount', 'a
{% else %}
{% assign machine_template = machine.template %}
{% endunless %}
{% capture machine_parms %}{{ site.left_brace }}autoMount:{{ machine_autoMount }}{{ machine_autoPower }}{{ machine_autoStart }}{{ machine_drives }},state:"{{ machine.state }}",messages:"{{ machine.messages }}",connection:"{{ machine.connection }}"{{ site.right_brace }}{% endcapture %}
{% capture machine_parms %}{{ site.left_brace }}autoMount:{{ machine_autoMount }}{{ machine_autoPower }}{{ machine_autoStart }}{{ machine_drives }},resume:"{{ machine.resume }}",state:"{{ machine.state }}",messages:"{{ machine.messages }}",connection:"{{ machine.connection }}"{{ site.right_brace }}{% endcapture %}
{% if site.pcjs.compiled == true and machine.uncompiled != true %}
{% capture machine_script %}<!--suppress BadExpressionStatementJS -->
<script type="text/javascript" src="{{ site.baseurl }}/versions/{{ machine_app }}/{{ site.pcjs.version }}/{{ machine_file }}.js"></script>{% endcapture %}