aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorStrangerke2014-03-04 08:26:37 +0100
committerStrangerke2014-03-04 08:26:37 +0100
commit4e68a6761363ba62c8e7d20995727cdc4a93831f (patch)
tree0d4d320ef83f474d34e673ceaf4bb7ab320661b0 /engines/voyeur
parentc6467bcc1dbe1a2c812904c026c4ac062149823c (diff)
downloadscummvm-rg350-4e68a6761363ba62c8e7d20995727cdc4a93831f.tar.gz
scummvm-rg350-4e68a6761363ba62c8e7d20995727cdc4a93831f.tar.bz2
scummvm-rg350-4e68a6761363ba62c8e7d20995727cdc4a93831f.zip
VOYEUR: Fix the new password behavior (still not saved, just as in the original)
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/voyeur.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 24752a1b1d..6af57c6201 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -278,7 +278,6 @@ bool VoyeurEngine::doLock() {
bool firstLoop = true;
bool breakFlag = false;
- bool flag = false;
while (!breakFlag && !shouldQuit()) {
(*_graphicsManager->_vPort)->setupViewPort();
flipPageAndWait();
@@ -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;
}