mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Increase number of supported joystick buttons.
Also fix a bug where despite supporting 32 buttons, only 18 were actually supported, and a similar issue for the number of axes. My saitek x52 has 34 buttons and 10 axes. Whee.
This commit is contained in:
parent
512514ca23
commit
d1f1375df5
3 changed files with 66 additions and 2 deletions
|
@ -31,8 +31,8 @@
|
|||
#include <QF/qtypes.h>
|
||||
#include "QF/quakeio.h"
|
||||
|
||||
#define JOY_MAX_AXES 8
|
||||
#define JOY_MAX_BUTTONS 18
|
||||
#define JOY_MAX_AXES 32
|
||||
#define JOY_MAX_BUTTONS 64
|
||||
|
||||
extern struct cvar_s *joy_device; // Joystick device name
|
||||
extern struct cvar_s *joy_enable; // Joystick enabling flag
|
||||
|
|
|
@ -409,6 +409,38 @@ typedef enum {
|
|||
QFJ_BUTTON30,
|
||||
QFJ_BUTTON31,
|
||||
QFJ_BUTTON32,
|
||||
QFJ_BUTTON33,
|
||||
QFJ_BUTTON34,
|
||||
QFJ_BUTTON35,
|
||||
QFJ_BUTTON36,
|
||||
QFJ_BUTTON37,
|
||||
QFJ_BUTTON38,
|
||||
QFJ_BUTTON39,
|
||||
QFJ_BUTTON40,
|
||||
QFJ_BUTTON41,
|
||||
QFJ_BUTTON42,
|
||||
QFJ_BUTTON43,
|
||||
QFJ_BUTTON44,
|
||||
QFJ_BUTTON45,
|
||||
QFJ_BUTTON46,
|
||||
QFJ_BUTTON47,
|
||||
QFJ_BUTTON48,
|
||||
QFJ_BUTTON49,
|
||||
QFJ_BUTTON50,
|
||||
QFJ_BUTTON51,
|
||||
QFJ_BUTTON52,
|
||||
QFJ_BUTTON53,
|
||||
QFJ_BUTTON54,
|
||||
QFJ_BUTTON55,
|
||||
QFJ_BUTTON56,
|
||||
QFJ_BUTTON57,
|
||||
QFJ_BUTTON58,
|
||||
QFJ_BUTTON59,
|
||||
QFJ_BUTTON60,
|
||||
QFJ_BUTTON61,
|
||||
QFJ_BUTTON62,
|
||||
QFJ_BUTTON63,
|
||||
QFJ_BUTTON64,
|
||||
|
||||
//
|
||||
// joystick axes (for button emulation without consuming buttons)
|
||||
|
|
|
@ -442,6 +442,38 @@ keyname_t keynames[] = {
|
|||
{ "J_BUTTON30", QFJ_BUTTON30 },
|
||||
{ "J_BUTTON31", QFJ_BUTTON31 },
|
||||
{ "J_BUTTON32", QFJ_BUTTON32 },
|
||||
{ "J_BUTTON33", QFJ_BUTTON33 },
|
||||
{ "J_BUTTON34", QFJ_BUTTON34 },
|
||||
{ "J_BUTTON35", QFJ_BUTTON35 },
|
||||
{ "J_BUTTON36", QFJ_BUTTON36 },
|
||||
{ "J_BUTTON37", QFJ_BUTTON37 },
|
||||
{ "J_BUTTON38", QFJ_BUTTON38 },
|
||||
{ "J_BUTTON39", QFJ_BUTTON39 },
|
||||
{ "J_BUTTON40", QFJ_BUTTON40 },
|
||||
{ "J_BUTTON41", QFJ_BUTTON41 },
|
||||
{ "J_BUTTON42", QFJ_BUTTON42 },
|
||||
{ "J_BUTTON43", QFJ_BUTTON43 },
|
||||
{ "J_BUTTON44", QFJ_BUTTON44 },
|
||||
{ "J_BUTTON45", QFJ_BUTTON45 },
|
||||
{ "J_BUTTON46", QFJ_BUTTON46 },
|
||||
{ "J_BUTTON47", QFJ_BUTTON47 },
|
||||
{ "J_BUTTON48", QFJ_BUTTON48 },
|
||||
{ "J_BUTTON49", QFJ_BUTTON49 },
|
||||
{ "J_BUTTON50", QFJ_BUTTON50 },
|
||||
{ "J_BUTTON51", QFJ_BUTTON51 },
|
||||
{ "J_BUTTON52", QFJ_BUTTON52 },
|
||||
{ "J_BUTTON53", QFJ_BUTTON53 },
|
||||
{ "J_BUTTON54", QFJ_BUTTON54 },
|
||||
{ "J_BUTTON55", QFJ_BUTTON55 },
|
||||
{ "J_BUTTON56", QFJ_BUTTON56 },
|
||||
{ "J_BUTTON57", QFJ_BUTTON57 },
|
||||
{ "J_BUTTON58", QFJ_BUTTON58 },
|
||||
{ "J_BUTTON59", QFJ_BUTTON59 },
|
||||
{ "J_BUTTON60", QFJ_BUTTON60 },
|
||||
{ "J_BUTTON61", QFJ_BUTTON61 },
|
||||
{ "J_BUTTON62", QFJ_BUTTON62 },
|
||||
{ "J_BUTTON63", QFJ_BUTTON63 },
|
||||
{ "J_BUTTON64", QFJ_BUTTON64 },
|
||||
|
||||
{ "J_AXIS1", QFJ_AXIS1 },
|
||||
{ "J_AXIS2", QFJ_AXIS2 },
|
||||
|
|
Loading…
Reference in a new issue