Commit graph

109 commits

Author SHA1 Message Date
bsmiles32
4476c7ad56
Revert "Update Present field in GetKeys function." 2018-02-20 08:09:46 +01:00
Bobby Smiles
fb68d74829 Update Present field in GetKeys function. 2018-02-15 23:29:20 +01:00
Anthony J. Bentley
52fd15b4c0 Update homepage. 2018-01-01 17:46:33 +01:00
Richard Goedeken
3e00ab8f93 remove the ApplyAxisLimits function for now. If we run into problems with games due to over-excursion of joystick position in the corners, then we'll have to add it back in and try and find a happy medium 2017-11-07 20:42:25 -08:00
Logan
854a79353a Increase deadzone for axis->N64 button mappings 2017-10-13 21:48:59 -06:00
Richard Goedeken
4cc411b724 Merge pull request #45 from loganmc10/tp
Don't set "plugin" as part of autoconfig
2017-09-23 20:22:58 -07:00
Logan McNaughton
e1b542b85c Don't set "plugin" as part of autoconfig 2017-09-23 19:46:12 -06:00
Logan
0afa0cd722 Re-attach joystick if it has disconnected 2017-09-19 12:55:18 -06:00
Richard Goedeken
cf02a743e1 tweak the ApplyAxisLimits function to avoid causing problems mentioned in mupen64plus-input-sdl issue #46 and mupen64plus-user-issues issue #681. Instead of limiting joystick values to 87% of the axis limit on the cardinal directions N/S/E/W, we allow them to reach 100% 2017-09-04 21:11:21 -07:00
Richard Goedeken
6189125766 experimental change: apply a pair of radius-limiting quadratic functions to the joystick X,Y coordinate values, so that instead of allowing them to have values in the full +/- 80 range for each axis, they are restricted to approximately the same area as that which is physically allowed by the controller case on a real N64 controller 2016-10-18 20:17:55 -07:00
Richard Goedeken
d9fff1dd51 fix for issue #152 in github issue tracker for mupen64plus-core 2016-03-16 22:14:25 -07:00
Richard Goedeken
06d4271cf3 fix bug whereby a more general controller name in the inputautocfg file (such as OSX: Controller) which appeared earier in the file would be used instead of a more specific name found later. Now we score the name matches such that each matching word is worth 4 points, an OS-specific section is worth 1 point, and the XInput specific section is worth 2 points. The matching config section with the highest points is used, which fixes this bug 2015-06-03 23:29:48 -07:00
Richard Goedeken
bc61822c19 update text files and version number for upcoming 2.5 release 2015-04-26 12:30:51 -07:00
Conchúr Navid
0af22c499f Add missing includes and forward declarations 2015-03-21 13:47:40 +01:00
Conchúr Navid
2f3f97f848 Sort the includes based on type and names 2015-03-21 10:58:28 +01:00
Conchúr Navid
40124bf0ae Fix executable bits of files 2015-03-21 10:58:11 +01:00
Bobby Smiles
f3be3692d1 Fix const correctness warning. 2015-03-19 18:31:31 +01:00
Conchúr Navid
ac5b81b8a1 Check if the size calculation for config file failed 2015-03-03 12:14:37 +01:00
Fayvel Victor
e56de36cd4 Fix SDL2 build regression caused by undefined Key usage
3e075586ea ("To prevent undesirable release of
analogue joystick while using touchpad.") used SDLK_LSUPER from SDL1.2 which is
not used anymore in mupen64plus-input-sdl. Instead SDL2 keys must be used and
only the SDL1.2 compatibility wrapper can reference SDLK_*
2014-07-06 13:29:41 +02:00
Richard Goedeken
487b64256c fix comment and add special modifier key notes in README 2014-07-05 22:01:44 -07:00
s-verma
3e075586ea To prevent undesirable release of analogue joystick while using touchpad.
While playing FPS game like Goldeneye, The World is not Enough etc with touchpad, the cursor/crosshair/crosswire tries to return to origin/centre thus preventing player to set it to target hence shoot it. Now this can be prevented by pressing Left Window Key, then moving cursor through touchpad.
2014-07-01 16:14:33 +05:30
Sven Eckelmann
4af586cec6 Force line ending type for specific files
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.

Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
2013-12-19 14:19:06 +01:00
Richard Goedeken
719fd6afeb bugfix: fall back to key/joy mappings for a controller with mouse=true when the mouse is not grabbed 2013-11-14 19:01:56 -08:00
Richard Goedeken
61653ce443 merged heads 2013-07-04 18:10:22 -07:00
Richard Goedeken
32b60e0a09 merged heads 2013-07-04 18:09:06 -07:00
Richard Goedeken
10411f6f0c merged heads 2013-07-04 18:04:20 -07:00
Richard Goedeken
03050e918b merged heads 2013-07-04 18:01:41 -07:00
Richard Goedeken
d9c3bf701b update version number to 2.0 2013-07-03 07:07:00 -07:00
Richard Goedeken
c0a1126f20 fix auto-config use case problem that was brought by sn0w75 on IRC: if user has 2 SDL joysticks, everything set to auto, and first SDL joystick has no valid auto-config but second joystick does, then the second joystick will be set up as N64 controller #2 instead of #1 2013-06-28 00:16:56 -07:00
Sven Eckelmann
589290fa4c Allow to read multiple entries from autoconfig
SDL2.0 introduces a new input backend for XInput devices. These have a
different layout (buttons, axis, hats, ...) than the previous backends. This
makes the current AutoConfig entries for such devices useless. Unfortunatelly,
SDL2 doesn't inform us about the backend used to talk to a joystick/gamepad.
This makes it hard to decide whether we must search for an entry without
prefix, with Win32 prefix or with a new "XInput" prefix.

Instead the whole ini is parsed and it is not stopped when a section with a
valid entry is finished. Priorities are saved to decide whether a new found
section is interesting for the user config or not. Entries without a known
prefix have the priority 3, one with a known entry have the priority 2 and
entries with the prefix "XInput" get the priority of 1 on windows with SDL2.
The lowest priority is always preferred.

This allows the autoconfiguration to use XInput configs whenever it is
required and use the old configurations everywhere else.
2013-06-27 20:39:54 +02:00
Sven Eckelmann
69cdefe31e Reduce auto_set_defaults complexity by moving name comparison to extra function 2013-06-27 20:39:54 +02:00
Richard Goedeken
0b24022e9d update text files for upcoming 2.0 release 2013-06-26 21:25:33 -07:00
Sven Eckelmann
97c245d47b Use SDL_HapticRumble* instead of creating own effects 2013-06-26 21:08:25 +02:00
Sven Eckelmann
bc7d3057f2 Use SDL2 to play force feedback effects 2013-06-23 11:10:26 +02:00
Sven Eckelmann
4b90486595 Add support for mouse based analog stick using SDL2 2013-06-23 10:26:03 +02:00
Sven Eckelmann
7f379fe044 Use SDL1.2 keysym in the config when using SDL2
It is easier for a user to keep the old SDL1.2 values for the keys in the
config instead of converting them by hand. This is extreme important when the
default (automatic) config is used.
2013-06-22 14:40:18 +02:00
Sven Eckelmann
504091486b Fix size of ff effect arrays
The plugin allows to use 4 input devices but only space for the force feedback
effects of 3 devices were provided. A fourth device with force feedback support
caused an invalid access.
2013-06-12 23:07:18 +02:00
Riley Labrecque
de27c85d42 Fixed compiling with MSVC/C89 2013-05-28 08:41:53 +00:00
Richard Goedeken
4b219a55fc complete re-write of the input plugin auto-configuration logic. add new config section parameter called mode 2013-05-19 10:37:15 -07:00
Sven Eckelmann
3bf82b2ee6 Fix autoconfiguration with SDL 2.0
The name of the Joystick device is automatically set back to '' when
SDL_JoystickClose(...) is called. The compability wrapper has to store the name
inside a private buffer to provide a similar functionality like pre-SDL2.0
versions of SDL_JoystickName.
2012-12-20 17:03:45 +01:00
Sven Eckelmann
76fcac1887 Allow to compile against SDL2
The Grab API of SDL now needs the SDL_Window to work. This information is not
provided by Mupen64Plus and therefore such functionality is currently disabled
when building against SDL 2.0. Further adjustments of the Mupen64plus API
should consider moving this functionality do a different part which has access
to all necessary informations.

The Joystick API only changed in such way that it is possible to use a
compatibility wrapper.
2012-12-16 19:57:26 +01:00
Sven Eckelmann
0963108e68 Add support for SDL 1.3
SDL 1.3 separated KeyCodes and ScanCodes in its API. The new names for the
scancodes can therefore be easier "backported" than the old name which would be
conflict with the still existing KeyCodes. A simple compatible wrapper is
enough to allow coexistense of SDL 1.2 and SDL 1.3 code.
2012-12-16 19:57:26 +01:00
Richard Goedeken
e0bf0aa969 more specific parameter comment based on feedback from issue 489 2012-04-08 09:56:05 -07:00
Richard Goedeken
d69d5860bf issue 486: change warning message (SDL joystick not available) to VERBOSE 2012-04-08 09:42:23 -07:00
Richard Goedeken
1ba09463f3 updating version and release info for v1.99.5 tag 2012-03-10 09:53:43 -08:00
Richard Goedeken
2f162a842e fixed issue #392: when switching between rumble pak and memory pak, simulate removing the pack, waiting 1 second, then inserting the new one 2012-03-04 08:57:00 -08:00
Richard Goedeken
60072cd77c homogenized xbox 360 controller auto-configs, issue 478, from DaFox 2012-02-25 07:20:59 -08:00
Richard Goedeken
80bdef7b09 added version number to SDL Input plugin parameters. starting at 1.00 2011-12-18 22:20:43 -08:00
Richard Goedeken
fe6b3bcb61 1. more descriptive return value from load_controller_config(). 2. if 'name' config parameter is missing or an empty string, do not impose SDL joystick name matching constraint 2011-12-17 13:16:55 -08:00
Richard Goedeken
b4d991cdc5 fixed issue 424 - now the SDL device number and N64 controller index are handled separately 2011-12-12 22:26:01 -08:00