aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/input.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2010-06-13 07:35:48 +0000
committerNicola Mettifogo2010-06-13 07:35:48 +0000
commitd1993773880143d234f3355dd5a03f778e35b78c (patch)
tree8675af1ea999530f58c87f25fb91f7a00c67504c /engines/parallaction/input.cpp
parenteff1d4bb1c2e1a33946c7333c3d28f38dfdcb5e8 (diff)
downloadscummvm-rg350-d1993773880143d234f3355dd5a03f778e35b78c.tar.gz
scummvm-rg350-d1993773880143d234f3355dd5a03f778e35b78c.tar.bz2
scummvm-rg350-d1993773880143d234f3355dd5a03f778e35b78c.zip
When closing inventory, do not force input back to game-mode if commands need otherwise.
svn-id: r49623
Diffstat (limited to 'engines/parallaction/input.cpp')
-rw-r--r--engines/parallaction/input.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index d6dd9feb19..6d3f6f0b04 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -395,7 +395,7 @@ void Input::exitInventoryMode() {
_vm->dropItem(z->u._mergeObj1);
_vm->dropItem(z->u._mergeObj2);
_vm->addInventoryItem(z->u._mergeObj3);
- _vm->_cmdExec->run(z->_commands);
+ _vm->_cmdExec->run(z->_commands); // commands might set a new _inputMode
}
}
@@ -412,7 +412,11 @@ void Input::exitInventoryMode() {
}
_vm->resumeJobs();
- _inputMode = kInputModeGame;
+ // in case the input mode was not changed by the code above (especially by the commands
+ // executed in case of a merge), then assume we are going back to game mode
+ if (_inputMode == kInputModeInventory) {
+ _inputMode = kInputModeGame;
+ }
}
bool Input::updateInventoryInput() {