aboutsummaryrefslogtreecommitdiff
path: root/common/EventMapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/EventMapper.cpp')
-rw-r--r--common/EventMapper.cpp6
1 files changed, 6 insertions, 0 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;