e45c28b3fb
Add KEY_JOY16 and KEY_JOY17 so dpad works in menu
91 lines
2.3 KiB
Diff
91 lines
2.3 KiB
Diff
diff --git a/src/common/menu/menu.cpp b/src/common/menu/menu.cpp
|
|
index 4532dae1d..8c394dc79 100644
|
|
--- a/src/common/menu/menu.cpp
|
|
+++ b/src/common/menu/menu.cpp
|
|
@@ -702,7 +702,7 @@ bool M_Responder (event_t *ev)
|
|
mkey = MKEY_Back;
|
|
break;
|
|
|
|
- case KEY_JOY4:
|
|
+ case KEY_JOY3:
|
|
case KEY_PAD_X:
|
|
mkey = MKEY_Clear;
|
|
break;
|
|
@@ -721,7 +721,7 @@ bool M_Responder (event_t *ev)
|
|
case KEY_PAD_LTHUMB_UP:
|
|
case KEY_JOYAXIS2MINUS:
|
|
case KEY_JOYPOV1_UP:
|
|
- case KEY_JOY9:
|
|
+ case KEY_JOY14:
|
|
mkey = MKEY_Up;
|
|
break;
|
|
|
|
@@ -729,7 +729,7 @@ bool M_Responder (event_t *ev)
|
|
case KEY_PAD_LTHUMB_DOWN:
|
|
case KEY_JOYAXIS2PLUS:
|
|
case KEY_JOYPOV1_DOWN:
|
|
- case KEY_JOY10:
|
|
+ case KEY_JOY15:
|
|
mkey = MKEY_Down;
|
|
break;
|
|
|
|
@@ -737,7 +737,7 @@ bool M_Responder (event_t *ev)
|
|
case KEY_PAD_LTHUMB_LEFT:
|
|
case KEY_JOYAXIS1MINUS:
|
|
case KEY_JOYPOV1_LEFT:
|
|
- case KEY_JOY11:
|
|
+ case KEY_JOY16:
|
|
mkey = MKEY_Left;
|
|
break;
|
|
|
|
@@ -745,7 +745,7 @@ bool M_Responder (event_t *ev)
|
|
case KEY_PAD_LTHUMB_RIGHT:
|
|
case KEY_JOYAXIS1PLUS:
|
|
case KEY_JOYPOV1_RIGHT:
|
|
- case KEY_JOY12:
|
|
+ case KEY_JOY17:
|
|
mkey = MKEY_Right;
|
|
break;
|
|
}
|
|
|
|
diff --git a/src/common/console/keydef.h b/src/common/console/keydef.h
|
|
index 971ab398f..726a2c432 100644
|
|
--- a/src/common/console/keydef.h
|
|
+++ b/src/common/console/keydef.h
|
|
@@ -68,20 +68,22 @@ enum EKeyCodes
|
|
|
|
KEY_FIRSTJOYBUTTON = 0x108,
|
|
KEY_JOY1 = KEY_FIRSTJOYBUTTON+0,
|
|
- KEY_JOY2,
|
|
- KEY_JOY3,
|
|
- KEY_JOY4,
|
|
- KEY_JOY5,
|
|
- KEY_JOY6,
|
|
- KEY_JOY7,
|
|
- KEY_JOY8,
|
|
- KEY_JOY9,
|
|
- KEY_JOY10,
|
|
- KEY_JOY11,
|
|
- KEY_JOY12,
|
|
- KEY_JOY13,
|
|
- KEY_JOY14,
|
|
- KEY_JOY15,
|
|
+ KEY_JOY2 = KEY_FIRSTJOYBUTTON+1,
|
|
+ KEY_JOY3 = KEY_FIRSTJOYBUTTON+2,
|
|
+ KEY_JOY4 = KEY_FIRSTJOYBUTTON+3,
|
|
+ KEY_JOY5 = KEY_FIRSTJOYBUTTON+4,
|
|
+ KEY_JOY6 = KEY_FIRSTJOYBUTTON+5,
|
|
+ KEY_JOY7 = KEY_FIRSTJOYBUTTON+6,
|
|
+ KEY_JOY8 = KEY_FIRSTJOYBUTTON+7,
|
|
+ KEY_JOY9 = KEY_FIRSTJOYBUTTON+8,
|
|
+ KEY_JOY10 = KEY_FIRSTJOYBUTTON+9,
|
|
+ KEY_JOY11 = KEY_FIRSTJOYBUTTON+10,
|
|
+ KEY_JOY12 = KEY_FIRSTJOYBUTTON+11,
|
|
+ KEY_JOY13 = KEY_FIRSTJOYBUTTON+12,
|
|
+ KEY_JOY14 = KEY_FIRSTJOYBUTTON+13,
|
|
+ KEY_JOY15 = KEY_FIRSTJOYBUTTON+14,
|
|
+ KEY_JOY16 = KEY_FIRSTJOYBUTTON+15,
|
|
+ KEY_JOY17 = KEY_FIRSTJOYBUTTON+16,
|
|
KEY_LASTJOYBUTTON = 0x187,
|
|
KEY_JOYPOV1_UP = 0x188,
|
|
KEY_JOYPOV1_RIGHT = 0x189,
|