Add auto-configuration for ACRUX Gamepads (USB ID: 1a34:080) a Xbox 360
controller clone sold under various brands and clarify mapping description
for Xbox 360 controllers and clones in README.
Different names on Linux and Windows
saitek p580 rumble pad (name in windows device manager)
Colour Rumble Pad (name detected by mupen64 on windows 8)
Jess Technology Colour Rumble Pad (name on Linux lsusb)
Tested on windows 8 and Ubuntu 12.04
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.
The *.d depends files for make just list the files used when building an
object file. Removing a file listed in such a dependency file causes make to
search for a way to recreate it. This usually cannot work because these files
aren't autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
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.
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.
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.
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.
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.
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.