Commit graph

396 commits

Author SHA1 Message Date
Richard Goedeken
d9c3bf701b update version number to 2.0 2013-07-03 07:07:00 -07:00
Bobby Smiles
b4521f6756 Remove unrelated content. 2013-06-29 19:42:10 +02: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
Richard Goedeken
9d899bc6aa update README and LICENSES files 2013-06-27 22:43:57 -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
14ecfc61bd Add CFLAGS -D_GNU_SOURCE to allow usage of strcasestr 2013-06-23 10:35:25 +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
gtrsdk
c5c1ff1fbd Add support for SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller 2013-06-20 07:11:53 +00: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
Richard Goedeken
22f22e1fd5 tagged v2.0-rc2 2013-06-01 18:00:33 -07:00
richard42
10cb4e4c04 Update msvc11 project file to visual studio 2012 (msvc11) 2013-06-01 07:56:09 -07:00
Richard Goedeken
844826f4b8 merged heads 2013-05-28 21:08:47 -07: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
d230fdd1a5 Allow to statically set SDL_(CFLAGS|LIBS) without sdl-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 12:26:14 +02:00
Sven Eckelmann
ced3b9cdb6 Enable Link-time optimization by default
The GCC introduced Link-time optimization in GCC 4.5 (2010-04-14). This should
be long enough available that interested users have upgraded to a compiler
supporting it.

The MSVC project already enabled WholeProgramOptimization since a long time.
Enabling it by default in GCC seems to be equally valid.
2013-05-11 11:25:50 +02:00
Sven Eckelmann
6f0c173c68 Add CFLAGS to the linker step
The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CFLAGS and added to LINK.o to fix the behavior.

Option which need this are for example -fPIC/-fPIE or -flto.
2013-05-11 10:58:16 +02:00
Richard Goedeken
6771dc1e32 add Mayflash N64 adapter controller mapping for Windows from Tony971. 2013-04-15 22:27:46 -07:00
Richard Goedeken
67f2d3b316 add msvc11 project file from mudlord 2013-03-20 22:25:49 -07:00
richard42
47c9b2dd4c OSX build fix 2013-02-02 22:22:22 -08:00
Sven Eckelmann
113a45e0b3 Introduce WARNFLAGS for default (removable) compiler warning flags 2013-01-02 16:13:45 +01:00
Sven Eckelmann
007e65fc66 Disable PIC on MinGW to reduce warnings 2013-01-01 00:30:34 +01:00
n pepinpe
cbe6282ca0 Fix path to OSX SDK with XCode >=4.3 2012-12-31 10:43:00 +01:00
Richard Goedeken
af1ddc60f3 merge heads with no other changes 2012-12-30 15:22:04 -08:00
Sven Eckelmann
8be0c1dd72 Add new controller name "Logitech Cordless RumblePad 2" 2012-12-29 21:11:42 +01: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
e8d58cc7f9 Map "Controller" under OSX to "Microsoft X-Box 360 pad"
The OSX driver seems to name the Controller using the "unique" name
"Controller". Therefore, mapping them to the "Microsoft X-Box 360 pad"
configuration may be a valid workaround for users of compatible gamepads.
2012-12-18 14:57:25 +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
Sven Eckelmann
a099289ef4 Fix L button on WiseGroup.,Ltd TigerGame XBOX+PS2+GC Game Controller Adapter
The wrong axis direction seemed to be used as described in issue #527 by
gouessej@gmail.com
2012-12-13 16:53:33 +01:00
Sven Eckelmann
3a797083e1 Use $(OBJDIR) in clean target instead of hardcoded path 2012-12-13 14:53:05 +01:00
Sven Eckelmann
a0880f0aa3 Allow to add a postfix for each build
The POSTFIX make option is useful for distributions to compile different
versions of the plugin in parallel. The object files will be stored in a
directory with the postfix appended and the linker result will also have this
postfix appended.
2012-12-13 14:47:17 +01:00
Sven Eckelmann
06e28dc991 Fix order of Makefile targets to print help by default 2012-12-13 14:07:56 +01:00
Sven Eckelmann
7e92b3d81c Add CROSS_COMPILE make option
The CROSS_COMPILE make option can be used to automatically prepend the prefix
to all build relevant tools to seamlessly allow cross compilation without
setting each tool name separately.

Cross compiling for MinGW32 would can be done using
$ make -C projects/unix/ CROSS_COMPILE=i686-pc-mingw32- HOST_CPU=i686 UNAME=MINGW
2012-12-13 12:25:30 +01:00
Sven Eckelmann
ae5b17fed0 Allow to change names of *-config tools for cross compiles 2012-12-13 11:33:49 +01:00
Sven Eckelmann
9538dad8c3 Synchronize usage of environmental variables for UNAME with HOST_CPU 2012-12-13 10:52:49 +01:00
Sven Eckelmann
e7e9f8e42c Remove duplicated definition of CC for MinGW 2012-12-13 10:46:17 +01:00
Richard Goedeken
e5969dab23 updated Logitech Chillstream controller config from Nils Gerlach 2012-12-09 17:27:10 -08:00
veganaize
781f99ec5a Add support for MingW32 2012-12-04 21:17:52 +01:00
Anthony J. Bentley
26417f4242 Detect OpenBSD PowerPC platforms macppc and socppc. 2012-11-12 18:02:40 -07:00
Sven Eckelmann
3e14a9b78e Add configuration for semi-supported architecture armel 2012-11-04 01:25:37 +01:00
Richard Goedeken
c39cfa771f fix in autoconfig ini file from Bobby Smiles 2012-10-28 21:27:45 -07:00
Richard Goedeken
5b43374d9c update HuiJia USB GamePad configuration from Adriano Lols 2012-10-28 11:51:28 -07:00
Richard Goedeken
2d5d9a0e43 added auto-configs for Logitech Precision Gamepad and MP-8866 Dual USB Joypad 2012-09-16 16:32:58 -07:00
Richard Goedeken
e6ab835191 fixes for DragonRise USB joystick 2012-07-06 22:35:07 -07:00