[Scummvm-git-logs] scummvm branch-2-7 -> 2aa44802827c691cf6f986cb40a84a4bde3e189b

sev- noreply at scummvm.org
Thu Jan 26 10:02:50 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2aa4480282 SCUMM: INPUT: Don't subsitute clicks in HE games.


Commit: 2aa44802827c691cf6f986cb40a84a4bde3e189b
    https://github.com/scummvm/scummvm/commit/2aa44802827c691cf6f986cb40a84a4bde3e189b
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-01-26T11:02:41+01:00

Commit Message:
SCUMM: INPUT: Don't subsitute clicks in HE games.

These (later) games can have scripts that accept Enter and Tab keys.

Changed paths:
    engines/scumm/input.cpp


diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 4d839137e63..ac99925d29d 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -1378,11 +1378,14 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 
 	// The original interpreters allowed the usage of the Enter key as a substitute for left mouse click,
 	// and the Tab key as a substitute for right click; while v7-8 games handle this substitution via
-	// scripts, we have to do this manually for the other games.
-	if (_mouseAndKeyboardStat == Common::KEYCODE_RETURN && _cursor.state > 0 && _game.version <= 6) {
-		_mouseAndKeyboardStat = MBS_LEFT_CLICK;
-	} else if (_mouseAndKeyboardStat == Common::KEYCODE_TAB && _cursor.state > 0 && _game.version >= 4 && _game.version <= 6) {
-		_mouseAndKeyboardStat = MBS_RIGHT_CLICK;
+	// scripts, we have to do this manually for the other games.  We don't want to do this for (later)
+	// HE games, since they can sometimes have scripts that accept Enter and Tab keys.
+	if (_game.heversion < 71) {
+		if (_mouseAndKeyboardStat == Common::KEYCODE_RETURN && _cursor.state > 0 && _game.version <= 6) {
+			_mouseAndKeyboardStat = MBS_LEFT_CLICK;
+		} else if (_mouseAndKeyboardStat == Common::KEYCODE_TAB && _cursor.state > 0 && _game.version >= 4 && _game.version <= 6) {
+			_mouseAndKeyboardStat = MBS_RIGHT_CLICK;
+		}
 	}
 }
 




More information about the Scummvm-git-logs mailing list