Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Let's try to tone down the alerts when 'resume' is set to AUTO (1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpar committed Jun 27, 2017
1 parent 66cf6b6 commit 26bf113
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 70 deletions.
42 changes: 21 additions & 21 deletions docs/pcx86/examples/pcx86-dbg.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/pcx86/examples/pcx86.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions modules/pcx86/lib/computer.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,11 @@ class Computer extends Component {
* may have happened the last time around.
*/
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);

if (this.stateFailSafe.load()) {
if (this.powerReport(stateComputer)) {
if (resume != Computer.RESUME_AUTO && this.powerReport(stateComputer)) {
/*
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
* restore, the state will be removed.
* Prompt the user; if they decline to restore, the state will be removed.
*/
resume = Computer.RESUME_PROMPT;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/pcx86/lib/rom.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ROM extends Component {
doneLoad(sURL, sROMData, nErrorCode)
{
if (nErrorCode) {
this.notice("Unable to load system ROM (error " + nErrorCode + ": " + sURL + ")");
this.notice("Unable to load system ROM (error " + nErrorCode + ": " + sURL + ")", nErrorCode < 0);
return;
}

Expand Down
42 changes: 21 additions & 21 deletions versions/pcx86/1.35.1/pcx86-dbg.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion versions/pcx86/1.35.1/pcx86-dbg.map

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions versions/pcx86/1.35.1/pcx86-uncompiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -43155,7 +43155,7 @@ class ROM extends Component {
doneLoad(sURL, sROMData, nErrorCode)
{
if (nErrorCode) {
this.notice("Unable to load system ROM (error " + nErrorCode + ": " + sURL + ")");
this.notice("Unable to load system ROM (error " + nErrorCode + ": " + sURL + ")", nErrorCode < 0);
return;
}

Expand Down Expand Up @@ -74369,12 +74369,11 @@ class Computer extends Component {
* may have happened the last time around.
*/
this.stateFailSafe = new State(this, PCX86.APPVERSION, Computer.STATE_FAILSAFE);

if (this.stateFailSafe.load()) {
if (this.powerReport(stateComputer)) {
if (resume != Computer.RESUME_AUTO && this.powerReport(stateComputer)) {
/*
* We already know resume is something other than RESUME_NONE, so we'll go ahead and bump it
* all the way to RESUME_PROMPT, so that the user will be prompted, and if the user declines to
* restore, the state will be removed.
* Prompt the user; if they decline to restore, the state will be removed.
*/
resume = Computer.RESUME_PROMPT;
}
Expand Down
16 changes: 8 additions & 8 deletions versions/pcx86/1.35.1/pcx86.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion versions/pcx86/1.35.1/pcx86.map

Large diffs are not rendered by default.

0 comments on commit 26bf113

Please sign in to comment.