[Scummvm-git-logs] scummvm master -> 7d12bbaff0ccd007a2e5c3850bcc5f5d6ae2a27f

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


Commit: 7d12bbaff0ccd007a2e5c3850bcc5f5d6ae2a27f
    https://github.com/scummvm/scummvm/commit/7d12bbaff0ccd007a2e5c3850bcc5f5d6ae2a27f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-19T23:28:05+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 032af51e1b9..50df8756748 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -344,6 +344,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