Skip to content

Commit

Permalink
VOYEUR: Fix the new password behavior (still not saved, just as in th…
Browse files Browse the repository at this point in the history
…e original)
  • Loading branch information
Strangerke committed Mar 4, 2014
1 parent c6467bc commit 4e68a67
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions engines/voyeur/voyeur.cpp
Expand Up @@ -278,7 +278,6 @@ bool VoyeurEngine::doLock() {

bool firstLoop = true;
bool breakFlag = false;
bool flag = false;
while (!breakFlag && !shouldQuit()) {
(*_graphicsManager->_vPort)->setupViewPort();
flipPageAndWait();
Expand Down Expand Up @@ -340,24 +339,16 @@ bool VoyeurEngine::doLock() {
}
} else if (key == 10) {
// Accept key
if (!flag) {
if ((password.empty() && displayString.empty()) || (password == displayString)) {
breakFlag = true;
result = true;
break;
}
} else {
if (displayString.size() > 0) {
result = true;
breakFlag = true;
break;
}
if ((password.empty() && displayString.empty()) || (password == displayString)) {
breakFlag = true;
result = true;
break;
}
} else if (key == 11) {
// New code
if ((password.empty() && displayString.empty()) || (password != displayString)) {
(*_graphicsManager->_vPort)->setupViewPort();
flag = true;
password = displayString;
displayString = "";
continue;
}
Expand Down

0 comments on commit 4e68a67

Please sign in to comment.