[Scummvm-cvs-logs] SF.net SVN: scummvm:[49623] scummvm/trunk/engines/parallaction/input.cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Jun 13 09:35:49 CEST 2010


Revision: 49623
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49623&view=rev
Author:   peres001
Date:     2010-06-13 07:35:48 +0000 (Sun, 13 Jun 2010)

Log Message:
-----------
When closing inventory, do not force input back to game-mode if commands need otherwise.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/input.cpp

Modified: scummvm/trunk/engines/parallaction/input.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/input.cpp	2010-06-13 07:17:44 UTC (rev 49622)
+++ scummvm/trunk/engines/parallaction/input.cpp	2010-06-13 07:35:48 UTC (rev 49623)
@@ -395,7 +395,7 @@
 			_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 @@
 	}
 	_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() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list