From f0b710024a2820cd062163db29fddccc03cdf5a3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 19 Apr 2014 01:35:40 -0400 Subject: joystick: Add joystick button to toggle menu. When using a joystick or gamepad it's nice to be able to bring up the menu without having to reach for the keyboard. This makes modern gamepads more useful/usable. --- src/strife/m_menu.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/strife/m_menu.c') diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c index 7f4f18fc..bc365453 100644 --- a/src/strife/m_menu.c +++ b/src/strife/m_menu.c @@ -1778,6 +1778,11 @@ boolean M_Responder (event_t* ev) key = key_menu_back; joywait = I_GetTime() + 5; } + if (joybmenu >= 0 && (ev->data1 & (1 << joybmenu)) != 0) + { + key = key_menu_activate; + joywait = I_GetTime() + 5; + } } else { -- cgit v1.2.3