summaryrefslogtreecommitdiff
path: root/src/i_joystick.c
AgeCommit message (Collapse)Author
2015-02-20Refactor config file API.Simon Howard
The config file API previously relied on binding config variables using M_BindVariable() which took a void pointer. It occurred to me that if used on a boolean variable, this would be erroneous, but the void pointer would make it impossible to tell. Split this into separate M_Bind{Foo}Variable() functions based on type, which allows for proper type checking on the pointers that are passed. Vaguely related to #509.
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-04-30joystick: Add virtual-physical button mapping.Simon Howard
The solution to solving #386 is to add a layer of indirection: the game code can only support up to ~20 joystick buttons, but this doesn't matter as long as we never want to bind more than 20 buttons to actions anyway. Redefine the game's notion of buttons to be based on "virtual" joystick buttons, and map these buttons to physical (SDL) buttons based on configuration file variables.
2014-04-30joystick: Mask out bits for button axis buttons.Simon Howard
When a "button" is actually used as part of a button axis, don't include presses on the button as part of the buttons field posted in joystick events. This avoids situations where button 1 or 2 are part of a D-pad, breaking menu navigation (related to #389).
2014-04-28joystick: Add "hat axis" support.Simon Howard
Just as some controllers have D-pads that are presented as a set of buttons, some other controllers actually present their D-pads as joystick hats. Add "hat axis" support where the hat number and axis can be packed into a single integer value.
2014-04-28joystick: Increase 'dead zone' size.Simon Howard
The joystick dead zone is the range within which the joystick is interpreted as being centered. Increase this range significantly, as some controllers (eg. the PS2 controller + USB connector) can be very sensitive, leading to the player spinning randomly even when the stick is centered.
2014-04-28joystick: Add support for "button axes".Simon Howard
Some gamepads, notably the PS3 SIXAXIS controller, provide the D-pad not as a pair of axes, but rather as four separate buttons. Define a special axis numbering scheme that packs two button numbers into a single number, and allow an axis to be defined this way.
2014-04-19joystick: Add an axis to allow strafing.Simon Howard
Modern gamepads typically have 2-3 D-pads and joysticks. This means that it's desirable to be able to use one joystick for turning and another for strafing. Add another axis in addition to the current X and y axes that performs strafe movement.
2013-04-06Run I_ShutdownJoystick on exit (thanks Brad Harding).Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2591
2009-11-21Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1737
2009-09-30Change British English spellings to American English, for consistency.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1699
2008-09-11Refactor configuration file system to allow configuration file variablesSimon Howard
to be bound in a distributed fashion around the program. Remove dependency of m_config.c on doom/. Subversion-branch: /branches/raven-branch Subversion-revision: 1222
2008-09-07Move m_bbox.[ch] back to common (needed by v_video.c). Remove someSimon Howard
common->doom header dependencies. Subversion-branch: /branches/raven-branch Subversion-revision: 1211
2007-06-21Add a joystick dead zone for joysticks that don't have them.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 924
2007-06-14Don't send joystick updates when the joystick is disabled. Shut upSimon Howard
warning caused by missing header. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 904
2007-06-13Working joystick code.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 903
2007-06-01Display a meaningful message when trying to start with an invalidSimon Howard
Joystick ID. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 890
2007-05-31Initial joystick support.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 887