aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/EventMapper.cpp6
-rw-r--r--engines/pegasus/input.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp
index f84d24b4d0..203a6e04ec 100644
--- a/common/EventMapper.cpp
+++ b/common/EventMapper.cpp
@@ -73,6 +73,12 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
#endif
}
+ if (ev.type == EVENT_JOYBUTTON_DOWN) {
+ if (ev.joystick.button == JOYSTICK_BUTTON_START || ev.joystick.button == JOYSTICK_BUTTON_GUIDE) {
+ mappedEvent.type = EVENT_MAINMENU;
+ }
+ }
+
// if it didn't get mapped, just pass it through
if (mappedEvent.type == EVENT_INVALID)
mappedEvent = ev;
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp
index 50267ae767..6738ad4251 100644
--- a/engines/pegasus/input.cpp
+++ b/engines/pegasus/input.cpp
@@ -190,7 +190,7 @@ uint InputDeviceManager::convertJoystickToKey(uint joybutton) {
return Common::KEYCODE_TILDE; // Open Inventory Panel
case Common::JOYSTICK_BUTTON_RIGHT_SHOULDER:
return Common::KEYCODE_KP_MULTIPLY; // Open Biochip Panel
- case Common::JOYSTICK_BUTTON_START:
+ case Common::JOYSTICK_BUTTON_BACK:
return Common::KEYCODE_p; // Pause
case Common::JOYSTICK_BUTTON_DPAD_UP:
return Common::KEYCODE_UP;