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

neuromancer noreply at scummvm.org
Sun Mar 19 22:29:14 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:
a7bc824605 FREESCAPE: basic support for joystick events


Commit: a7bc8246055850792fc6db47266461fb8b91df97
    https://github.com/scummvm/scummvm/commit/a7bc8246055850792fc6db47266461fb8b91df97
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-19T23:30:10+01:00

Commit Message:
FREESCAPE: basic support for joystick events

Changed paths:
    engines/freescape/freescape.cpp


diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index d91f73ddc3c..af8278fcbca 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -372,6 +372,25 @@ void FreescapeEngine::processInput() {
 		}
 
 		switch (event.type) {
+		case Common::EVENT_JOYBUTTON_DOWN:
+			if (_hasFallen)
+				break;
+			switch (event.joystick.button) {
+			case Common::JOYSTICK_BUTTON_B:
+			case Common::JOYSTICK_BUTTON_DPAD_UP:
+				move(kForwardMovement, _scaleVector.x(), deltaTime);
+				break;
+			case Common::JOYSTICK_BUTTON_DPAD_DOWN:
+				move(kBackwardMovement, _scaleVector.x(), deltaTime);
+				break;
+			case Common::JOYSTICK_BUTTON_DPAD_LEFT:
+				move(kLeftMovement, _scaleVector.y(), deltaTime);
+				break;
+			case Common::JOYSTICK_BUTTON_DPAD_RIGHT:
+				move(kRightMovement, _scaleVector.y(), deltaTime);
+				break;
+			}
+		break;
 		case Common::EVENT_KEYDOWN:
 			if (_hasFallen)
 				break;




More information about the Scummvm-git-logs mailing list