diff options
author | Simon Howard | 2011-01-12 23:22:20 +0000 |
---|---|---|
committer | Simon Howard | 2011-01-12 23:22:20 +0000 |
commit | 5130b54658ab03f3fc18727615b529d6e241566c (patch) | |
tree | 3999f4d7f61ad9e1e921fc7963367391f75ca702 | |
parent | b18d59086a504e54bba901037bd80908ed9a5acd (diff) | |
download | chocolate-doom-5130b54658ab03f3fc18727615b529d6e241566c.tar.gz chocolate-doom-5130b54658ab03f3fc18727615b529d6e241566c.tar.bz2 chocolate-doom-5130b54658ab03f3fc18727615b529d6e241566c.zip |
Fix menu navigation when using joystick / joypad (thanks AlexXav).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2237
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | src/m_menu.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +1.6.0 (2011-??-??): + + Bugs fixed: + * Menu navigation when using joystick/joypad (thanks AlexXav). + 1.5.0 (2011-01-02): Big changes in this version: diff --git a/src/m_menu.c b/src/m_menu.c index 7b1c5a6e..efc4fefe 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1450,23 +1450,23 @@ boolean M_Responder (event_t* ev) if (ev->type == ev_joystick && joywait < I_GetTime()) { - if (ev->data3 == -1) + if (ev->data3 < 0) { key = key_menu_up; joywait = I_GetTime() + 5; } - else if (ev->data3 == 1) + else if (ev->data3 > 0) { key = key_menu_down; joywait = I_GetTime() + 5; } - if (ev->data2 == -1) + if (ev->data2 < 0) { key = key_menu_left; joywait = I_GetTime() + 2; } - else if (ev->data2 == 1) + else if (ev->data2 > 0) { key = key_menu_right; joywait = I_GetTime() + 2; |